summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/filePermissions.cpp48
-rw-r--r--noncore/apps/advancedfm/main.cpp4
-rw-r--r--noncore/apps/advancedfm/opie-advancedfm.control2
-rw-r--r--noncore/apps/advancedfm/output.cpp24
-rw-r--r--noncore/apps/checkbook/opie-checkbook.control2
-rw-r--r--noncore/apps/opie-console/configdialog.cpp4
-rw-r--r--noncore/apps/opie-console/consoleconfigwidget.cpp19
-rw-r--r--noncore/apps/opie-console/main.cpp81
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp5
-rw-r--r--noncore/apps/opie-console/opie-console.control2
-rw-r--r--noncore/apps/opie-console/opie-console.pro1
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp21
-rw-r--r--noncore/apps/opie-reader/Prefs.cpp60
-rw-r--r--noncore/apps/opie-reader/Prefs.h9
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp2
-rw-r--r--noncore/apps/opie-reader/ToolbarPrefs.h2
-rw-r--r--noncore/apps/opie-reader/opie-reader.control2
-rw-r--r--noncore/apps/opie-write/opie-write.control2
-rw-r--r--noncore/apps/oxygen/opie-oxygen.control2
-rw-r--r--noncore/apps/tableviewer/opie-tableviewer.control2
-rw-r--r--noncore/apps/tinykate/libkate/document/katebuffer.cpp2
-rw-r--r--noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp3
-rw-r--r--noncore/apps/tinykate/libkate/libkate.pro93
-rw-r--r--noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp14
-rw-r--r--noncore/apps/tinykate/libkate/microkde/kcolordialog.h4
-rw-r--r--noncore/apps/tinykate/libkate/view/kateview.cpp16
-rw-r--r--noncore/apps/tinykate/main.cpp5
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-commondev.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-documentation.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-misc.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-miscdev.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-unix.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax-web.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate-syntax.control2
-rw-r--r--noncore/apps/tinykate/opie-tinykate.control2
-rw-r--r--noncore/apps/tinykate/tinykate.cpp162
-rw-r--r--noncore/apps/tinykate/tinykate.h25
-rw-r--r--noncore/apps/tinykate/tinykate.pro22
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp12
-rw-r--r--noncore/settings/aqpkg/opie-aqpkg.control2
-rw-r--r--noncore/settings/aqpkg/package.cpp1
-rw-r--r--noncore/settings/aqpkg/packagewin.cpp7
-rw-r--r--noncore/settings/aqpkg/server.cpp13
-rw-r--r--noncore/settings/sysinfo/modulesinfo.cpp6
-rw-r--r--noncore/settings/sysinfo/opie-sysinfo.control2
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp4
46 files changed, 336 insertions, 367 deletions
diff --git a/noncore/apps/advancedfm/filePermissions.cpp b/noncore/apps/advancedfm/filePermissions.cpp
index c06f14f..4de6d12 100644
--- a/noncore/apps/advancedfm/filePermissions.cpp
+++ b/noncore/apps/advancedfm/filePermissions.cpp
@@ -1,186 +1,182 @@
1/**************************************************************************** 1/****************************************************************************
2** copyright 2002 ljp ljp@llornkcor.com 2** copyright 2002 ljp ljp@llornkcor.com
3** Created: Sat Feb 23 19:44:40 2002 L.J. Potter 3** Created: Sat Feb 23 19:44:40 2002 L.J. Potter
4** 4**
5** This file may be distributed and/or modified under the terms of the 5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software 6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the 7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file. 8** packaging of this file.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** 12**
13****************************************************************************/ 13****************************************************************************/
14#include "filePermissions.h" 14#include "filePermissions.h"
15 15
16#include <qfile.h>
17#include <qfileinfo.h> 16#include <qfileinfo.h>
18 17
19#include <qcheckbox.h> 18#include <qcheckbox.h>
20#include <qlabel.h> 19#include <qlabel.h>
21#include <qlineedit.h> 20#include <qlineedit.h>
22#include <qlayout.h>
23#include <qvariant.h>
24#include <qtooltip.h>
25#include <qmessagebox.h> 21#include <qmessagebox.h>
26 22
27#include <unistd.h> 23#include <unistd.h>
28#include <sys/stat.h> 24#include <sys/stat.h>
29#include <stdlib.h> 25#include <stdlib.h>
30#include <sys/types.h> 26#include <sys/types.h>
31#include <pwd.h> 27#include <pwd.h>
32#include <grp.h> 28#include <grp.h>
33 29
34filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName ) 30filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName )
35 : QDialog( parent, name, modal, fl ) 31 : QDialog( parent, name, modal, fl )
36{ 32{
37 if ( !name ) 33 if ( !name )
38 setName( "filePermissions" ); 34 setName( "filePermissions" );
39// qDebug("FilePermissions "+fileName); 35// qDebug("FilePermissions "+fileName);
40/* resize( 236, 210 ); 36/* resize( 236, 210 );
41 setMaximumSize( QSize( 236, 210 ) ); 37 setMaximumSize( QSize( 236, 210 ) );
42*/ setCaption( tr( "Set File Permissions" ) ); 38*/ setCaption( tr( "Set File Permissions" ) );
43 39
44 TextLabel1 = new QLabel( this, "TextLabel1" ); 40 TextLabel1 = new QLabel( this, "TextLabel1" );
45 TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); 41 TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) );
46 TextLabel1->setText( tr( "Set file permissions for:" ) ); 42 TextLabel1->setText( tr( "Set file permissions for:" ) );
47 43
48 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 44 LineEdit1 = new QLineEdit( this, "LineEdit1" );
49 LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); 45 LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) );
50 LineEdit1->setReadOnly(true); 46 LineEdit1->setReadOnly(true);
51 47
52 TextLabel4 = new QLabel( this, "TextLabel4" ); 48 TextLabel4 = new QLabel( this, "TextLabel4" );
53 TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); 49 TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) );
54 TextLabel4->setText( tr( "owner" ) ); 50 TextLabel4->setText( tr( "owner" ) );
55 51
56 TextLabel4_2 = new QLabel( this, "TextLabel4_2" ); 52 TextLabel4_2 = new QLabel( this, "TextLabel4_2" );
57 TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) ); 53 TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) );
58 TextLabel4_2->setText( tr( "group" ) ); 54 TextLabel4_2->setText( tr( "group" ) );
59 55
60 TextLabel4_3 = new QLabel( this, "TextLabel4_3" ); 56 TextLabel4_3 = new QLabel( this, "TextLabel4_3" );
61 TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) ); 57 TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) );
62 TextLabel4_3->setText( tr( "others" ) ); 58 TextLabel4_3->setText( tr( "others" ) );
63 59
64 CheckBox1 = new QCheckBox( this, "CheckBox1" ); 60 CheckBox1 = new QCheckBox( this, "CheckBox1" );
65 CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) ); 61 CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) );
66 connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck())); 62 connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck()));
67 63
68 CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" ); 64 CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" );
69 CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) ); 65 CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) );
70 connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck())); 66 connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck()));
71 67
72 CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" ); 68 CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" );
73 CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) ); 69 CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) );
74 connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck())); 70 connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck()));
75 71
76 CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" ); 72 CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" );
77 CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) ); 73 CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) );
78 connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck())); 74 connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck()));
79 75
80 CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" ); 76 CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" );
81 CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) ); 77 CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) );
82 connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck())); 78 connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck()));
83 79
84 CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" ); 80 CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" );
85 CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) ); 81 CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) );
86 connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck())); 82 connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck()));
87 83
88 CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" ); 84 CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" );
89 CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) ); 85 CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) );
90 connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck())); 86 connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck()));
91 87
92 CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" ); 88 CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" );
93 CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) ); 89 CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) );
94 connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck())); 90 connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck()));
95 91
96 CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" ); 92 CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" );
97 CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) ); 93 CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) );
98 connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck())); 94 connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck()));
99 95
100 GroupLineEdit = new QLineEdit( this, "GroupLineEdit" ); 96 GroupLineEdit = new QLineEdit( this, "GroupLineEdit" );
101 GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) ); 97 GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) );
102 98
103 OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" ); 99 OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" );
104 OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) ); 100 OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) );
105 101
106 TextLabel5 = new QLabel( this, "TextLabel5" ); 102 TextLabel5 = new QLabel( this, "TextLabel5" );
107 TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) ); 103 TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) );
108 TextLabel5->setText( tr( "Owner" ) ); 104 TextLabel5->setText( tr( "Owner" ) );
109 105
110 TextLabel5_2 = new QLabel( this, "TextLabel5_2" ); 106 TextLabel5_2 = new QLabel( this, "TextLabel5_2" );
111 TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) ); 107 TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) );
112 TextLabel5_2->setText( tr( "Group" ) ); 108 TextLabel5_2->setText( tr( "Group" ) );
113 109
114 ModeLine = new QLineEdit( this, "TextLabelMode" ); 110 ModeLine = new QLineEdit( this, "TextLabelMode" );
115 ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) ); 111 ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) );
116 112
117 TextLabel3_2 = new QLabel( this, "TextLabel3_2" ); 113 TextLabel3_2 = new QLabel( this, "TextLabel3_2" );
118 TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) ); 114 TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) );
119 TextLabel3_2->setText( tr( "read" ) ); 115 TextLabel3_2->setText( tr( "read" ) );
120 TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); 116 TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
121 117
122 TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" ); 118 TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" );
123 TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) ); 119 TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) );
124 TextLabel3_2_2->setText( tr( "write" ) ); 120 TextLabel3_2_2->setText( tr( "write" ) );
125 TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); 121 TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
126 122
127 TextLabel3 = new QLabel( this, "TextLabel3" ); 123 TextLabel3 = new QLabel( this, "TextLabel3" );
128 TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) ); 124 TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) );
129 TextLabel3->setText( tr( "execute" ) ); 125 TextLabel3->setText( tr( "execute" ) );
130 TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); 126 TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) );
131 127
132 struct stat buf; 128 struct stat buf;
133 mode_t mode; 129 mode_t mode;
134 file = fileName; 130 file = fileName;
135 QFileInfo fi(file); 131 QFileInfo fi(file);
136 132
137 LineEdit1->setText( file); 133 LineEdit1->setText( file);
138 OwnerLineEdit->setText( fi.owner()); 134 OwnerLineEdit->setText( fi.owner());
139 GroupLineEdit->setText( fi.group()); 135 GroupLineEdit->setText( fi.group());
140 136
141 if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); } 137 if( fi.permission( QFileInfo::ReadUser)) { CheckBox1->setChecked(true); }
142 if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); } 138 if( fi.permission( QFileInfo::WriteUser)) { CheckBox1_2->setChecked(true); }
143 if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); } 139 if( fi.permission( QFileInfo::ExeUser)) { CheckBox1_3->setChecked(true); }
144 140
145 if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); } 141 if( fi.permission( QFileInfo::ReadGroup)) { CheckBox1_4->setChecked(true); }
146 if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); } 142 if( fi.permission( QFileInfo::WriteGroup)) { CheckBox1_5->setChecked(true); }
147 if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); } 143 if( fi.permission( QFileInfo::ExeGroup)) { CheckBox1_6->setChecked(true); }
148 144
149 if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); } 145 if( fi.permission( QFileInfo::ReadOther)) { CheckBox1_7->setChecked(true); }
150 if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); } 146 if( fi.permission( QFileInfo::WriteOther)) { CheckBox1_8->setChecked(true); }
151 if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); } 147 if( fi.permission( QFileInfo::ExeOther)) { CheckBox1_8_2->setChecked(true); }
152 148
153 stat(file.latin1(), &buf); 149 stat(file.latin1(), &buf);
154 mode = buf.st_mode; 150 mode = buf.st_mode;
155 modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) ); 151 modeStr.sprintf("%#o", buf.st_mode & ~(S_IFMT) );
156 ModeLine->setText(modeStr); 152 ModeLine->setText(modeStr);
157 bool ok; 153 bool ok;
158 i_mode = modeStr.toInt(&ok,10); 154 i_mode = modeStr.toInt(&ok,10);
159 155
160} 156}
161 157
162/* 158/*
163 * Destroys the object and frees any allocated resources 159 * Destroys the object and frees any allocated resources
164 */ 160 */
165filePermissions::~filePermissions() 161filePermissions::~filePermissions()
166{ 162{
167} 163}
168 164
169 165
170// might this be better as a callback routine??? 166// might this be better as a callback routine???
171void filePermissions::ownReadCheck() { 167void filePermissions::ownReadCheck() {
172 if(CheckBox1->isChecked()) { i_mode +=400; } 168 if(CheckBox1->isChecked()) { i_mode +=400; }
173 else i_mode -=400; 169 else i_mode -=400;
174 modeStr.sprintf("0%d",i_mode); 170 modeStr.sprintf("0%d",i_mode);
175 ModeLine->setText( modeStr); 171 ModeLine->setText( modeStr);
176// 0400 172// 0400
177} 173}
178 174
179void filePermissions::ownWriteCheck() { 175void filePermissions::ownWriteCheck() {
180 if(CheckBox1_2->isChecked()) { i_mode +=200; } 176 if(CheckBox1_2->isChecked()) { i_mode +=200; }
181 else i_mode -=200; 177 else i_mode -=200;
182 modeStr.sprintf("0%d",i_mode); 178 modeStr.sprintf("0%d",i_mode);
183 ModeLine->setText(modeStr); 179 ModeLine->setText(modeStr);
184// 0200 180// 0200
185} 181}
186 182
@@ -227,48 +223,48 @@ void filePermissions::wrldReadCheck() {
227void filePermissions::wrldWriteCheck() { 223void filePermissions::wrldWriteCheck() {
228 if(CheckBox1_8->isChecked()) { i_mode +=2; } 224 if(CheckBox1_8->isChecked()) { i_mode +=2; }
229 else i_mode -=2; 225 else i_mode -=2;
230 modeStr.sprintf("0%d",i_mode); 226 modeStr.sprintf("0%d",i_mode);
231 ModeLine->setText(modeStr); 227 ModeLine->setText(modeStr);
232// 0002 228// 0002
233} 229}
234 230
235void filePermissions::wrldExeCheck() { 231void filePermissions::wrldExeCheck() {
236 if(CheckBox1_8_2->isChecked()) { i_mode +=1; } 232 if(CheckBox1_8_2->isChecked()) { i_mode +=1; }
237 else i_mode -=1; 233 else i_mode -=1;
238 modeStr.sprintf("0%d",i_mode); 234 modeStr.sprintf("0%d",i_mode);
239 ModeLine->setText(modeStr); 235 ModeLine->setText(modeStr);
240// 0001 236// 0001
241} 237}
242 238
243void filePermissions::accept() { 239void filePermissions::accept() {
244 240
245 QFileInfo fi(file); 241 QFileInfo fi(file);
246 struct passwd *pwd=0; 242 struct passwd *pwd=0;
247 struct group *grp=0; 243 struct group *grp=0;
248 pwd = getpwnam(OwnerLineEdit->text().latin1() ); 244 pwd = getpwnam(OwnerLineEdit->text().latin1() );
249 if(pwd == NULL) { 245 if(pwd == NULL) {
250 perror("getpwnam"); 246 perror("getpwnam");
251 QMessageBox::warning(this,"Warning","Error- no user"); 247 QMessageBox::warning(this,tr("Warning"),tr("Error- no user") );
252 return; 248 return;
253 } else { 249 } else {
254 grp = getgrnam(GroupLineEdit->text().latin1()); 250 grp = getgrnam(GroupLineEdit->text().latin1());
255 if(grp==NULL) { 251 if(grp==NULL) {
256 perror("getgrnam"); 252 perror("getgrnam");
257 QMessageBox::warning(this,"Warning","Error- no group"); 253 QMessageBox::warning(this,tr("Warning"),tr("Error- no group"));
258 return; 254 return;
259 } 255 }
260 if( chown( file.latin1(), pwd->pw_uid, grp->gr_gid) <0) { 256 if( chown( file.latin1(), pwd->pw_uid, grp->gr_gid) <0) {
261 perror("chown"); 257 perror("chown");
262 QMessageBox::warning(this,"Warning","Error setting ownership or group"); 258 QMessageBox::warning(this,tr("Warning"),tr("Error setting ownership or group") );
263 return; 259 return;
264 } 260 }
265 bool ok; 261 bool ok;
266 uint moder = modeStr.toUInt(&ok,8); 262 uint moder = modeStr.toUInt(&ok,8);
267 if( chmod( file.latin1(), moder) < 0) { 263 if( chmod( file.latin1(), moder) < 0) {
268 perror("chmod"); 264 perror("chmod");
269 QMessageBox::warning(this,"Warning","Error setting mode"); 265 QMessageBox::warning(this,tr("Warning"),tr("Error setting mode") );
270 return; 266 return;
271 } 267 }
272 } 268 }
273 close(); 269 close();
274} 270}
diff --git a/noncore/apps/advancedfm/main.cpp b/noncore/apps/advancedfm/main.cpp
index a0401e8..8cacc4a 100644
--- a/noncore/apps/advancedfm/main.cpp
+++ b/noncore/apps/advancedfm/main.cpp
@@ -1,31 +1,27 @@
1 1
2/*************************************************************************** 2/***************************************************************************
3 main.cpp - description 3 main.cpp - description
4 ------------------- 4 -------------------
5 begin : March 10, 2002 5 begin : March 10, 2002
6 copyright : (C) 2002 by llornkcor 6 copyright : (C) 2002 by llornkcor
7 email : ljp@llornkcor.com 7 email : ljp@llornkcor.com
8 * This program is free software; you can redistribute it and/or modify * 8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by * 9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or * 10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. * 11 * (at your option) any later version. *
12 ***************************************************************************/ 12 ***************************************************************************/
13#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
14#include <qpe/qcopenvelope_qws.h>
15#include <qpe/config.h>
16#include <qstring.h>
17#include <qstringlist.h>
18 14
19 15
20 16
21#include "advancedfm.h" 17#include "advancedfm.h"
22 18
23int main(int argc, char *argv[]) 19int main(int argc, char *argv[])
24{ 20{
25 QPEApplication a(argc, argv); 21 QPEApplication a(argc, argv);
26 22
27 AdvancedFm advencedFm; 23 AdvancedFm advencedFm;
28 a.showMainWidget( &advencedFm); 24 a.showMainWidget( &advencedFm);
29 return a.exec(); 25 return a.exec();
30} 26}
31 27
diff --git a/noncore/apps/advancedfm/opie-advancedfm.control b/noncore/apps/advancedfm/opie-advancedfm.control
index f17c590..1e0f9ec 100644
--- a/noncore/apps/advancedfm/opie-advancedfm.control
+++ b/noncore/apps/advancedfm/opie-advancedfm.control
@@ -1,10 +1,10 @@
1Package: opie-advancedfm 1Package: opie-advancedfm
2Files: bin/advancedfm apps/Applications/advancedfm.desktop pics/advancedfm 2Files: bin/advancedfm apps/Applications/advancedfm.desktop pics/advancedfm
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: L.J. Potter <ljp@llornkcor.com> 5Maintainer: L.J. Potter <ljp@llornkcor.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Advanced File Manager 8Description: Advanced File Manager
10 The advanced file manager for the Opie environment. 9 The advanced file manager for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp
index a60cea6..33abdfc 100644
--- a/noncore/apps/advancedfm/output.cpp
+++ b/noncore/apps/advancedfm/output.cpp
@@ -1,46 +1,40 @@
1/**************************************************************************** 1/****************************************************************************
2** outputEdit.cpp 2** outputEdit.cpp
3** 3**
4** Copyright: Fri Apr 12 15:12:58 2002 L.J. Potter <ljp@llornkcor.com> 4** Copyright: Fri Apr 12 15:12:58 2002 L.J. Potter <ljp@llornkcor.com>
5****************************************************************************/ 5****************************************************************************/
6#include "output.h" 6#include "output.h"
7 7
8#include <opie/oprocess.h> 8#include <opie/oprocess.h>
9 9
10#include <qpe/filemanager.h>
11#include <qpe/qpeapplication.h> 10#include <qpe/qpeapplication.h>
12#include <qpe/applnk.h> 11#include <qpe/applnk.h>
13 12
14#include <qmessagebox.h>
15#include <qstringlist.h>
16#include <qfile.h> 13#include <qfile.h>
17#include <qcstring.h>
18#include <qlineedit.h>
19#include <qmultilineedit.h> 14#include <qmultilineedit.h>
20#include <qpushbutton.h> 15#include <qpushbutton.h>
21#include <qlayout.h> 16#include <qlayout.h>
22#include <qvariant.h>
23 17
24#include <errno.h> 18#include <errno.h>
25 19
26/* XPM */ 20/* XPM */
27static char * filesave_xpm[] = { 21static char * filesave_xpm[] = {
28"16 16 78 1", 22"16 16 78 1",
29" c None", 23" c None",
30". c #343434", 24". c #343434",
31"+ c #A0A0A0", 25"+ c #A0A0A0",
32"@ c #565656", 26"@ c #565656",
33"# c #9E9E9E", 27"# c #9E9E9E",
34"$ c #525252", 28"$ c #525252",
35"% c #929292", 29"% c #929292",
36"& c #676767", 30"& c #676767",
37"* c #848484", 31"* c #848484",
38"= c #666666", 32"= c #666666",
39"- c #D8D8D8", 33"- c #D8D8D8",
40"; c #FFFFFF", 34"; c #FFFFFF",
41"> c #DBDBDB", 35"> c #DBDBDB",
42", c #636363", 36", c #636363",
43"' c #989898", 37"' c #989898",
44") c #2D2D2D", 38") c #2D2D2D",
45"! c #909090", 39"! c #909090",
46"~ c #AEAEAE", 40"~ c #AEAEAE",
@@ -106,109 +100,109 @@ static char * filesave_xpm[] = {
106"M c #1C1C1C", 100"M c #1C1C1C",
107" ...+ ", 101" ...+ ",
108" @#$%&..+ ", 102" @#$%&..+ ",
109" .*=-;;>,..+ ", 103" .*=-;;>,..+ ",
110" ')!~;;;;;;{]..", 104" ')!~;;;;;;{]..",
111" ^/(-;;;;;;;_:<", 105" ^/(-;;;;;;;_:<",
112" [}|;;;;;;;{12$", 106" [}|;;;;;;;{12$",
113" #34-55;;;;678$+", 107" #34-55;;;;678$+",
114" 90ab=c;dd;e1fg ", 108" 90ab=c;dd;e1fg ",
115" [ahij((kbl0mn$ ", 109" [ahij((kbl0mn$ ",
116" op^q^^7r&]s/$+ ", 110" op^q^^7r&]s/$+ ",
117"@btu;vbwxy]zAB ", 111"@btu;vbwxy]zAB ",
118"CzDEvEv;;DssF$ ", 112"CzDEvEv;;DssF$ ",
119"G.H{E{E{IxsJ$+ ", 113"G.H{E{E{IxsJ$+ ",
120" +...vEKxzLM ", 114" +...vEKxzLM ",
121" +...z]n$ ", 115" +...z]n$ ",
122" +... "}; 116" +... "};
123 117
124Output::Output( const QStringList commands, QWidget* parent, const char* name, bool modal, WFlags fl) 118Output::Output( const QStringList commands, QWidget* parent, const char* name, bool modal, WFlags fl)
125 : QDialog( parent, name, modal, fl ) 119 : QDialog( parent, name, modal, fl )
126{ 120{
127 QStringList cmmds; 121 QStringList cmmds;
128// cmmds=QStringList::split( " ", commands, false); 122// cmmds=QStringList::split( " ", commands, false);
129 cmmds=commands; 123 cmmds=commands;
130// qDebug("count %d", cmmds.count()); 124// qDebug("count %d", cmmds.count());
131 if ( !name ) 125 if ( !name )
132 setName( tr("Output")); 126 setName( tr("Output"));
133 resize( 196, 269 ); 127 resize( 196, 269 );
134 setCaption( name ); 128 setCaption( name );
135 129
136 OutputLayout = new QGridLayout( this ); 130 OutputLayout = new QGridLayout( this );
137 OutputLayout->setSpacing( 2); 131 OutputLayout->setSpacing( 2);
138 OutputLayout->setMargin( 2); 132 OutputLayout->setMargin( 2);
139 133
140 QPushButton *docButton; 134 QPushButton *docButton;
141 docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton"); 135 docButton = new QPushButton( QPixmap(( const char** ) filesave_xpm ) ,"",this,"saveButton");
142 docButton->setFixedSize( QSize( 20, 20 ) ); 136 docButton->setFixedSize( QSize( 20, 20 ) );
143 connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() )); 137 connect( docButton,SIGNAL(released()),this,SLOT( saveOutput() ));
144 // docButton->setFlat(TRUE); 138 // docButton->setFlat(TRUE);
145 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 ); 139 OutputLayout->addMultiCellWidget( docButton, 0,0,3,3 );
146 140
147 OutputEdit = new QMultiLineEdit( this, "OutputEdit" ); 141 OutputEdit = new QMultiLineEdit( this, "OutputEdit" );
148 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 ); 142 OutputLayout->addMultiCellWidget( OutputEdit, 1,1,0,3 );
149 143
150 proc = new OProcess(); 144 proc = new OProcess();
151 145
152 connect(proc, SIGNAL(processExited(OProcess *)), 146 connect(proc, SIGNAL(processExited(OProcess *)),
153 this, SLOT( processFinished())); 147 this, SLOT( processFinished()));
154 148
155 connect(proc, SIGNAL(receivedStdout(OProcess *, char *, int)), 149 connect(proc, SIGNAL(receivedStdout(OProcess *, char *, int)),
156 this, SLOT(commandStdout(OProcess *, char *, int))); 150 this, SLOT(commandStdout(OProcess *, char *, int)));
157 151
158 connect(proc, SIGNAL(receivedStderr(OProcess *, char *, int)), 152 connect(proc, SIGNAL(receivedStderr(OProcess *, char *, int)),
159 this, SLOT(commandStderr(OProcess *, char *, int))); 153 this, SLOT(commandStderr(OProcess *, char *, int)));
160 154
161// connect( , SIGNAL(received(const QByteArray &)), 155// connect( , SIGNAL(received(const QByteArray &)),
162// this, SLOT(commandStdin(const QByteArray &))); 156// this, SLOT(commandStdin(const QByteArray &)));
163 157
164// * proc << commands.latin1(); 158// * proc << commands.latin1();
165 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { 159 for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) {
166 qDebug( "%s", (*it).latin1() ); 160 qDebug( "%s", (*it).latin1() );
167 * proc << (*it).latin1(); 161 * proc << (*it).latin1();
168 } 162 }
169 163
170 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) { 164 if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) {
171 165
172 OutputEdit->append("Process could not start"); 166 OutputEdit->append(tr("Process could not start") );
173 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 167 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
174 perror("Error: "); 168 perror("Error: ");
175 QString errorMsg="Error\n"+(QString)strerror(errno); 169 QString errorMsg=tr("Error\n")+(QString)strerror(errno);
176 OutputEdit->append( errorMsg); 170 OutputEdit->append( errorMsg);
177 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 171 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
178 } 172 }
179} 173}
180 174
181Output::~Output() { 175Output::~Output() {
182} 176}
183 177
184void Output::saveOutput() { 178void Output::saveOutput() {
185 179
186 InputDialog *fileDlg; 180 InputDialog *fileDlg;
187 fileDlg = new InputDialog(this,tr("Save output to file (name only)"),TRUE, 0); 181 fileDlg = new InputDialog(this,tr("Save output to file (name only)"),TRUE, 0);
188 fileDlg->exec(); 182 fileDlg->exec();
189 if( fileDlg->result() == 1 ) { 183 if( fileDlg->result() == 1 ) {
190 QString filename = QPEApplication::documentDir(); 184 QString filename = QPEApplication::documentDir();
191 if(filename.right(1).find('/') == -1) 185 if(filename.right(1).find('/') == -1)
192 filename+="/"; 186 filename+="/";
193 QString name = fileDlg->LineEdit1->text(); 187 QString name = fileDlg->LineEdit1->text();
194 filename+="text/plain/"+name; 188 filename+="text/plain/"+name;
195 qDebug(filename); 189 qDebug(filename);
196 190
197 QFile f(filename); 191 QFile f(filename);
198 f.open( IO_WriteOnly); 192 f.open( IO_WriteOnly);
199 if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) { 193 if( f.writeBlock( OutputEdit->text(), qstrlen( OutputEdit->text()) ) != -1) {
200 DocLnk lnk; 194 DocLnk lnk;
201 lnk.setName(name); //sets file name 195 lnk.setName(name); //sets file name
202 lnk.setFile(filename); //sets File property 196 lnk.setFile(filename); //sets File property
203 lnk.setType("text/plain"); 197 lnk.setType("text/plain");
204 if(!lnk.writeLink()) { 198 if(!lnk.writeLink()) {
205 qDebug("Writing doclink did not work"); 199 qDebug("Writing doclink did not work");
206 } 200 }
207 } else 201 } else
208 qWarning("Could not write file"); 202 qWarning("Could not write file");
209 f.close(); 203 f.close();
210 } 204 }
211} 205}
212 206
213void Output::commandStdout(OProcess*, char *buffer, int buflen) { 207void Output::commandStdout(OProcess*, char *buffer, int buflen) {
214 qWarning("received stdout %d bytes", buflen); 208 qWarning("received stdout %d bytes", buflen);
@@ -224,61 +218,61 @@ void Output::commandStdout(OProcess*, char *buffer, int buflen) {
224 lineStr=lineStr.left(lineStr.length()-1); 218 lineStr=lineStr.left(lineStr.length()-1);
225 OutputEdit->append(lineStr); 219 OutputEdit->append(lineStr);
226 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 220 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
227} 221}
228 222
229 223
230void Output::commandStdin( const QByteArray &data) { 224void Output::commandStdin( const QByteArray &data) {
231 qWarning("received stdin %d bytes", data.size()); 225 qWarning("received stdin %d bytes", data.size());
232 // recieved data from the io layer goes to sz 226 // recieved data from the io layer goes to sz
233 proc->writeStdin(data.data(), data.size()); 227 proc->writeStdin(data.data(), data.size());
234} 228}
235 229
236void Output::commandStderr(OProcess*, char *buffer, int buflen) { 230void Output::commandStderr(OProcess*, char *buffer, int buflen) {
237 qWarning("received stderrt %d bytes", buflen); 231 qWarning("received stderrt %d bytes", buflen);
238 232
239 QString lineStr = buffer; 233 QString lineStr = buffer;
240// lineStr=lineStr.left(lineStr.length()-1); 234// lineStr=lineStr.left(lineStr.length()-1);
241 OutputEdit->append(lineStr); 235 OutputEdit->append(lineStr);
242 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 236 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
243} 237}
244 238
245void Output::processFinished() { 239void Output::processFinished() {
246 240
247 delete proc; 241 delete proc;
248 OutputEdit->append( "\nFinished\n"); 242 OutputEdit->append( tr("\nFinished\n") );
249 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE); 243 OutputEdit->setCursorPosition( OutputEdit->numLines() + 1,0,FALSE);
250// close(); 244// close();
251// disconnect( layer(), SIGNAL(received(const QByteArray &)), 245// disconnect( layer(), SIGNAL(received(const QByteArray &)),
252// this, SLOT(commandStdin(const QByteArray &))); 246// this, SLOT(commandStdin(const QByteArray &)));
253} 247}
254 248
255//============================== 249//==============================
256 250
257InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 251InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
258 : QDialog( parent, name, modal, fl ) 252 : QDialog( parent, name, modal, fl )
259{ 253{
260 if ( !name ) 254 if ( !name )
261 setName( "InputDialog" ); 255 setName( "InputDialog" );
262 resize( 234, 50 ); 256 resize( 234, 50 );
263 setMaximumSize( QSize( 240, 50 ) ); 257 setMaximumSize( QSize( 240, 50 ) );
264 setCaption( tr(name ) ); 258 setCaption( tr(name ) );
265 259
266 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 260 LineEdit1 = new QLineEdit( this, "LineEdit1" );
267 LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); 261 LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) );
268 LineEdit1->setFocus(); 262 LineEdit1->setFocus();
269 LineEdit1->setFocus(); 263 LineEdit1->setFocus();
270 connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(returned() )); 264 connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(returned() ));
271} 265}
272 266
273InputDialog::~InputDialog() { 267InputDialog::~InputDialog() {
274 inputText = LineEdit1->text(); 268 inputText = LineEdit1->text();
275} 269}
276 270
277void InputDialog::setInputText(const QString &string) { 271void InputDialog::setInputText(const QString &string) {
278 LineEdit1->setText( string); 272 LineEdit1->setText( string);
279} 273}
280 274
281void InputDialog::returned() { 275void InputDialog::returned() {
282 inputText = LineEdit1->text(); 276 inputText = LineEdit1->text();
283 this->accept(); 277 this->accept();
284} 278}
diff --git a/noncore/apps/checkbook/opie-checkbook.control b/noncore/apps/checkbook/opie-checkbook.control
index c0061e5..78f303c 100644
--- a/noncore/apps/checkbook/opie-checkbook.control
+++ b/noncore/apps/checkbook/opie-checkbook.control
@@ -1,10 +1,10 @@
1Package: opie-checkbook 1Package: opie-checkbook
2Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook 2Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook
3Priority: optional 3Priority: optional
4Section: applications 4Section: applications
5Maintainer: Dan Williams <drw@handhelds.org> 5Maintainer: Dan Williams <drw@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, libopie1 7Depends: task-opie-minimal, libopie1
9Description: Checkbook keeping program. 8Description: Checkbook keeping program.
10 The checkbook accounting program for the Opie environment. 9 The checkbook accounting program for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp
index 0bc6588..53b3853 100644
--- a/noncore/apps/opie-console/configdialog.cpp
+++ b/noncore/apps/opie-console/configdialog.cpp
@@ -54,61 +54,61 @@ Profile::ValueList ConfigDialog::list()const {
54 lst.append( item->profile() ); 54 lst.append( item->profile() );
55 } 55 }
56 return lst; 56 return lst;
57} 57}
58/* our slots */ 58/* our slots */
59void ConfigDialog::slotRemove() { 59void ConfigDialog::slotRemove() {
60 ConfigListItem* item = (ConfigListItem*)lstView->currentItem(); 60 ConfigListItem* item = (ConfigListItem*)lstView->currentItem();
61 if (!item ) 61 if (!item )
62 return; 62 return;
63 63
64 lstView->takeItem( item ); 64 lstView->takeItem( item );
65 delete item; 65 delete item;
66} 66}
67 67
68void ConfigDialog::slotEdit() { 68void ConfigDialog::slotEdit() {
69 Profile p; 69 Profile p;
70 70
71 if(!lstView->currentItem()) return; 71 if(!lstView->currentItem()) return;
72 72
73 // Load profile 73 // Load profile
74 p = ((ConfigListItem*)lstView->currentItem())->profile(); 74 p = ((ConfigListItem*)lstView->currentItem())->profile();
75 75
76 ProfileEditorDialog dlg(m_fact, p); 76 ProfileEditorDialog dlg(m_fact, p);
77 77
78 dlg.setCaption("Edit Connection Profile"); 78 dlg.setCaption(tr("Edit Connection Profile"));
79 dlg.showMaximized(); 79 dlg.showMaximized();
80 int ret = dlg.exec(); 80 int ret = dlg.exec();
81 81
82 if(ret == QDialog::Accepted) 82 if(ret == QDialog::Accepted)
83 { 83 {
84 if(lstView->currentItem()) delete lstView->currentItem(); 84 if(lstView->currentItem()) delete lstView->currentItem();
85 85
86 // use dlg.terminal()! 86 // use dlg.terminal()!
87 Profile p = dlg.profile(); 87 Profile p = dlg.profile();
88 88
89 new ConfigListItem(lstView, p); 89 new ConfigListItem(lstView, p);
90 } 90 }
91} 91}
92 92
93 93
94void ConfigDialog::slotAdd() { 94void ConfigDialog::slotAdd() {
95 ProfileEditorDialog dlg(m_fact); 95 ProfileEditorDialog dlg(m_fact);
96 96
97 dlg.setCaption("New Connection"); 97 dlg.setCaption(tr("New Connection"));
98 dlg.showMaximized(); 98 dlg.showMaximized();
99 int ret = dlg.exec(); 99 int ret = dlg.exec();
100 100
101 if(ret == QDialog::Accepted) 101 if(ret == QDialog::Accepted)
102 { 102 {
103 // TODO: Move into general profile save part 103 // TODO: Move into general profile save part
104 // assignments 104 // assignments
105 //QString type = dlg.term_type(); 105 //QString type = dlg.term_type();
106 //if(type == "VT102") profile = Profile::VT102; 106 //if(type == "VT102") profile = Profile::VT102;
107 107
108 // get profile from editor 108 // get profile from editor
109 Profile p = dlg.profile(); 109 Profile p = dlg.profile();
110 110
111 new ConfigListItem(lstView, p); 111 new ConfigListItem(lstView, p);
112 } 112 }
113} 113}
114 114
diff --git a/noncore/apps/opie-console/consoleconfigwidget.cpp b/noncore/apps/opie-console/consoleconfigwidget.cpp
index 3f2d154..faedc58 100644
--- a/noncore/apps/opie-console/consoleconfigwidget.cpp
+++ b/noncore/apps/opie-console/consoleconfigwidget.cpp
@@ -1,34 +1,38 @@
1#include <qlabel.h> 1#include <qlabel.h>
2#include <qlayout.h> 2#include <qlayout.h>
3#include <qcombobox.h> 3#include <qcombobox.h>
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qpushbutton.h> 5#include <qpushbutton.h>
6#include <qlistview.h> 6#include <qlistview.h>
7#include <qhbox.h> 7#include <qhbox.h>
8#include <qregexp.h> 8#include <qregexp.h>
9#include <stdio.h> 9#include <stdio.h>
10 10
11#include <pwd.h>
12#include <sys/types.h>
13
14
11#include "consoleconfigwidget.h" 15#include "consoleconfigwidget.h"
12 16
13ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent, 17ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent,
14 const char* na ) 18 const char* na )
15 : ProfileDialogConnectionWidget( name, parent, na ) { 19 : ProfileDialogConnectionWidget( name, parent, na ) {
16 m_lay = new QVBoxLayout( this ); 20 m_lay = new QVBoxLayout( this );
17 QLabel *label = new QLabel(tr("Command to execute"), this); 21 QLabel *label = new QLabel(tr("Command to execute"), this);
18 m_lay->addWidget(label); 22 m_lay->addWidget(label);
19 m_cmd = new QLineEdit(this); 23 m_cmd = new QLineEdit(this);
20 m_lay->addWidget(m_cmd); 24 m_lay->addWidget(m_cmd);
21 label = new QLabel(tr("Environment Variables"), this); 25 label = new QLabel(tr("Environment Variables"), this);
22 m_lay->addWidget(label); 26 m_lay->addWidget(label);
23 m_env = new QListView(this); 27 m_env = new QListView(this);
24 m_env->addColumn(tr("Name")); 28 m_env->addColumn(tr("Name"));
25 m_env->addColumn(tr("Value")); 29 m_env->addColumn(tr("Value"));
26 m_lay->addWidget(m_env); 30 m_lay->addWidget(m_env);
27 31
28 QHBox *hbox = new QHBox(this); 32 QHBox *hbox = new QHBox(this);
29 label = new QLabel(tr("Name :"), hbox); 33 label = new QLabel(tr("Name :"), hbox);
30 m_name = new QLineEdit(hbox); 34 m_name = new QLineEdit(hbox);
31 m_lay->addWidget(hbox); 35 m_lay->addWidget(hbox);
32 36
33 hbox = new QHBox(this); 37 hbox = new QHBox(this);
34 label = new QLabel(tr("Value :"), hbox); 38 label = new QLabel(tr("Value :"), hbox);
@@ -44,53 +48,60 @@ ConsoleConfigWidget::ConsoleConfigWidget( const QString& name, QWidget* parent,
44 m_lay->addWidget(hbox); 48 m_lay->addWidget(hbox);
45} 49}
46 50
47void ConsoleConfigWidget::slotAdd() { 51void ConsoleConfigWidget::slotAdd() {
48 if (!(m_name->text().isEmpty() || m_value->text().isEmpty())) { 52 if (!(m_name->text().isEmpty() || m_value->text().isEmpty())) {
49 QListViewItem *item = new QListViewItem(m_env); 53 QListViewItem *item = new QListViewItem(m_env);
50 item->setText(0, m_name->text()); 54 item->setText(0, m_name->text());
51 item->setText(1, m_value->text()); 55 item->setText(1, m_value->text());
52 m_env->insertItem(item); 56 m_env->insertItem(item);
53 } 57 }
54} 58}
55 59
56void ConsoleConfigWidget::slotRemove() { 60void ConsoleConfigWidget::slotRemove() {
57 QListViewItem *item = m_env->currentItem(); 61 QListViewItem *item = m_env->currentItem();
58 if (item) { 62 if (item) {
59 m_env->takeItem(item); 63 m_env->takeItem(item);
60 } 64 }
61} 65}
62 66
63ConsoleConfigWidget::~ConsoleConfigWidget() { 67ConsoleConfigWidget::~ConsoleConfigWidget() {
64} 68}
65 69
66void ConsoleConfigWidget::load( const Profile& prof ) { 70void ConsoleConfigWidget::load( const Profile& prof ) {
67 /* 71 /*
68 * we will use /bin/bash as default 72 * default to the users default shell
69 * but will fallback in MyPty to /bin/sh
70 * if necessary
71 */ 73 */
72 m_cmd->setText(prof.readEntry("Command", "/bin/bash")); 74 struct passwd *ent = 0;
75 char *shell = "/bin/sh";
76
77 while ( (ent = getpwent()) != 0 ) {
78 if (ent->pw_shell != "") {
79 shell = ent->pw_shell;
80 }
81 }
82
83 m_cmd->setText(prof.readEntry("Command", shell ));
73 int envcount = prof.readNumEntry("EnvVars", 0); 84 int envcount = prof.readNumEntry("EnvVars", 0);
74 for (int i=0; i<envcount; i++) { 85 for (int i=0; i<envcount; i++) {
75 QString name = prof.readEntry("Env_Name_" + QString::number(i), ""); 86 QString name = prof.readEntry("Env_Name_" + QString::number(i), "");
76 QString value = prof.readEntry("Env_Value_" + QString::number(i), ""); 87 QString value = prof.readEntry("Env_Value_" + QString::number(i), "");
77 if (!(name.isEmpty() || value.isEmpty())) { 88 if (!(name.isEmpty() || value.isEmpty())) {
78 QListViewItem *item = new QListViewItem(m_env); 89 QListViewItem *item = new QListViewItem(m_env);
79 item->setText(0, name); 90 item->setText(0, name);
80 item->setText(1, value); 91 item->setText(1, value);
81 m_env->insertItem(item); 92 m_env->insertItem(item);
82 } 93 }
83 } 94 }
84} 95}
85 96
86void ConsoleConfigWidget::save( Profile& prof ) { 97void ConsoleConfigWidget::save( Profile& prof ) {
87 prof.writeEntry( "Command", m_cmd->text()); 98 prof.writeEntry( "Command", m_cmd->text());
88 QListViewItem *item = m_env->firstChild(); 99 QListViewItem *item = m_env->firstChild();
89 int counter = 0; 100 int counter = 0;
90 while (item) { 101 while (item) {
91 QString name = item->text(0); 102 QString name = item->text(0);
92 QString value = item->text(1); 103 QString value = item->text(1);
93 prof.writeEntry("Env_Name_" + QString::number(counter), name); 104 prof.writeEntry("Env_Name_" + QString::number(counter), name);
94 prof.writeEntry("Env_Value_" + QString::number(counter), value); 105 prof.writeEntry("Env_Value_" + QString::number(counter), value);
95 item = item->nextSibling(); 106 item = item->nextSibling();
96 counter++; 107 counter++;
diff --git a/noncore/apps/opie-console/main.cpp b/noncore/apps/opie-console/main.cpp
index b17f8e8..228db57 100644
--- a/noncore/apps/opie-console/main.cpp
+++ b/noncore/apps/opie-console/main.cpp
@@ -8,107 +8,104 @@
8 8
9#include <qpe/qpeapplication.h> 9#include <qpe/qpeapplication.h>
10 10
11#include "mainwindow.h" 11#include "mainwindow.h"
12 12
13//#define FSCKED_DISTRIBUTION 1 13//#define FSCKED_DISTRIBUTION 1
14#ifdef FSCKED_DISTRIBUTION 14#ifdef FSCKED_DISTRIBUTION
15/* 15/*
16 * The Zaurus rom 16 * The Zaurus rom
17 */ 17 */
18class FixIt { 18class FixIt {
19public: 19public:
20 FixIt(); 20 FixIt();
21 ~FixIt(); 21 ~FixIt();
22 void fixIt(); 22 void fixIt();
23 /* no real interested in implementing it */ 23 /* no real interested in implementing it */
24 void breakIt() { 24 void breakIt() {
25 25
26 }; 26 };
27 char* m_file; 27 char* m_file;
28}; 28};
29 29
30FixIt::FixIt() { 30FixIt::FixIt() {
31 /* the new inittab */ 31 /* the new inittab */
32 m_file = "#\n# /etc/inittab 32 m_file = "#\n# /etc/inittab"
33# 33"#"
34 34""
35# 0 - halt (Do NOT set initdefault to this) 35"# 0 - halt (Do NOT set initdefault to this)"
36# 1 - Single user mode 36"# 1 - Single user mode"
37# 2 - Multiuser, without NFS (The same as 3, if you do not have networking) 37"# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)"
38# 3 - Full multiuser mode 38"# 3 - Full multiuser mode"
39# 4 - JavaVM(Intent) developer mode 39"# 4 - JavaVM(Intent) developer mode"
40# 5 - JavaVM(Intent) 40"# 5 - JavaVM(Intent)"
41# 6 - reboot (Do NOT set initdefault to this) 41"# 6 - reboot (Do NOT set initdefault to this)"
42# 42"#"
43id:5:initdefault: 43"id:5:initdefault:"
44 44""
45# Specify things to do when starting 45"# Specify things to do when starting"
46si::sysinit:/etc/rc.d/rc.sysinit 46"si::sysinit:/etc/rc.d/rc.sysinit"
47 47""
48l0:0:wait:/root/etc/rc.d/rc 0 48"l0:0:wait:/root/etc/rc.d/rc 0"
49l1:1:wait:/etc/rc.d/rc 1 49"l1:1:wait:/etc/rc.d/rc 1"
50l2:2:wait:/etc/rc.d/rc 2 50"l2:2:wait:/etc/rc.d/rc 2"
51l3:3:wait:/etc/rc.d/rc 3 51"l3:3:wait:/etc/rc.d/rc 3"
52l4:4:wait:/etc/rc.d/rc 4 52"l4:4:wait:/etc/rc.d/rc 4"
53l5:5:wait:/etc/rc.d/rc 5 53"l5:5:wait:/etc/rc.d/rc 5"
54l6:6:wait:/root/etc/rc.d/rc 6 54"l6:6:wait:/root/etc/rc.d/rc 6"
55 55""
56# Specify things to do before rebooting 56"# Specify things to do before rebooting"
57um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1 57"um::ctrlaltdel:/bin/umount -a -r > /dev/null 2>&1"
58sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1 58"sw::ctrlaltdel:/sbin/swapoff -a > /dev/null 2>&1"
59 59""
60# Specify program to run on ttyS0 60"# Specify program to run on ttyS0"
61s0:24:respawn:/sbin/getty 9600 ttyS0 61"s0:24:respawn:/sbin/getty 9600 ttyS0"
62#pd:5:respawn:/etc/sync/serialctl 62"#pd:5:respawn:/etc/sync/serialctl"
63 63""
64# Specify program to run on tty1 64"# Specify program to run on tty1"
651:2:respawn:/sbin/getty 9600 tty1 65"1:2:respawn:/sbin/getty 9600 tty1"
66ln:345:respawn:survive -l 6 /sbin/launch 66"ln:345:respawn:survive -l 6 /sbin/launch"
67#qt:5:respawn:/sbin/qt 67"#qt:5:respawn:/sbin/qt"
68 68""
69# collie sp. 69"# collie sp."
70sy::respawn:/sbin/shsync\n"; 70"sy::respawn:/sbin/shsync\n";
71
72
73} 71}
74FixIt::~FixIt() { 72FixIt::~FixIt() {
75} 73}
76/* 74/*
77 * the retail Zaurus is broken in many ways 75 * the retail Zaurus is broken in many ways
78 * one is that pppd is listening on our port... 76 * one is that pppd is listening on our port...
79 * we've to stop it from that and then do kill(SIGHUP,1); 77 * we've to stop it from that and then do kill(SIGHUP,1);
80 */ 78 */
81void FixIt::fixIt() { 79void FixIt::fixIt() {
82 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" ); 80 ::rename("/etc/inittab", QPEApplication::qpeDir() + "/etc/inittab" );
83 QFile file( "/etc/inittab" ); 81 QFile file( "/etc/inittab" );
84 if ( file.open(IO_WriteOnly | IO_Raw ) ) { 82 if ( file.open(IO_WriteOnly | IO_Raw ) ) {
85 file.writeBlock(m_file,strlen(m_file) ); 83 file.writeBlock(m_file,strlen(m_file) );
86 } 84 }
87 file.close(); 85 file.close();
88 ::kill( SIGHUP, 1 ); 86 ::kill( SIGHUP, 1 );
89} 87}
90#endif 88#endif
91 89
92
93int main(int argc, char **argv) { 90int main(int argc, char **argv) {
94// too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole"; 91// too bad this gives us trouble the taskbar... argv[0]="embeddedkonsole";
95 QPEApplication app( argc, argv ); 92 QPEApplication app( argc, argv );
96 93
97#ifdef FSCKED_DISTRIBUTION 94#ifdef FSCKED_DISTRIBUTION
98 qWarning("fscked"); 95 qWarning("fscked");
99 FixIt it; 96 FixIt it;
100 it.fixIt(); 97 it.fixIt();
101#endif 98#endif
102 99
103 MainWindow mw; 100 MainWindow mw;
104 mw.setCaption(QObject::tr("Opie Console") ); 101 mw.setCaption(QObject::tr("Opie Console") );
105 app.showMainWidget( &mw ); 102 app.showMainWidget( &mw );
106 103
107 int ap = app.exec(); 104 int ap = app.exec();
108 105
109#ifdef FSCKED_DISTRIBUTION 106#ifdef FSCKED_DISTRIBUTION
110 /* should add a signal handler too */ 107 /* should add a signal handler too */
111 it.breakIt(); 108 it.breakIt();
112#endif 109#endif
113 return ap; 110 return ap;
114} 111}
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index c48116d..3c9603c 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -63,58 +63,58 @@ void MainWindow::initUI() {
63 63
64 m_bar = new QMenuBar( m_tool ); 64 m_bar = new QMenuBar( m_tool );
65 m_console = new QPopupMenu( this ); 65 m_console = new QPopupMenu( this );
66 m_scripts = new QPopupMenu( this ); 66 m_scripts = new QPopupMenu( this );
67 m_sessionsPop= new QPopupMenu( this ); 67 m_sessionsPop= new QPopupMenu( this );
68 m_scriptsPop = new QPopupMenu( this ); 68 m_scriptsPop = new QPopupMenu( this );
69 69
70 /* add a toolbar for icons */ 70 /* add a toolbar for icons */
71 m_icons = new QToolBar(this); 71 m_icons = new QToolBar(this);
72 72
73 /* 73 /*
74 * the settings action 74 * the settings action
75 */ 75 */
76 m_setProfiles = new QAction(tr("Configure Profiles"), 76 m_setProfiles = new QAction(tr("Configure Profiles"),
77 Resource::loadPixmap( "SettingsIcon" ), 77 Resource::loadPixmap( "SettingsIcon" ),
78 QString::null, 0, this, 0); 78 QString::null, 0, this, 0);
79 m_setProfiles->addTo( m_console ); 79 m_setProfiles->addTo( m_console );
80 connect( m_setProfiles, SIGNAL(activated() ), 80 connect( m_setProfiles, SIGNAL(activated() ),
81 this, SLOT(slotConfigure() ) ); 81 this, SLOT(slotConfigure() ) );
82 82
83 m_console->insertSeparator(); 83 m_console->insertSeparator();
84 /* 84 /*
85 * new Action for new sessions 85 * new Action for new sessions
86 */ 86 */
87 QAction* newCon = new QAction(tr("New Connection"), 87 QAction* newCon = new QAction(tr("New Profile"),
88 Resource::loadPixmap( "new" ), 88 Resource::loadPixmap( "new" ),
89 QString::null, 0, this, 0); 89 QString::null, 0, this, 0);
90 newCon->addTo( m_console ); 90 newCon->addTo( m_console );
91 connect( newCon, SIGNAL(activated() ), 91 connect( newCon, SIGNAL(activated() ),
92 this, SLOT(slotNew() ) ); 92 this, SLOT(slotNew() ) );
93 93
94 m_console->insertSeparator(); 94 m_console->insertSeparator();
95 95
96 QAction *saveCon = new QAction(tr("Save Connection"), 96 QAction *saveCon = new QAction( tr("Save Profile" ),
97 Resource::loadPixmap( "save" ), QString::null, 97 Resource::loadPixmap( "save" ), QString::null,
98 0, this, 0 ); 98 0, this, 0 );
99 saveCon->addTo( m_console ); 99 saveCon->addTo( m_console );
100 connect( saveCon, SIGNAL(activated() ), 100 connect( saveCon, SIGNAL(activated() ),
101 this, SLOT(slotSaveSession() ) ); 101 this, SLOT(slotSaveSession() ) );
102 m_console->insertSeparator(); 102 m_console->insertSeparator();
103 103
104 /* 104 /*
105 * connect action 105 * connect action
106 */ 106 */
107 m_connect = new QAction( tr("Connect"), Resource::loadPixmap("console/connected"), 107 m_connect = new QAction( tr("Connect"), Resource::loadPixmap("console/connected"),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 m_connect->addTo( m_console ); 109 m_connect->addTo( m_console );
110 connect(m_connect, SIGNAL(activated() ), 110 connect(m_connect, SIGNAL(activated() ),
111 this, SLOT(slotConnect() ) ); 111 this, SLOT(slotConnect() ) );
112 112
113 /* 113 /*
114 * disconnect action 114 * disconnect action
115 */ 115 */
116 m_disconnect = new QAction( tr("Disconnect"), Resource::loadPixmap("console/notconnected"), 116 m_disconnect = new QAction( tr("Disconnect"), Resource::loadPixmap("console/notconnected"),
117 QString::null, 0, this, 0 ); 117 QString::null, 0, this, 0 );
118 m_disconnect->addTo( m_console ); 118 m_disconnect->addTo( m_console );
119 connect(m_disconnect, SIGNAL(activated() ), 119 connect(m_disconnect, SIGNAL(activated() ),
120 this, SLOT(slotDisconnect() ) ); 120 this, SLOT(slotDisconnect() ) );
@@ -407,48 +407,49 @@ void MainWindow::slotDisconnect() {
407 } 407 }
408} 408}
409 409
410void MainWindow::slotTerminate() { 410void MainWindow::slotTerminate() {
411 if ( currentSession() ) 411 if ( currentSession() )
412 currentSession()->layer()->close(); 412 currentSession()->layer()->close();
413 413
414 slotClose(); 414 slotClose();
415 /* FIXME move to the next session */ 415 /* FIXME move to the next session */
416} 416}
417 417
418 418
419 419
420 420
421 421
422 422
423void MainWindow::slotQuickLaunch() { 423void MainWindow::slotQuickLaunch() {
424 Profile prof = manager()->profile( "default" ); 424 Profile prof = manager()->profile( "default" );
425 if ( prof.name() == "default" ) { 425 if ( prof.name() == "default" ) {
426 create( prof ); 426 create( prof );
427 } else { 427 } else {
428 Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 ); 428 Profile newProf = Profile( "default", "console", "default" , 0, 3, 0 );
429 newProf.setAutoConnect( true ); 429 newProf.setAutoConnect( true );
430 create( newProf ); 430 create( newProf );
431 slotSaveSession();
431 } 432 }
432 433
433} 434}
434 435
435void MainWindow::slotConfigure() { 436void MainWindow::slotConfigure() {
436 ConfigDialog conf( manager()->all(), factory() ); 437 ConfigDialog conf( manager()->all(), factory() );
437 conf.showMaximized(); 438 conf.showMaximized();
438 439
439 int ret = conf.exec(); 440 int ret = conf.exec();
440 441
441 if ( QDialog::Accepted == ret ) { 442 if ( QDialog::Accepted == ret ) {
442 manager()->setProfiles( conf.list() ); 443 manager()->setProfiles( conf.list() );
443 manager()->save(); 444 manager()->save();
444 populateProfiles(); 445 populateProfiles();
445 } 446 }
446} 447}
447/* 448/*
448 * we will remove 449 * we will remove
449 * this window from the tabwidget 450 * this window from the tabwidget
450 * remove it from the list 451 * remove it from the list
451 * delete it 452 * delete it
452 * and set the currentSession() 453 * and set the currentSession()
453 */ 454 */
454void MainWindow::slotClose() { 455void MainWindow::slotClose() {
diff --git a/noncore/apps/opie-console/opie-console.control b/noncore/apps/opie-console/opie-console.control
index 693c72c..852451d 100644
--- a/noncore/apps/opie-console/opie-console.control
+++ b/noncore/apps/opie-console/opie-console.control
@@ -1,11 +1,11 @@
1Package: opie-console 1Package: opie-console
2Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/* 2Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie team <opie@handhelds.org> 5Maintainer: Opie team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: 0.6-$SUB_VERSION 7Version: 0.6-$SUB_VERSION
8Depends: qpe-base, libopie1, lrzsz, opie-keytabs 8Depends: qpe-base, libopie1, opie-console-help-en, lrzsz, opie-keytabs
9License: GPL 9License: GPL
10Description: Opie terminal app 10Description: Opie terminal app
11 11
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro
index 58b29ca..ccf2e08 100644
--- a/noncore/apps/opie-console/opie-console.pro
+++ b/noncore/apps/opie-console/opie-console.pro
@@ -1,38 +1,37 @@
1TEMPLATE = app 1TEMPLATE = app
2 TMAKE_CXXFLAGS+= -DHAVE_OPENPTY 2 TMAKE_CXXFLAGS+= -DHAVE_OPENPTY
3CONFIG += qt warn_on release 3CONFIG += qt warn_on release
4 #CONFIG = qt debug 4 #CONFIG = qt debug
5DESTDIR = $(OPIEDIR)/bin 5DESTDIR = $(OPIEDIR)/bin
6HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \ 6HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \
7 file_layer.h filetransfer.h \ 7 file_layer.h filetransfer.h \
8 metafactory.h \ 8 metafactory.h \
9 session.h \ 9 session.h \
10 mainwindow.h \ 10 mainwindow.h \
11 profile.h \ 11 profile.h \
12 profileconfig.h \ 12 profileconfig.h \
13 profilemanager.h \ 13 profilemanager.h \
14 configwidget.h \
15 tabwidget.h \ 14 tabwidget.h \
16 configdialog.h \ 15 configdialog.h \
17 keytrans.h \ 16 keytrans.h \
18 transferdialog.h \ 17 transferdialog.h \
19 profiledialogwidget.h \ 18 profiledialogwidget.h \
20 profileeditordialog.h \ 19 profileeditordialog.h \
21 default.h \ 20 default.h \
22 iolayerbase.h \ 21 iolayerbase.h \
23 serialconfigwidget.h irdaconfigwidget.h \ 22 serialconfigwidget.h irdaconfigwidget.h \
24 btconfigwidget.h modemconfigwidget.h \ 23 btconfigwidget.h modemconfigwidget.h \
25 atconfigdialog.h dialdialog.h \ 24 atconfigdialog.h dialdialog.h \
26 procctl.h \ 25 procctl.h \
27 function_keyboard.h \ 26 function_keyboard.h \
28 receive_layer.h filereceive.h \ 27 receive_layer.h filereceive.h \
29 script.h \ 28 script.h \
30 dialer.h \ 29 dialer.h \
31 terminalwidget.h \ 30 terminalwidget.h \
32 emulation_handler.h TECommon.h \ 31 emulation_handler.h TECommon.h \
33 TEHistory.h TEScreen.h TEWidget.h \ 32 TEHistory.h TEScreen.h TEWidget.h \
34 TEmuVt102.h TEmulation.h MyPty.h \ 33 TEmuVt102.h TEmulation.h MyPty.h \
35 consoleconfigwidget.h 34 consoleconfigwidget.h
36 35
37SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp io_modem.cpp \ 36SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp io_modem.cpp \
38 file_layer.cpp filetransfer.cpp \ 37 file_layer.cpp filetransfer.cpp \
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 6b607df..e2501a6 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -13,55 +13,55 @@
13namespace { 13namespace {
14 void setCurrent( const QString& str, QComboBox* bo ) { 14 void setCurrent( const QString& str, QComboBox* bo ) {
15 for (int i = 0; i < bo->count(); i++ ) { 15 for (int i = 0; i < bo->count(); i++ ) {
16 if ( bo->text(i) == str ) { 16 if ( bo->text(i) == str ) {
17 bo->setCurrentItem( i ); 17 bo->setCurrentItem( i );
18 } 18 }
19 } 19 }
20 }; 20 };
21} 21}
22 22
23ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, 23ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact,
24 const Profile& prof ) 24 const Profile& prof )
25 : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) 25 : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof )
26{ 26{
27 initUI(); 27 initUI();
28 28
29 // Apply current profile 29 // Apply current profile
30 // plugin_plugin->load(profile); 30 // plugin_plugin->load(profile);
31 // ... (reset profile name line edit etc.) 31 // ... (reset profile name line edit etc.)
32} 32}
33 33
34ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) 34ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact )
35 : QDialog(0, 0, TRUE), m_fact( fact ) 35 : QDialog(0, 0, TRUE), m_fact( fact )
36{ 36{
37 // Default profile 37 // Default profile
38 m_prof = Profile("New Profile", "serial", "default", Profile::Black, Profile::White, Profile::VT102); 38 m_prof = Profile(tr("New Profile"), "serial", "default", Profile::Black, Profile::White, Profile::VT102);
39 39
40 initUI(); 40 initUI();
41 41
42 // Apply current profile 42 // Apply current profile
43 // plugin_plugin->load(profile); 43 // plugin_plugin->load(profile);
44} 44}
45 45
46Profile ProfileEditorDialog::profile() const 46Profile ProfileEditorDialog::profile() const
47{ 47{
48 return m_prof; 48 return m_prof;
49} 49}
50 50
51void ProfileEditorDialog::initUI() 51void ProfileEditorDialog::initUI()
52{ 52{
53 m_con = m_term = m_key = 0l; 53 m_con = m_term = m_key = 0l;
54 54
55 55
56 QVBoxLayout *mainLayout = new QVBoxLayout( this ); 56 QVBoxLayout *mainLayout = new QVBoxLayout( this );
57 tabWidget = new OTabWidget( this ); 57 tabWidget = new OTabWidget( this );
58 tabWidget->setTabStyle(OTabWidget::TextTab); 58 tabWidget->setTabStyle(OTabWidget::TextTab);
59 mainLayout->add(tabWidget); 59 mainLayout->add(tabWidget);
60 60
61 /* base tabs */ 61 /* base tabs */
62 tabprof = new QWidget(this); 62 tabprof = new QWidget(this);
63 m_tabTerm = new QWidget(this); 63 m_tabTerm = new QWidget(this);
64 m_tabCon = new QWidget(this); 64 m_tabCon = new QWidget(this);
65 m_tabKey = new QWidget(this); 65 m_tabKey = new QWidget(this);
66 66
67 m_svCon = new QScrollView( m_tabCon ); 67 m_svCon = new QScrollView( m_tabCon );
@@ -102,53 +102,53 @@ void ProfileEditorDialog::initUI()
102 vbox3->add(m_autoConnect); 102 vbox3->add(m_autoConnect);
103 vbox3->addStretch(1); 103 vbox3->addStretch(1);
104 104
105 m_showconntab = 0; 105 m_showconntab = 0;
106 tabWidget->addTab(tabprof, "", QObject::tr("Profile")); 106 tabWidget->addTab(tabprof, "", QObject::tr("Profile"));
107 tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); 107 tabWidget->addTab(m_tabCon, "", QObject::tr("Connection"));
108 tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); 108 tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal"));
109 tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys")); 109 tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys"));
110 tabWidget->setCurrentTab( tabprof ); 110 tabWidget->setCurrentTab( tabprof );
111 111
112 112
113 // fill the comboboxes 113 // fill the comboboxes
114 QStringList list = m_fact->connectionWidgets(); 114 QStringList list = m_fact->connectionWidgets();
115 QStringList::Iterator it; 115 QStringList::Iterator it;
116 for (it =list.begin(); it != list.end(); ++it ) { 116 for (it =list.begin(); it != list.end(); ++it ) {
117 m_conCmb->insertItem( (*it) ); 117 m_conCmb->insertItem( (*it) );
118 } 118 }
119 list = m_fact->terminalWidgets(); 119 list = m_fact->terminalWidgets();
120 for (it =list.begin(); it != list.end(); ++it ) { 120 for (it =list.begin(); it != list.end(); ++it ) {
121 m_termCmb->insertItem( (*it) ); 121 m_termCmb->insertItem( (*it) );
122 } 122 }
123 123
124 // load profile values 124 // load profile values
125 m_name->setText(m_prof.name()); 125 m_name->setText(m_prof.name());
126 slotConActivated( m_fact->external(m_prof.ioLayerName() ) );
127 slotTermActivated( m_fact->external(m_prof.terminalName() ) );
128 slotKeyActivated( "Default Keyboard" ); 126 slotKeyActivated( "Default Keyboard" );
129 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); 127 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb );
130 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); 128 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
129 slotConActivated( m_fact->external(m_prof.ioLayerName() ) );
130 slotTermActivated( m_fact->external(m_prof.terminalName() ) );
131 m_autoConnect->setChecked(m_prof.autoConnect()); 131 m_autoConnect->setChecked(m_prof.autoConnect());
132 132
133 133
134 // signal and slots 134 // signal and slots
135 connect(m_conCmb, SIGNAL(activated(const QString& ) ), 135 connect(m_conCmb, SIGNAL(activated(const QString& ) ),
136 this, SLOT(slotConActivated(const QString&) ) ); 136 this, SLOT(slotConActivated(const QString&) ) );
137 connect(m_termCmb, SIGNAL(activated(const QString& ) ), 137 connect(m_termCmb, SIGNAL(activated(const QString& ) ),
138 this, SLOT(slotTermActivated(const QString& ) ) ); 138 this, SLOT(slotTermActivated(const QString& ) ) );
139 139
140} 140}
141 141
142ProfileEditorDialog::~ProfileEditorDialog() { 142ProfileEditorDialog::~ProfileEditorDialog() {
143 143
144} 144}
145void ProfileEditorDialog::accept() 145void ProfileEditorDialog::accept()
146{ 146{
147 if(profName().isEmpty()) 147 if(profName().isEmpty())
148 { 148 {
149 QMessageBox::information(this, 149 QMessageBox::information(this,
150 QObject::tr("Invalid profile"), 150 QObject::tr("Invalid profile"),
151 QObject::tr("Please enter a profile name.")); 151 QObject::tr("Please enter a profile name."));
152 return; 152 return;
153 } 153 }
154 // Save profile and plugin profile 154 // Save profile and plugin profile
@@ -178,62 +178,65 @@ QString ProfileEditorDialog::profName()const
178 178
179QCString ProfileEditorDialog::profType()const 179QCString ProfileEditorDialog::profType()const
180{ 180{
181 /*QStringList w = m_fact->configWidgets(); 181 /*QStringList w = m_fact->configWidgets();
182 for(QStringList::Iterator it = w.begin(); it != w.end(); it++) 182 for(QStringList::Iterator it = w.begin(); it != w.end(); it++)
183 if(device_box->currentText() == m_fact->name((*it))) return (*it); 183 if(device_box->currentText() == m_fact->name((*it))) return (*it);
184 */ 184 */
185 return QCString(); 185 return QCString();
186} 186}
187/* 187/*
188 * we need to switch the widget 188 * we need to switch the widget
189 */ 189 */
190void ProfileEditorDialog::slotConActivated( const QString& str ) { 190void ProfileEditorDialog::slotConActivated( const QString& str ) {
191 191
192 delete m_con; 192 delete m_con;
193 193
194 m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() ); 194 m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() );
195 195
196 if ( !m_con ) { 196 if ( !m_con ) {
197 m_con = new NoOptions( str, m_svCon->viewport(), "name"); 197 m_con = new NoOptions( str, m_svCon->viewport(), "name");
198 } 198 }
199 199
200 // FIXME ugly hack right. Right solution would be to look into the layer and see if it 200 // FIXME ugly hack right. Right solution would be to look into the layer and see if it
201 // supports auto connect and then set it as prefered 201 // supports auto connect and then set it as prefered
202 //if ( ( )->layer()->supports()[0] == 1 ) {
203 if ( m_conCmb ->currentText() == tr("Local Console") ) { 202 if ( m_conCmb ->currentText() == tr("Local Console") ) {
204 m_autoConnect->setChecked( true ); 203 m_autoConnect->setChecked( true );
204 m_prof.writeEntry("Terminal", Profile::Linux );
205 slotTermActivated( m_fact->external (m_prof.terminalName() ) );
205 } else { 206 } else {
207 m_prof.writeEntry("Terminal", Profile::VT102 );
208 slotTermActivated( m_fact->external (m_prof.terminalName() ) );
206 m_autoConnect->setChecked( false ); 209 m_autoConnect->setChecked( false );
207 } 210 }
208 211
209 m_con->load( m_prof ); 212 m_con->load( m_prof );
210 m_svCon->addChild( m_con ); 213 m_svCon->addChild( m_con );
211} 214}
212 215
213 216
214/* 217/*
215 * we need to switch the widget 218 * we need to switch the widget
216 */ 219 */
217void ProfileEditorDialog::slotTermActivated( const QString& str ) { 220void ProfileEditorDialog::slotTermActivated( const QString& str ) {
218 221
219 delete m_term; 222 delete m_term;
220 223
221 m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); 224 m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() );
222 225
223 if (m_term) { 226 if ( m_term ) {
224 m_term->load( m_prof ); 227 m_term->load( m_prof );
225 m_svTerm->addChild( m_term ); 228 m_svTerm->addChild( m_term );
226 } 229 }
227} 230}
228 231
229void ProfileEditorDialog::slotKeyActivated(const QString &str) { 232void ProfileEditorDialog::slotKeyActivated(const QString &str) {
230 delete m_key; 233 delete m_key;
231 m_key = m_fact->newKeyboardPlugin( str, m_tabKey ); 234 m_key = m_fact->newKeyboardPlugin( str, m_tabKey );
232 235
233 if (m_key) { 236 if (m_key) {
234 237
235 m_key->load(m_prof); 238 m_key->load(m_prof);
236 m_layKey->addWidget(m_key); 239 m_layKey->addWidget(m_key);
237 } 240 }
238 241
239} 242}
diff --git a/noncore/apps/opie-reader/Prefs.cpp b/noncore/apps/opie-reader/Prefs.cpp
index 825608e..e5320d9 100644
--- a/noncore/apps/opie-reader/Prefs.cpp
+++ b/noncore/apps/opie-reader/Prefs.cpp
@@ -10,49 +10,49 @@
10#include "Prefs.h" 10#include "Prefs.h"
11 11
12#include <qcheckbox.h> 12#include <qcheckbox.h>
13#include <qlabel.h> 13#include <qlabel.h>
14#include <qpushbutton.h> 14#include <qpushbutton.h>
15#include <qspinbox.h> 15#include <qspinbox.h>
16#include <qlayout.h> 16#include <qlayout.h>
17#include <qvariant.h> 17#include <qvariant.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <qwhatsthis.h>
20#include <qcombobox.h> 20#include <qcombobox.h>
21#include <qbuttongroup.h> 21#include <qbuttongroup.h>
22#include <qlineedit.h> 22#include <qlineedit.h>
23#ifdef USEQPE 23#ifdef USEQPE
24#include <qpe/menubutton.h> 24#include <qpe/menubutton.h>
25#include <qpe/fontdatabase.h> 25#include <qpe/fontdatabase.h>
26#else 26#else
27#include <qfontdatabase.h> 27#include <qfontdatabase.h>
28#endif 28#endif
29 29
30CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) 30CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl )
31 : QWidget( parent, name, fl ) 31 : QWidget( parent, name, fl )
32{ 32{
33 QHBoxLayout* hb = new QHBoxLayout(this); 33 QHBoxLayout* hb = new QHBoxLayout(this);
34 QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, "Text", this); 34 QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, tr("Text"), this);
35 hb->addWidget(bg); 35 hb->addWidget(bg);
36 36
37 StripCR = new QCheckBox( bg ); 37 StripCR = new QCheckBox( bg );
38 StripCR->setText( tr( "Strip CR" ) ); 38 StripCR->setText( tr( "Strip CR" ) );
39 39
40 Dehyphen = new QCheckBox( bg ); 40 Dehyphen = new QCheckBox( bg );
41 Dehyphen->setText( tr( "Dehyphen" ) ); 41 Dehyphen->setText( tr( "Dehyphen" ) );
42 42
43 SingleSpace = new QCheckBox( bg ); 43 SingleSpace = new QCheckBox( bg );
44 SingleSpace->setText( tr( "Single Space" ) ); 44 SingleSpace->setText( tr( "Single Space" ) );
45 45
46 Unindent = new QCheckBox( bg ); 46 Unindent = new QCheckBox( bg );
47 Unindent->setText( tr( "Unindent" ) ); 47 Unindent->setText( tr( "Unindent" ) );
48 48
49 Reparagraph = new QCheckBox( bg ); 49 Reparagraph = new QCheckBox( bg );
50 Reparagraph->setText( tr( "Reparagraph" ) ); 50 Reparagraph->setText( tr( "Reparagraph" ) );
51 51
52 DoubleSpace = new QCheckBox( bg ); 52 DoubleSpace = new QCheckBox( bg );
53 DoubleSpace->setText( tr( "Double Space" ) ); 53 DoubleSpace->setText( tr( "Double Space" ) );
54 54
55 Remap = new QCheckBox( bg ); 55 Remap = new QCheckBox( bg );
56 Remap->setText( tr( "Remap" ) ); 56 Remap->setText( tr( "Remap" ) );
57 57
58 Embolden = new QCheckBox( bg ); 58 Embolden = new QCheckBox( bg );
@@ -344,61 +344,61 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
344 annotation->setText( tr( "Annotation" ) ); 344 annotation->setText( tr( "Annotation" ) );
345 345
346 dictionary = new QCheckBox( bg ); 346 dictionary = new QCheckBox( bg );
347 dictionary->setText( tr( "Dictionary" ) ); 347 dictionary->setText( tr( "Dictionary" ) );
348 348
349 clipboard = new QCheckBox( bg ); 349 clipboard = new QCheckBox( bg );
350 clipboard->setText( tr( "Clipboard" ) ); 350 clipboard->setText( tr( "Clipboard" ) );
351 351
352} 352}
353 353
354CMiscPrefs::~CMiscPrefs() 354CMiscPrefs::~CMiscPrefs()
355{ 355{
356 // no need to delete child widgets, Qt does it all for us 356 // no need to delete child widgets, Qt does it all for us
357} 357}
358*/ 358*/
359 359
360CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) 360CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
361 : QWidget( parent, name, fl ) 361 : QWidget( parent, name, fl )
362{ 362{
363 363
364 QGridLayout* hl = new QGridLayout(this,1,2); 364 QGridLayout* hl = new QGridLayout(this,1,2);
365 365
366 hl->setMargin( 0 ); 366 hl->setMargin( 0 );
367 367
368 QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Select Action", this); 368 QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, tr("Select Action"), this);
369 hl->addWidget( gb, 0, 0 ); 369 hl->addWidget( gb, 0, 0 );
370 370
371 annotation = new QCheckBox( gb ); 371 annotation = new QCheckBox( gb );
372 annotation->setText( tr( "Annotation" ) ); 372 annotation->setText( tr( "Annotation" ) );
373 373
374 dictionary = new QCheckBox( gb ); 374 dictionary = new QCheckBox( gb );
375 dictionary->setText( tr( "Dictionary" ) ); 375 dictionary->setText( tr( "Dictionary" ) );
376 376
377 clipboard = new QCheckBox( gb ); 377 clipboard = new QCheckBox( gb );
378 clipboard->setText( tr( "Clipboard" ) ); 378 clipboard->setText( tr( "Clipboard" ) );
379 379
380 QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, "Plucker", this); 380 QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, tr("Plucker"), this);
381 hl->addWidget( bg, 0 , 1 ); 381 hl->addWidget( bg, 0 , 1 );
382 382
383 Depluck = new QCheckBox( bg ); 383 Depluck = new QCheckBox( bg );
384 Depluck->setText( tr( "Depluck" ) ); 384 Depluck->setText( tr( "Depluck" ) );
385 385
386 Dejpluck = new QCheckBox( bg ); 386 Dejpluck = new QCheckBox( bg );
387 Dejpluck->setText( tr( "Dejpluck" ) ); 387 Dejpluck->setText( tr( "Dejpluck" ) );
388 388
389 Continuous = new QCheckBox( bg ); 389 Continuous = new QCheckBox( bg );
390 Continuous->setText( tr( "Continuous" ) ); 390 Continuous->setText( tr( "Continuous" ) );
391 391
392 392
393/* 393/*
394 394
395 QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Navigation", this); 395 QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Navigation", this);
396 TextLabel = new QLabel( gb ); 396 TextLabel = new QLabel( gb );
397 TextLabel->setText( tr( "Overlap" ) ); 397 TextLabel->setText( tr( "Overlap" ) );
398 QSpinBox* sb = new QSpinBox( gb ); 398 QSpinBox* sb = new QSpinBox( gb );
399 399
400 Internationalisation 400 Internationalisation
401 Ideogram/Word 401 Ideogram/Word
402 Set Width 402 Set Width
403 Set Encoding 403 Set Encoding
404 Set Font 404 Set Font
@@ -463,174 +463,174 @@ CInterPrefs::CInterPrefs( QWidget* parent, const char* name, WFlags fl )
463 ideogramwidth->setRange(1,200); 463 ideogramwidth->setRange(1,200);
464 464
465 propfontchange = new QCheckBox( gb ); 465 propfontchange = new QCheckBox( gb );
466 propfontchange->setText( tr( "Apply font\nto dialogs" ) ); 466 propfontchange->setText( tr( "Apply font\nto dialogs" ) );
467 467
468 TextLabel = new QLabel( gb ); 468 TextLabel = new QLabel( gb );
469 TextLabel->setText( tr( "Encoding" ) ); 469 TextLabel->setText( tr( "Encoding" ) );
470#ifdef USECOMBO 470#ifdef USECOMBO
471 encoding = new QComboBox(gb); 471 encoding = new QComboBox(gb);
472#else 472#else
473 encoding = new MenuButton(gb); 473 encoding = new MenuButton(gb);
474#endif 474#endif
475 encoding->insertItem("Ascii"); 475 encoding->insertItem("Ascii");
476 encoding->insertItem("UTF-8"); 476 encoding->insertItem("UTF-8");
477 encoding->insertItem("UCS-2(BE)"); 477 encoding->insertItem("UCS-2(BE)");
478 encoding->insertItem("USC-2(LE)"); 478 encoding->insertItem("USC-2(LE)");
479 encoding->insertItem("Palm"); 479 encoding->insertItem("Palm");
480 for (unicodetable::iterator iter = unicodetable::begin(); iter != unicodetable::end(); iter++) 480 for (unicodetable::iterator iter = unicodetable::begin(); iter != unicodetable::end(); iter++)
481 { 481 {
482 encoding->insertItem(iter->mime); 482 encoding->insertItem(iter->mime);
483 } 483 }
484 484
485 QVBoxLayout* vb = new QVBoxLayout; 485 QVBoxLayout* vb = new QVBoxLayout;
486 486
487 gb = new QGroupBox(1, Qt::Horizontal, "Dictionary", this); 487 gb = new QGroupBox(1, Qt::Horizontal, tr("Dictionary"), this);
488 488
489 TextLabel = new QLabel( gb ); 489 TextLabel = new QLabel( gb );
490 TextLabel->setText( tr( "Application" ) ); 490 TextLabel->setText( tr( "Application" ) );
491 application = new QLineEdit(gb); 491 application = new QLineEdit(gb);
492 application->setFixedWidth(80); 492 application->setFixedWidth(80);
493 493
494 TextLabel = new QLabel( gb ); 494 TextLabel = new QLabel( gb );
495 TextLabel->setText( tr( "Message" ) ); 495 TextLabel->setText( tr( "Message" ) );
496 message = new QLineEdit(gb); 496 message = new QLineEdit(gb);
497 message->setFixedWidth(80); 497 message->setFixedWidth(80);
498// message->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 498// message->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
499 twotouch = new QCheckBox( gb ); 499 twotouch = new QCheckBox( gb );
500 twotouch->setText( tr( "Two/One\nTouch" ) ); 500 twotouch->setText( tr( "Two/One\nTouch" ) );
501 501
502 SwapMouse = new QCheckBox( gb ); 502 SwapMouse = new QCheckBox( gb );
503 SwapMouse->setText("Swap Tap\nActions"); 503 SwapMouse->setText(tr("Swap Tap\nActions") );
504 504
505 505
506 vb->addWidget(gb); 506 vb->addWidget(gb);
507 507
508// vb->addStretch(); 508// vb->addStretch();
509 hb->addLayout(vb); 509 hb->addLayout(vb);
510} 510}
511 511
512CInterPrefs::~CInterPrefs() 512CInterPrefs::~CInterPrefs()
513{ 513{
514 // no need to delete child widgets, Qt does it all for us 514 // no need to delete child widgets, Qt does it all for us
515} 515}
516 516
517 517
518 518
519#ifdef USECOMBO 519#ifdef USECOMBO
520void CButtonPrefs::populate(QComboBox *mb) 520void CButtonPrefs::populate(QComboBox *mb)
521#else 521#else
522void CButtonPrefs::populate(MenuButton *mb) 522void CButtonPrefs::populate(MenuButton *mb)
523#endif 523#endif
524{ 524{
525 mb->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 525 mb->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
526 mb->insertItem("<Nothing>"); 526 mb->insertItem(tr("<Nothing>") );
527 mb->insertItem("Open file"); 527 mb->insertItem(tr("Open file") );
528 mb->insertItem("Autoscroll"); 528 mb->insertItem(tr("Autoscroll") );
529 mb->insertItem("Bookmark"); 529 mb->insertItem(tr("Bookmark") );
530 mb->insertItem("Annotate"); 530 mb->insertItem(tr("Annotate") );
531 mb->insertItem("Fullscreen"); 531 mb->insertItem(tr("Fullscreen") );
532 532
533 mb->insertItem("Zoom in"); 533 mb->insertItem(tr("Zoom in") );
534 mb->insertItem("Zoom out"); 534 mb->insertItem(tr("Zoom out") );
535 mb->insertItem("Back"); 535 mb->insertItem(tr("Back") );
536 mb->insertItem("Forward"); 536 mb->insertItem(tr("Forward") );
537 mb->insertItem("Home"); 537 mb->insertItem(tr("Home") );
538 mb->insertItem("Page up"); 538 mb->insertItem(tr("Page up") );
539 mb->insertItem("Page down"); 539 mb->insertItem(tr("Page down") );
540 mb->insertItem("Line up"); 540 mb->insertItem(tr("Line up") );
541 mb->insertItem("Line down"); 541 mb->insertItem(tr("Line down") );
542 mb->insertItem("Beginning"); 542 mb->insertItem(tr("Beginning") );
543 mb->insertItem("End"); 543 mb->insertItem(tr("End") );
544} 544}
545 545
546CButtonPrefs::CButtonPrefs( QWidget* parent, const char* name, WFlags fl ) 546CButtonPrefs::CButtonPrefs( QWidget* parent, const char* name, WFlags fl )
547 : QWidget( parent, name, fl ) 547 : QWidget( parent, name, fl )
548{ 548{
549 549
550 QGridLayout* hl = new QGridLayout(this,10,2); 550 QGridLayout* hl = new QGridLayout(this,10,2);
551 551
552 hl->setMargin( 0 ); 552 hl->setMargin( 0 );
553 553
554 QLabel* ql = new QLabel("Escape Button", this); 554 QLabel* ql = new QLabel(tr("Escape Button"), this);
555 hl->addWidget(ql, 0, 0, Qt::AlignBottom); 555 hl->addWidget(ql, 0, 0, Qt::AlignBottom);
556#ifdef USECOMBO 556#ifdef USECOMBO
557 escapeAction = new QComboBox( this ); 557 escapeAction = new QComboBox( this );
558#else 558#else
559 escapeAction = new MenuButton( this ); 559 escapeAction = new MenuButton( this );
560#endif 560#endif
561 populate(escapeAction); 561 populate(escapeAction);
562 hl->addWidget(escapeAction, 1, 0, Qt::AlignTop | Qt::AlignLeft); 562 hl->addWidget(escapeAction, 1, 0, Qt::AlignTop | Qt::AlignLeft);
563 563
564 ql = new QLabel("Space Button", this); 564 ql = new QLabel(tr("Space Button"), this);
565 hl->addWidget(ql, 2, 0, Qt::AlignBottom); 565 hl->addWidget(ql, 2, 0, Qt::AlignBottom);
566#ifdef USECOMBO 566#ifdef USECOMBO
567 spaceAction = new QComboBox( this ); 567 spaceAction = new QComboBox( this );
568#else 568#else
569 spaceAction = new MenuButton( this ); 569 spaceAction = new MenuButton( this );
570#endif 570#endif
571 populate(spaceAction); 571 populate(spaceAction);
572 hl->addWidget(spaceAction, 3, 0, Qt::AlignTop | Qt::AlignLeft); 572 hl->addWidget(spaceAction, 3, 0, Qt::AlignTop | Qt::AlignLeft);
573 573
574 ql = new QLabel("Return Button", this); 574 ql = new QLabel(tr("Return Button"), this);
575 hl->addWidget(ql, 2, 1, Qt::AlignBottom); 575 hl->addWidget(ql, 2, 1, Qt::AlignBottom);
576#ifdef USECOMBO 576#ifdef USECOMBO
577 returnAction = new QComboBox( this ); 577 returnAction = new QComboBox( this );
578#else 578#else
579 returnAction = new MenuButton( this ); 579 returnAction = new MenuButton( this );
580#endif 580#endif
581 populate(returnAction); 581 populate(returnAction);
582 hl->addWidget(returnAction, 3, 1, Qt::AlignTop | Qt::AlignLeft); 582 hl->addWidget(returnAction, 3, 1, Qt::AlignTop | Qt::AlignLeft);
583 583
584 ql = new QLabel("Left Arrow", this); 584 ql = new QLabel(tr("Left Arrow"), this);
585 hl->addWidget(ql, 4, 0, Qt::AlignBottom); 585 hl->addWidget(ql, 4, 0, Qt::AlignBottom);
586#ifdef USECOMBO 586#ifdef USECOMBO
587 leftAction = new QComboBox( this ); 587 leftAction = new QComboBox( this );
588#else 588#else
589 leftAction = new MenuButton( this ); 589 leftAction = new MenuButton( this );
590#endif 590#endif
591 populate(leftAction); 591 populate(leftAction);
592 hl->addWidget(leftAction, 5, 0, Qt::AlignTop | Qt::AlignLeft); 592 hl->addWidget(leftAction, 5, 0, Qt::AlignTop | Qt::AlignLeft);
593 leftScroll = new QCheckBox( tr("Scroll Speed"), this ); 593 leftScroll = new QCheckBox( tr("Scroll Speed"), this );
594 hl->addWidget(leftScroll, 6, 0, Qt::AlignTop | Qt::AlignLeft); 594 hl->addWidget(leftScroll, 6, 0, Qt::AlignTop | Qt::AlignLeft);
595 595
596 ql = new QLabel("Right Arrow", this); 596 ql = new QLabel(tr("Right Arrow"), this);
597 hl->addWidget(ql, 4, 1, Qt::AlignBottom); 597 hl->addWidget(ql, 4, 1, Qt::AlignBottom);
598#ifdef USECOMBO 598#ifdef USECOMBO
599 rightAction = new QComboBox( this ); 599 rightAction = new QComboBox( this );
600#else 600#else
601 rightAction = new MenuButton( this ); 601 rightAction = new MenuButton( this );
602#endif 602#endif
603 populate(rightAction); 603 populate(rightAction);
604 hl->addWidget(rightAction, 5, 1, Qt::AlignTop | Qt::AlignLeft); 604 hl->addWidget(rightAction, 5, 1, Qt::AlignTop | Qt::AlignLeft);
605 rightScroll = new QCheckBox( tr("Scroll Speed"), this ); 605 rightScroll = new QCheckBox( tr("Scroll Speed"), this );
606 hl->addWidget(rightScroll, 6, 1, Qt::AlignTop | Qt::AlignLeft); 606 hl->addWidget(rightScroll, 6, 1, Qt::AlignTop | Qt::AlignLeft);
607 607
608 ql = new QLabel("Down Arrow", this); 608 ql = new QLabel(tr("Down Arrow"), this);
609 hl->addWidget(ql, 7, 0, Qt::AlignBottom); 609 hl->addWidget(ql, 7, 0, Qt::AlignBottom);
610#ifdef USECOMBO 610#ifdef USECOMBO
611 downAction = new QComboBox( this ); 611 downAction = new QComboBox( this );
612#else 612#else
613 downAction = new MenuButton( this ); 613 downAction = new MenuButton( this );
614#endif 614#endif
615 populate(downAction); 615 populate(downAction);
616 hl->addWidget(downAction, 8, 0, Qt::AlignTop | Qt::AlignLeft); 616 hl->addWidget(downAction, 8, 0, Qt::AlignTop | Qt::AlignLeft);
617 downScroll = new QCheckBox( tr("Scroll Speed"), this ); 617 downScroll = new QCheckBox( tr("Scroll Speed"), this );
618 hl->addWidget(downScroll, 9, 0, Qt::AlignTop | Qt::AlignLeft); 618 hl->addWidget(downScroll, 9, 0, Qt::AlignTop | Qt::AlignLeft);
619 619
620 ql = new QLabel("Up Arrow", this); 620 ql = new QLabel(tr("Up Arrow"), this);
621 hl->addWidget(ql, 7, 1, Qt::AlignBottom); 621 hl->addWidget(ql, 7, 1, Qt::AlignBottom);
622#ifdef USECOMBO 622#ifdef USECOMBO
623 upAction = new QComboBox( this ); 623 upAction = new QComboBox( this );
624#else 624#else
625 upAction = new MenuButton( this ); 625 upAction = new MenuButton( this );
626#endif 626#endif
627 populate(upAction); 627 populate(upAction);
628 hl->addWidget(upAction, 8, 1, Qt::AlignTop | Qt::AlignLeft); 628 hl->addWidget(upAction, 8, 1, Qt::AlignTop | Qt::AlignLeft);
629 upScroll = new QCheckBox( tr("Scroll Speed"), this ); 629 upScroll = new QCheckBox( tr("Scroll Speed"), this );
630 hl->addWidget(upScroll, 9, 1, Qt::AlignTop | Qt::AlignLeft); 630 hl->addWidget(upScroll, 9, 1, Qt::AlignTop | Qt::AlignLeft);
631} 631}
632 632
633CButtonPrefs::~CButtonPrefs() 633CButtonPrefs::~CButtonPrefs()
634{ 634{
635 // no need to delete child widgets, Qt does it all for us 635 // no need to delete child widgets, Qt does it all for us
636} 636}
diff --git a/noncore/apps/opie-reader/Prefs.h b/noncore/apps/opie-reader/Prefs.h
index 37d8c9e..8fef2f5 100644
--- a/noncore/apps/opie-reader/Prefs.h
+++ b/noncore/apps/opie-reader/Prefs.h
@@ -14,149 +14,150 @@
14#include <qtabdialog.h> 14#include <qtabdialog.h>
15#include <qtabwidget.h> 15#include <qtabwidget.h>
16#include <qspinbox.h> 16#include <qspinbox.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qcombobox.h> 18#include <qcombobox.h>
19#include <qlineedit.h> 19#include <qlineedit.h>
20#ifdef USEQPE 20#ifdef USEQPE
21#include <qpe/menubutton.h> 21#include <qpe/menubutton.h>
22#endif 22#endif
23//#include "opie.h" 23//#include "opie.h"
24 24
25//#ifdef OPIE 25//#ifdef OPIE
26#define USECOMBO 26#define USECOMBO
27//#endif 27//#endif
28 28
29class QVBoxLayout; 29class QVBoxLayout;
30class QHBoxLayout; 30class QHBoxLayout;
31class QGridLayout; 31class QGridLayout;
32//class QCheckBox; 32//class QCheckBox;
33class QLabel; 33class QLabel;
34//class QSpinBox; 34//class QSpinBox;
35 35
36class CLayoutPrefs : public QWidget 36class CLayoutPrefs : public QWidget
37{ 37{
38 38 Q_OBJECT
39public: 39public:
40 40
41 friend class CPrefs; 41 friend class CPrefs;
42 42
43 CLayoutPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 43 CLayoutPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
44 ~CLayoutPrefs(); 44 ~CLayoutPrefs();
45 45
46 QCheckBox* StripCR; 46 QCheckBox* StripCR;
47 QCheckBox* Dehyphen; 47 QCheckBox* Dehyphen;
48 QCheckBox* SingleSpace; 48 QCheckBox* SingleSpace;
49 QCheckBox* Unindent; 49 QCheckBox* Unindent;
50 QCheckBox* Reparagraph; 50 QCheckBox* Reparagraph;
51 QCheckBox* DoubleSpace; 51 QCheckBox* DoubleSpace;
52 QCheckBox* Remap; 52 QCheckBox* Remap;
53 QCheckBox* Embolden; 53 QCheckBox* Embolden;
54 QCheckBox* FullJustify; 54 QCheckBox* FullJustify;
55}; 55};
56 56
57class CLayoutPrefs2 : public QWidget 57class CLayoutPrefs2 : public QWidget
58{ 58{
59 59 Q_OBJECT
60public: 60public:
61 61
62 friend class CPrefs; 62 friend class CPrefs;
63 63
64 CLayoutPrefs2( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 64 CLayoutPrefs2( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
65 ~CLayoutPrefs2(); 65 ~CLayoutPrefs2();
66 66
67 QSpinBox* ParaLead; 67 QSpinBox* ParaLead;
68 QSpinBox* LineLead; 68 QSpinBox* LineLead;
69 QSpinBox* Indent; 69 QSpinBox* Indent;
70 QSpinBox* Margin, *gfxzoom, *pageoverlap; 70 QSpinBox* Margin, *gfxzoom, *pageoverlap;
71#ifdef USECOMBO 71#ifdef USECOMBO
72 QComboBox *Markup, *fontselector; 72 QComboBox *Markup, *fontselector;
73#else 73#else
74 MenuButton *Markup, *fontselector; 74 MenuButton *Markup, *fontselector;
75#endif 75#endif
76}; 76};
77 77
78/* 78/*
79class CPluckerPrefs : public QWidget 79class CPluckerPrefs : public QWidget
80{ 80{
81 81
82public: 82public:
83 83
84 friend class CPrefs; 84 friend class CPrefs;
85 85
86 CPluckerPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 86 CPluckerPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
87 ~CPluckerPrefs(); 87 ~CPluckerPrefs();
88 88
89 QCheckBox* Depluck; 89 QCheckBox* Depluck;
90 QCheckBox* Dejpluck; 90 QCheckBox* Dejpluck;
91 QCheckBox* Continuous; 91 QCheckBox* Continuous;
92protected: 92protected:
93 93
94 QHBoxLayout* Layout5; 94 QHBoxLayout* Layout5;
95 QVBoxLayout* Layout11; 95 QVBoxLayout* Layout11;
96 QGridLayout* Layout4; 96 QGridLayout* Layout4;
97 97
98}; 98};
99*/ 99*/
100class CMiscPrefs : public QWidget 100class CMiscPrefs : public QWidget
101{ 101{
102 102 Q_OBJECT
103public: 103public:
104 104
105 friend class CPrefs; 105 friend class CPrefs;
106 106
107 CMiscPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 107 CMiscPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
108 ~CMiscPrefs(); 108 ~CMiscPrefs();
109 109
110 QCheckBox *annotation, *dictionary, *clipboard; 110 QCheckBox *annotation, *dictionary, *clipboard;
111 QCheckBox *Depluck, *Dejpluck, *Continuous; 111 QCheckBox *Depluck, *Dejpluck, *Continuous;
112}; 112};
113 113
114class CButtonPrefs : public QWidget 114class CButtonPrefs : public QWidget
115{ 115{
116 Q_OBJECT
116#ifdef USECOMBO 117#ifdef USECOMBO
117 void populate(QComboBox*); 118 void populate(QComboBox*);
118#else 119#else
119 void populate(MenuButton*); 120 void populate(MenuButton*);
120#endif 121#endif
121public: 122public:
122 123
123 friend class CPrefs; 124 friend class CPrefs;
124 125
125 CButtonPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 126 CButtonPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
126 ~CButtonPrefs(); 127 ~CButtonPrefs();
127 128
128#ifdef USECOMBO 129#ifdef USECOMBO
129 QComboBox *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; 130 QComboBox *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction;
130#else 131#else
131 MenuButton *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; 132 MenuButton *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction;
132#endif 133#endif
133 QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; 134 QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll;
134}; 135};
135 136
136class CInterPrefs : public QWidget 137class CInterPrefs : public QWidget
137{ 138{
138 139 Q_OBJECT
139public: 140public:
140 141
141 friend class CPrefs; 142 friend class CPrefs;
142 143
143 CInterPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 144 CInterPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
144 ~CInterPrefs(); 145 ~CInterPrefs();
145 146
146 QCheckBox *ideogram, *propfontchange, *SwapMouse, *twotouch; 147 QCheckBox *ideogram, *propfontchange, *SwapMouse, *twotouch;
147#ifdef USECOMBO 148#ifdef USECOMBO
148 QComboBox* encoding; 149 QComboBox* encoding;
149#else 150#else
150 MenuButton* encoding; 151 MenuButton* encoding;
151#endif 152#endif
152 QSpinBox* ideogramwidth; 153 QSpinBox* ideogramwidth;
153 QLineEdit *application, *message; 154 QLineEdit *application, *message;
154}; 155};
155 156
156 157
157class CPrefs : public QDialog 158class CPrefs : public QDialog
158{ 159{
159Q_OBJECT 160Q_OBJECT
160 CLayoutPrefs* layout; 161 CLayoutPrefs* layout;
161 CLayoutPrefs2* layout2; 162 CLayoutPrefs2* layout2;
162 CMiscPrefs* misc; 163 CMiscPrefs* misc;
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index af1da27..087ce00 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -2580,49 +2580,49 @@ void QTReaderApp::save()
2580 fm.saveFile( *doc, rt ); 2580 fm.saveFile( *doc, rt );
2581} 2581}
2582*/ 2582*/
2583 2583
2584void QTReaderApp::clear() 2584void QTReaderApp::clear()
2585{ 2585{
2586// if (doc != 0) 2586// if (doc != 0)
2587// { 2587// {
2588// QMessageBox::information(this, PROGNAME, "Deleting doc", 1); 2588// QMessageBox::information(this, PROGNAME, "Deleting doc", 1);
2589 //delete doc; 2589 //delete doc;
2590// QMessageBox::information(this, PROGNAME, "Deleted doc", 1); 2590// QMessageBox::information(this, PROGNAME, "Deleted doc", 1);
2591 //doc = 0; 2591 //doc = 0;
2592 // } 2592 // }
2593 reader->clear(); 2593 reader->clear();
2594} 2594}
2595 2595
2596void QTReaderApp::updateCaption() 2596void QTReaderApp::updateCaption()
2597{ 2597{
2598// if ( !doc ) 2598// if ( !doc )
2599 //setCaption( tr("QTReader") ); 2599 //setCaption( tr("QTReader") );
2600// else { 2600// else {
2601 //QString s = doc->name(); 2601 //QString s = doc->name();
2602 //if ( s.isEmpty() ) 2602 //if ( s.isEmpty() )
2603 // s = tr( "Unnamed" ); 2603 // s = tr( "Unnamed" );
2604 setCaption( reader->m_string + " - " + tr(SHORTPROGNAME) ); 2604 setCaption( reader->m_string + " - " + tr("Reader") );
2605// } 2605// }
2606} 2606}
2607 2607
2608void QTReaderApp::setDocument(const QString& fileref) 2608void QTReaderApp::setDocument(const QString& fileref)
2609{ 2609{
2610 bFromDocView = TRUE; 2610 bFromDocView = TRUE;
2611//QMessageBox::information(0, "setDocument", fileref); 2611//QMessageBox::information(0, "setDocument", fileref);
2612 openFile(fileref); 2612 openFile(fileref);
2613// showEditTools(); 2613// showEditTools();
2614} 2614}
2615 2615
2616void QTReaderApp::closeEvent( QCloseEvent *e ) 2616void QTReaderApp::closeEvent( QCloseEvent *e )
2617{ 2617{
2618// qDebug("Close event"); 2618// qDebug("Close event");
2619 if (m_fullscreen) 2619 if (m_fullscreen)
2620 { 2620 {
2621 m_fullscreen = false; 2621 m_fullscreen = false;
2622 showEditTools(); 2622 showEditTools();
2623 e->accept(); 2623 e->accept();
2624 } 2624 }
2625 else if (m_dontSave) 2625 else if (m_dontSave)
2626 { 2626 {
2627 e->accept(); 2627 e->accept();
2628 } 2628 }
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.h b/noncore/apps/opie-reader/ToolbarPrefs.h
index 297d63a..9571c28 100644
--- a/noncore/apps/opie-reader/ToolbarPrefs.h
+++ b/noncore/apps/opie-reader/ToolbarPrefs.h
@@ -150,49 +150,49 @@ class CMarkBarPrefs : public QWidget
150 150
151}; 151};
152 152
153class CIndBarPrefs : public QWidget 153class CIndBarPrefs : public QWidget
154{ 154{
155 Q_OBJECT 155 Q_OBJECT
156 Config& config; 156 Config& config;
157 QCheckBox *indannotate; 157 QCheckBox *indannotate;
158 158
159 bool m_isChanged; 159 bool m_isChanged;
160 160
161 private slots: 161 private slots:
162 void isChanged(int _v) { m_isChanged = true; } 162 void isChanged(int _v) { m_isChanged = true; }
163 163
164 public: 164 public:
165 CIndBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 165 CIndBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
166 ~CIndBarPrefs(); 166 ~CIndBarPrefs();
167 void saveall(); 167 void saveall();
168 bool isChanged() { return m_isChanged; } 168 bool isChanged() { return m_isChanged; }
169 169
170}; 170};
171 171
172class CMiscBarPrefs : public QWidget 172class CMiscBarPrefs : public QWidget
173{ 173{
174 174 Q_OBJECT
175public: 175public:
176 176
177 CMiscBarPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 177 CMiscBarPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
178 ~CMiscBarPrefs(); 178 ~CMiscBarPrefs();
179 179
180#ifdef USECOMBO 180#ifdef USECOMBO
181 QComboBox *tbpolicy, *tbposition; 181 QComboBox *tbpolicy, *tbposition;
182#else 182#else
183 MenuButton *tbpolicy, *tbposition; 183 MenuButton *tbpolicy, *tbposition;
184#endif 184#endif
185 QCheckBox *tbmovable, *floating; 185 QCheckBox *tbmovable, *floating;
186}; 186};
187 187
188class CBarPrefs : public QDialog 188class CBarPrefs : public QDialog
189{ 189{
190 Q_OBJECT 190 Q_OBJECT
191 ; 191 ;
192 CMiscBarPrefs* misc; 192 CMiscBarPrefs* misc;
193 CFileBarPrefs* filebar; 193 CFileBarPrefs* filebar;
194 CNavBarPrefs* navbar; 194 CNavBarPrefs* navbar;
195 CViewBarPrefs* viewbar; 195 CViewBarPrefs* viewbar;
196 CMarkBarPrefs* markbar; 196 CMarkBarPrefs* markbar;
197 CIndBarPrefs* indbar; 197 CIndBarPrefs* indbar;
198 Config config; 198 Config config;
diff --git a/noncore/apps/opie-reader/opie-reader.control b/noncore/apps/opie-reader/opie-reader.control
index 9996297..b7b0e8f 100644
--- a/noncore/apps/opie-reader/opie-reader.control
+++ b/noncore/apps/opie-reader/opie-reader.control
@@ -1,10 +1,10 @@
1Package: opie-reader 1Package: opie-reader
2Files: bin/reader apps/Applications/opie-reader.desktop pics/opie-reader/* 2Files: bin/reader apps/Applications/opie-reader.desktop pics/opie-reader/*
3Priority: optional 3Priority: optional
4Section: applications 4Section: applications
5Maintainer: Tim Wentford <timwentford@hotmail.com> 5Maintainer: Tim Wentford <timwentford@hotmail.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9License: GPL 8License: GPL
10Description: E-Book reader 9Description: E-Book reader
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/opie-write/opie-write.control b/noncore/apps/opie-write/opie-write.control
index 52b518a..7b37671 100644
--- a/noncore/apps/opie-write/opie-write.control
+++ b/noncore/apps/opie-write/opie-write.control
@@ -1,10 +1,10 @@
1Package: opie-write 1Package: opie-write
2Files: bin/opie-write apps/Applications/opie-write.desktop pics/opie-write 2Files: bin/opie-write apps/Applications/opie-write.desktop pics/opie-write
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: L.J. Potter <ljp@llornkcor.com> 5Maintainer: L.J. Potter <ljp@llornkcor.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Rich Text Editor 8Description: Rich Text Editor
10 The rich text editor for the Opie environment. 9 The rich text editor for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/oxygen/opie-oxygen.control b/noncore/apps/oxygen/opie-oxygen.control
index 1eff80b..6d40d1b 100644
--- a/noncore/apps/oxygen/opie-oxygen.control
+++ b/noncore/apps/oxygen/opie-oxygen.control
@@ -1,10 +1,10 @@
1Package: opie-oxygen 1Package: opie-oxygen
2Files: bin/oxygen apps/Applications/oxygen.desktop pics/oxygen/oxygen.png share/oxygen/* 2Files: bin/oxygen apps/Applications/oxygen.desktop pics/oxygen/oxygen.png share/oxygen/*
3Priority: optional 3Priority: optional
4Section: applications 4Section: applications
5Maintainer: Carsten Niehaus <cniehaus@handhelds.org> 5Maintainer: Carsten Niehaus <cniehaus@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Periodic System of the Elements 8Description: Periodic System of the Elements
10 The chemistry application for the Opie-environment 9 The chemistry application for the Opie-environment
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tableviewer/opie-tableviewer.control b/noncore/apps/tableviewer/opie-tableviewer.control
index b5495e1..aba9b8d 100644
--- a/noncore/apps/tableviewer/opie-tableviewer.control
+++ b/noncore/apps/tableviewer/opie-tableviewer.control
@@ -1,11 +1,11 @@
1Package: opie-tableviewer 1Package: opie-tableviewer
2Files: bin/tableviewer apps/Applications/tableviewer.desktop 2Files: bin/tableviewer apps/Applications/tableviewer.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Warwick Allison <warwick@trolltech.com> 5Maintainer: Warwick Allison <warwick@trolltech.com>
6Architecture: arm 6Architecture: arm
7Arch: iPAQ 7Arch: iPAQ
8Version: $QPE_VERSION-$SUB_VERSION
9Depends: task-opie-minimal 8Depends: task-opie-minimal
10Description: XML database browsers 9Description: XML database browsers
11 A table/database viewer for the Opie environment. 10 A table/database viewer for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/libkate/document/katebuffer.cpp b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
index 38ba55d..22a4917 100644
--- a/noncore/apps/tinykate/libkate/document/katebuffer.cpp
+++ b/noncore/apps/tinykate/libkate/document/katebuffer.cpp
@@ -100,49 +100,49 @@ void
100KWBuffer::loadFilePart() 100KWBuffer::loadFilePart()
101{ 101{
102} 102}
103 103
104 104
105void 105void
106KWBuffer::insertData(int line, const QByteArray &data, QTextCodec *codec) 106KWBuffer::insertData(int line, const QByteArray &data, QTextCodec *codec)
107{ 107{
108} 108}
109 109
110void 110void
111KWBuffer::slotLoadFile() 111KWBuffer::slotLoadFile()
112{ 112{
113 loadFilePart(); 113 loadFilePart();
114// emit linesChanged(m_totalLines); 114// emit linesChanged(m_totalLines);
115 emit linesChanged(20); 115 emit linesChanged(20);
116} 116}
117 117
118/** 118/**
119 * Return the total number of lines in the buffer. 119 * Return the total number of lines in the buffer.
120 */ 120 */
121int 121int
122KWBuffer::count() 122KWBuffer::count()
123{ 123{
124// qDebug("m_stringList.count %d",m_stringList.count()); 124 qDebug("m_stringList.count %d",m_stringList.count());
125 return m_lineCount; 125 return m_lineCount;
126 //return m_stringList.count(); 126 //return m_stringList.count();
127// return m_totalLines; 127// return m_totalLines;
128} 128}
129 129
130 130
131void KWBuffer::seek(int i) 131void KWBuffer::seek(int i)
132{ 132{
133 if (m_stringListCurrent == i) 133 if (m_stringListCurrent == i)
134 return; 134 return;
135 while(m_stringListCurrent < i) 135 while(m_stringListCurrent < i)
136 { 136 {
137 ++m_stringListCurrent; 137 ++m_stringListCurrent;
138 ++m_stringListIt; 138 ++m_stringListIt;
139 } 139 }
140 while(m_stringListCurrent > i) 140 while(m_stringListCurrent > i)
141 { 141 {
142 --m_stringListCurrent; 142 --m_stringListCurrent;
143 --m_stringListIt; 143 --m_stringListIt;
144 } 144 }
145} 145}
146 146
147 147
148TextLine::Ptr 148TextLine::Ptr
diff --git a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
index 844f27d..f90a5f8 100644
--- a/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
+++ b/noncore/apps/tinykate/libkate/document/katesyntaxdocument.cpp
@@ -50,82 +50,83 @@ void SyntaxDocument::setupModeList(bool force)
50{ 50{
51 51
52 if (myModeList.count() > 0) return; 52 if (myModeList.count() > 0) return;
53 53
54 KateConfig *config=KGlobal::config(); 54 KateConfig *config=KGlobal::config();
55 KStandardDirs *dirs = KGlobal::dirs(); 55 KStandardDirs *dirs = KGlobal::dirs();
56 56
57// QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true); 57// QStringList list=dirs->findAllResources("data","kate/syntax/*.xml",false,true);
58 QString path=QPEApplication::qpeDir() +"share/tinykate/syntax/"; 58 QString path=QPEApplication::qpeDir() +"share/tinykate/syntax/";
59 59
60 QDir dir(path); 60 QDir dir(path);
61 QStringList list=dir.entryList("*.xml"); 61 QStringList list=dir.entryList("*.xml");
62 62
63 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) 63 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
64 { 64 {
65 QString Group="Highlighting_Cache"+path+*it; 65 QString Group="Highlighting_Cache"+path+*it;
66 if ((config->hasGroup(Group)) && (!force)) 66 if ((config->hasGroup(Group)) && (!force))
67 { 67 {
68 config->setGroup(Group); 68 config->setGroup(Group);
69 syntaxModeListItem *mli=new syntaxModeListItem; 69 syntaxModeListItem *mli=new syntaxModeListItem;
70 mli->name = config->readEntry("name",""); 70 mli->name = config->readEntry("name","");
71 mli->section = config->readEntry("section",""); 71 mli->section = config->readEntry("section","");
72 mli->mimetype = config->readEntry("mimetype",""); 72 mli->mimetype = config->readEntry("mimetype","");
73 mli->extension = config->readEntry("extension",""); 73 mli->extension = config->readEntry("extension","");
74 mli->identifier = *it; 74 mli->identifier = path+*it;
75 myModeList.append(mli); 75 myModeList.append(mli);
76 } 76 }
77 else 77 else
78 { 78 {
79 qDebug("Found a description file:"+path+(*it)); 79 qDebug("Found a description file:"+path+(*it));
80 setIdentifier(path+(*it)); 80 setIdentifier(path+(*it));
81 Opie::XMLElement *e=m_root; 81 Opie::XMLElement *e=m_root;
82 if (e) 82 if (e)
83 { 83 {
84 e=e->firstChild(); 84 e=e->firstChild();
85 qDebug(e->tagName()); 85 qDebug(e->tagName());
86 if (e->tagName()=="language") 86 if (e->tagName()=="language")
87 { 87 {
88 syntaxModeListItem *mli=new syntaxModeListItem; 88 syntaxModeListItem *mli=new syntaxModeListItem;
89 mli->name = e->attribute("name"); 89 mli->name = e->attribute("name");
90 mli->section = e->attribute("section"); 90 mli->section = e->attribute("section");
91 mli->mimetype = e->attribute("mimetype"); 91 mli->mimetype = e->attribute("mimetype");
92 mli->extension = e->attribute("extensions"); 92 mli->extension = e->attribute("extensions");
93 qDebug(QString("valid description for: %1/%2").arg(mli->section).arg(mli->name)); 93 qDebug(QString("valid description for: %1/%2").arg(mli->section).arg(mli->name));
94 if (mli->section.isEmpty()) 94 if (mli->section.isEmpty())
95 mli->section=i18n("Other"); 95 mli->section=i18n("Other");
96 96
97 mli->identifier = path+(*it); 97 mli->identifier = path+(*it);
98 config->setGroup(Group); 98 config->setGroup(Group);
99 config->writeEntry("name",mli->name); 99 config->writeEntry("name",mli->name);
100 config->writeEntry("section",mli->section); 100 config->writeEntry("section",mli->section);
101 config->writeEntry("mimetype",mli->mimetype); 101 config->writeEntry("mimetype",mli->mimetype);
102 config->writeEntry("extension",mli->extension); 102 config->writeEntry("extension",mli->extension);
103 myModeList.append(mli); 103 myModeList.append(mli);
104 } 104 }
105 } 105 }
106 } 106 }
107 } 107 }
108 config->write();
108// config->sync(); 109// config->sync();
109} 110}
110 111
111SyntaxModeList SyntaxDocument::modeList() 112SyntaxModeList SyntaxDocument::modeList()
112{ 113{
113 return myModeList; 114 return myModeList;
114} 115}
115 116
116bool SyntaxDocument::nextGroup( syntaxContextData* data) 117bool SyntaxDocument::nextGroup( syntaxContextData* data)
117{ 118{
118 if(!data) return false; 119 if(!data) return false;
119 120
120 if (!data->currentGroup) 121 if (!data->currentGroup)
121 data->currentGroup=data->parent->firstChild(); 122 data->currentGroup=data->parent->firstChild();
122 else 123 else
123 data->currentGroup=data->currentGroup->nextChild(); 124 data->currentGroup=data->currentGroup->nextChild();
124 125
125 data->item=0; 126 data->item=0;
126 127
127 if (!data->currentGroup) 128 if (!data->currentGroup)
128 return false; 129 return false;
129 else 130 else
130 return true; 131 return true;
131} 132}
diff --git a/noncore/apps/tinykate/libkate/libkate.pro b/noncore/apps/tinykate/libkate/libkate.pro
index 5cb0b14..b282059 100644
--- a/noncore/apps/tinykate/libkate/libkate.pro
+++ b/noncore/apps/tinykate/libkate/libkate.pro
@@ -1,86 +1,91 @@
1TEMPLATE = lib 1 TEMPLATE= lib
2CONFIG = qt warn_on release 2 CONFIG = qt warn_on release
3HEADERS = microkde/kapplication.h \ 3 HEADERS = microkde/kapplication.h \
4 kateconfig.h \ 4 kateconfig.h \
5 microkde/kdebug.h \ 5 microkde/kdebug.h \
6 microkde/kdialog.h \ 6 microkde/kdialog.h \
7 microkde/kdialogbase.h \ 7 microkde/kdialogbase.h \
8 microkde/kfiledialog.h \ 8 microkde/kfiledialog.h \
9 microkde/kglobal.h \ 9 microkde/kglobal.h \
10 microkde/kiconloader.h \ 10 microkde/kiconloader.h \
11 microkde/klineedit.h \ 11 microkde/klineedit.h \
12 microkde/klocale.h \ 12 microkde/klocale.h \
13 microkde/kmessagebox.h \ 13 microkde/kmessagebox.h \
14 microkde/kprinter.h \ 14 microkde/kprinter.h \
15 microkde/krestrictedline.h \ 15 microkde/krestrictedline.h \
16 microkde/kseparator.h \ 16 microkde/kseparator.h \
17 microkde/kstandarddirs.h \ 17 microkde/kstandarddirs.h \
18 microkde/ktempfile.h \ 18 microkde/ktempfile.h \
19 microkde/kunload.h \ 19 microkde/kunload.h \
20 microkde/kurlrequester.h \ 20 microkde/kurlrequester.h \
21 microkde/kfontdialog.h \ 21 microkde/kfontdialog.h \
22 microkde/krun.h \ 22 microkde/krun.h \
23 microkde/knumvalidator.h \ 23 microkde/knumvalidator.h \
24 microkde/kstaticdeleter.h \ 24 microkde/kstaticdeleter.h \
25 microkde/klistview.h \ 25 microkde/klistview.h \
26 microkde/kglobalsettings.h \ 26 microkde/kglobalsettings.h \
27 microkde/kcolorbtn.h \ 27 microkde/kcolorbtn.h \
28 qt3back/qregexp3.h \ 28 \
29 microkde/ksharedptr.h \ 29 \
30 document/katebuffer.h document/katedialogs.h \ 30 qt3back/qregexp3.h \
31 document/katetextline.h \ 31 microkde/ksharedptr.h \
32 document/katecmd.h \ 32 document/katebuffer.h document/katedialogs.h \
33 document/katehighlight.h \ 33 document/katetextline.h \
34 document/katecmds.h document/katedocument.h \ 34 document/katecmd.h \
35 document/katesyntaxdocument.h \ 35 document/katehighlight.h \
36 view/kateundohistory.h \ 36 document/katecmds.h document/katedocument.h \
37 view/kateview.h \ 37 document/katesyntaxdocument.h \
38 view/kateviewdialog.h \ 38 view/kateundohistory.h \
39 interfaces/view.h \ 39 view/kateview.h \
40 interfaces/document.h \ 40 view/kateviewdialog.h \
41 ktexteditor/ktexteditor.h 41 interfaces/view.h \
42 interfaces/document.h \
43 ktexteditor/ktexteditor.h
42 44
43SOURCES = microkde/kapplication.cpp \ 45 SOURCES = microkde/kapplication.cpp \
44 microkde/kdialogbase.cpp \ 46 microkde/kdialogbase.cpp \
45 kateconfig.cpp \ 47 kateconfig.cpp \
46 microkde/klocale.cpp \ 48 microkde/klocale.cpp \
47 microkde/kmessagebox.cpp \ 49 microkde/kmessagebox.cpp \
48 microkde/kprocess.cpp \ 50 microkde/kprocess.cpp \
49 microkde/kstandarddirs.cpp \ 51 microkde/kstandarddirs.cpp \
50 microkde/ktempfile.cpp \ 52 microkde/ktempfile.cpp \
51 microkde/kurlrequester.cpp \ 53 microkde/kurlrequester.cpp \
54 microkde/kcolordialog.cpp \
52 microkde/kfontdialog.cpp \ 55 microkde/kfontdialog.cpp \
53 microkde/krun.cpp \ 56 microkde/krun.cpp \
54 microkde/knumvalidator.cpp \ 57 microkde/knumvalidator.cpp \
55 microkde/kglobal.cpp \ 58 microkde/kglobal.cpp \
56 microkde/kglobalsettings.cpp \ 59 microkde/kglobalsettings.cpp \
57 microkde/kcolorbtn.cpp \ 60 microkde/kcolorbtn.cpp \
58 qt3back/qregexp3.cpp \ 61 \
59 ktexteditor/ktexteditor.cpp \ 62 \
60 document/katebuffer.cpp document/katedialogs.cpp \ 63 qt3back/qregexp3.cpp \
61 document/katehighlight.cpp \ 64 ktexteditor/ktexteditor.cpp \
62 document/katecmd.cpp \ 65 document/katebuffer.cpp document/katedialogs.cpp \
63 document/katesyntaxdocument.cpp document/katecmds.cpp \ 66 document/katehighlight.cpp \
64 document/katedocument.cpp document/katetextline.cpp \ 67 document/katecmd.cpp \
65 view/kateundohistory.cpp \ 68 document/katesyntaxdocument.cpp document/katecmds.cpp \
66 view/kateview.cpp \ 69 document/katedocument.cpp document/katetextline.cpp \
67 view/kateviewdialog.cpp \ 70 view/kateundohistory.cpp \
68 interfaces/interfaces.cpp 71 view/kateview.cpp \
72 view/kateviewdialog.cpp \
73 interfaces/interfaces.cpp
69 74
70INTERFACES = 75 INTERFACES=
71INCLUDEPATH += $(OPIEDIR)/include \ 76 INCLUDEPATH+= $(OPIEDIR)/include \
72 $(OPIEDIR)/noncore/apps/tinykate/libkate \ 77 $(OPIEDIR)/noncore/apps/tinykate/libkate \
73 $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ 78 $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \
74 $(OPIEDIR)/noncore/apps/tinykate/libkate/document \ 79 $(OPIEDIR)/noncore/apps/tinykate/libkate/document \
75 $(OPIEDIR)/noncore/apps/tinykate/libkate/view \ 80 $(OPIEDIR)/noncore/apps/tinykate/libkate/view \
76 $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \ 81 $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \
77 $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \ 82 $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \
78 $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back 83 $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back
79DEPENDPATH += $(OPIEDIR)/include 84 DEPENDPATH+= $(OPIEDIR)/include
80LIBS += -lqpe -lopie 85LIBS += -lqpe -lopie
81TARGET = tinykate 86 TARGET = tinykate
82 87
83INCLUDEPATH += $(OPIEDIR)/include 88INCLUDEPATH += $(OPIEDIR)/include
84DESTDIR = $(OPIEDIR)/lib$(PROJMAK) 89DESTDIR = $(OPIEDIR)/lib$(PROJMAK)
85 90
86include ( $(OPIEDIR)/include.pro ) 91include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
index 976f1db..5d21f15 100644
--- a/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
+++ b/noncore/apps/tinykate/libkate/microkde/kcolorbtn.cpp
@@ -2,85 +2,83 @@
2 Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 Copyright (C) 1999 Cristian Tibirna (ctibirna@kde.org) 3 Copyright (C) 1999 Cristian Tibirna (ctibirna@kde.org)
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qdialog.h> 21#include <qdialog.h>
22#include <qpainter.h> 22#include <qpainter.h>
23#include <qdrawutil.h> 23#include <qdrawutil.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <kglobalsettings.h> 25#include <kglobalsettings.h>
26//#include "kcolordialog.h" 26#include "kcolordialog.h"
27#include "kcolorbtn.h" 27#include "kcolorbtn.h"
28 28
29#include <opie/colordialog.h>
30
31KColorButton::KColorButton( QWidget *parent, const char *name ) 29KColorButton::KColorButton( QWidget *parent, const char *name )
32 : QPushButton( parent, name ), dragFlag(false) 30 : QPushButton( parent, name ), dragFlag(false)
33{ 31{
34 // 2000-10-15 (putzer): fixes broken keyboard usage 32 // 2000-10-15 (putzer): fixes broken keyboard usage
35 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); 33 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
36} 34}
37 35
38KColorButton::KColorButton( const QColor &c, QWidget *parent, 36KColorButton::KColorButton( const QColor &c, QWidget *parent,
39 const char *name ) 37 const char *name )
40 : QPushButton( parent, name ), col(c), dragFlag(false) 38 : QPushButton( parent, name ), col(c), dragFlag(false)
41{ 39{
42 40
43 // 2000-10-15 (putzer): fixes broken keyboard usage 41 // 2000-10-15 (putzer): fixes broken keyboard usage
44 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor())); 42 connect (this, SIGNAL(clicked()), this, SLOT(chooseColor()));
45} 43}
46 44
47void KColorButton::setColor( const QColor &c ) 45void KColorButton::setColor( const QColor &c )
48{ 46{
49 col = c; 47 col = c;
50 repaint( false ); 48 repaint( false );
51} 49}
52 50
53void KColorButton::drawButtonLabel( QPainter *painter ) 51void KColorButton::drawButtonLabel( QPainter *painter )
54{ 52{
55 QRect r = QApplication::style().buttonRect( 0, 0, width(), height() ); 53 QRect r = QApplication::style().buttonRect( 0, 0, width(), height() );
56 int l = r.x(); 54 int l = r.x();
57 int t = r.y(); 55 int t = r.y();
58 int w = r.width(); 56 int w = r.width();
59 int h = r.height(); 57 int h = r.height();
60 int b = 5; 58 int b = 5;
61 59
62 QColor lnCol = colorGroup().text(); 60 QColor lnCol = colorGroup().text();
63 QColor fillCol = isEnabled() ? col : backgroundColor(); 61 QColor fillCol = isEnabled() ? col : backgroundColor();
64 62
65 if ( isDown() ) { 63 if ( isDown() ) {
66 qDrawPlainRect( painter, l+b+1, t+b+1, w-b*2, h-b*2, lnCol, 1, 0 ); 64 qDrawPlainRect( painter, l+b+1, t+b+1, w-b*2, h-b*2, lnCol, 1, 0 );
67 b++; 65 b++;
68 painter->fillRect( l+b+1, t+b+1, w-b*2, h-b*2, fillCol ); 66 painter->fillRect( l+b+1, t+b+1, w-b*2, h-b*2, fillCol );
69 } else { 67 } else {
70 qDrawPlainRect( painter, l+b, t+b, w-b*2, h-b*2, lnCol, 1, 0 ); 68 qDrawPlainRect( painter, l+b, t+b, w-b*2, h-b*2, lnCol, 1, 0 );
71 b++; 69 b++;
72 painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol ); 70 painter->fillRect( l+b, t+b, w-b*2, h-b*2, fillCol );
73 } 71 }
74} 72}
75 73
76void KColorButton::chooseColor() 74void KColorButton::chooseColor()
77{ 75{
78 QColor newCol=OColorDialog::getColor( col); 76 if( KColorDialog::getColor( col) == QDialog::Rejected )
79 if( newCol != QDialog::Rejected )
80 { 77 {
81 col=newCol; 78 return;
79 }
80
82 repaint( false ); 81 repaint( false );
83 emit changed( col ); 82 emit changed( col );
84 }
85} 83}
86 84
diff --git a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
index 1d5c27e..0f831cd 100644
--- a/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
+++ b/noncore/apps/tinykate/libkate/microkde/kcolordialog.h
@@ -1,16 +1,14 @@
1#ifndef MINIKDE_KCOLORDIALOG_H 1#ifndef MINIKDE_KCOLORDIALOG_H
2#define MINIKDE_KCOLORDIALOG_H 2#define MINIKDE_KCOLORDIALOG_H
3 3
4#include <qcolor.h> 4#include <qcolor.h>
5#include <opie/colordialog.h>
6 5
7class KColorDialog : OColorDialog 6class KColorDialog
8{ 7{
9 Q_OBJECT
10 public: 8 public:
11 enum { Accepted }; 9 enum { Accepted };
12 10
13 static int getColor( const QColor & ); 11 static int getColor( const QColor & );
14}; 12};
15 13
16#endif 14#endif
diff --git a/noncore/apps/tinykate/libkate/view/kateview.cpp b/noncore/apps/tinykate/libkate/view/kateview.cpp
index de81d0f..af3b30d 100644
--- a/noncore/apps/tinykate/libkate/view/kateview.cpp
+++ b/noncore/apps/tinykate/libkate/view/kateview.cpp
@@ -2175,55 +2175,57 @@ void KateView::exposeFound(PointStruc &cursor, int slen, int flags, bool replace
2175} 2175}
2176 2176
2177void KateView::deleteReplacePrompt() { 2177void KateView::deleteReplacePrompt() {
2178 myDoc->setPseudoModal(0L); 2178 myDoc->setPseudoModal(0L);
2179} 2179}
2180 2180
2181bool KateView::askReplaceEnd() { 2181bool KateView::askReplaceEnd() {
2182 QString str; 2182 QString str;
2183 int query; 2183 int query;
2184 2184
2185 myDoc->updateViews(); 2185 myDoc->updateViews();
2186 if (s.flags & KateView::sfFinished) { 2186 if (s.flags & KateView::sfFinished) {
2187 // replace finished 2187 // replace finished
2188 str = i18n("%1 replacement(s) made").arg(replaces); 2188 str = i18n("%1 replacement(s) made").arg(replaces);
2189 KMessageBox::information(this, str, i18n("Replace")); 2189 KMessageBox::information(this, str, i18n("Replace"));
2190 return true; 2190 return true;
2191 } 2191 }
2192 2192
2193 // ask for continue 2193 // ask for continue
2194 if (!(s.flags & KateView::sfBackward)) { 2194 if (!(s.flags & KateView::sfBackward)) {
2195 // forward search 2195 // forward search
2196 str = i18n("%1 replacement(s) made.\n" 2196 str = i18n("%1 replacement(s) made.\n"
2197 "End of document reached.\n" 2197 "End of document reached.\n"
2198 "Continue from the beginning?").arg(replaces); 2198 "Continue from the beginning?").arg(replaces);
2199 query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop")); 2199 query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
2200 i18n("Continue"), i18n("Stop"));
2200 } else { 2201 } else {
2201 // backward search 2202 // backward search
2202 str = i18n("%1 replacement(s) made.\n" 2203 str = i18n("%1 replacement(s) made.\n"
2203 "Beginning of document reached.\n" 2204 "Beginning of document reached.\n"
2204 "Continue from the end?").arg(replaces); 2205 "Continue from the end?").arg(replaces);
2205 query = KMessageBox::questionYesNo(this, str, i18n("Continue"), i18n("Stop")); 2206 query = KMessageBox::questionYesNo(this, str, i18n("Replace"),
2207 i18n("Continue"), i18n("Stop"));
2206 } 2208 }
2207 replaces = 0; 2209 replaces = 0;
2208 continueSearch(s); 2210 continueSearch(s);
2209 return (query == KMessageBox::No); 2211 return (query == KMessageBox::No);
2210} 2212}
2211 2213
2212void KateView::replaceSlot() { 2214void KateView::replaceSlot() {
2213 doReplaceAction(replacePrompt->result(),true); 2215 doReplaceAction(replacePrompt->result(),true);
2214} 2216}
2215 2217
2216void KateView::installPopup(QPopupMenu *rmb_Menu) 2218void KateView::installPopup(QPopupMenu *rmb_Menu)
2217{ 2219{
2218 rmbMenu = rmb_Menu; 2220 rmbMenu = rmb_Menu;
2219} 2221}
2220 2222
2221void KateView::readConfig() 2223void KateView::readConfig()
2222{ 2224{
2223 KateConfig *config = KGlobal::config(); 2225 KateConfig *config = KGlobal::config();
2224 config->setGroup("Kate View"); 2226 config->setGroup("Kate View");
2225 2227
2226 searchFlags = config->readNumEntry("SearchFlags", KateView::sfPrompt); 2228 searchFlags = config->readNumEntry("SearchFlags", KateView::sfPrompt);
2227 configFlags = config->readNumEntry("ConfigFlags", configFlags) & ~KateView::cfMark; 2229 configFlags = config->readNumEntry("ConfigFlags", configFlags) & ~KateView::cfMark;
2228 2230
2229// config->sync(); 2231// config->sync();
@@ -2245,112 +2247,108 @@ void KateView::readSessionConfig(KateConfig *config)
2245 PointStruc cursor; 2247 PointStruc cursor;
2246 2248
2247 myViewInternal->xPos = config->readNumEntry("XPos"); 2249 myViewInternal->xPos = config->readNumEntry("XPos");
2248 myViewInternal->yPos = config->readNumEntry("YPos"); 2250 myViewInternal->yPos = config->readNumEntry("YPos");
2249 cursor.x = config->readNumEntry("CursorX"); 2251 cursor.x = config->readNumEntry("CursorX");
2250 cursor.y = config->readNumEntry("CursorY"); 2252 cursor.y = config->readNumEntry("CursorY");
2251 myViewInternal->updateCursor(cursor); 2253 myViewInternal->updateCursor(cursor);
2252 myIconBorder = config->readBoolEntry("IconBorder on"); 2254 myIconBorder = config->readBoolEntry("IconBorder on");
2253 setIconBorder(myIconBorder); 2255 setIconBorder(myIconBorder);
2254} 2256}
2255 2257
2256void KateView::writeSessionConfig(KateConfig *config) 2258void KateView::writeSessionConfig(KateConfig *config)
2257{ 2259{
2258 config->writeEntry("XPos",myViewInternal->xPos); 2260 config->writeEntry("XPos",myViewInternal->xPos);
2259 config->writeEntry("YPos",myViewInternal->yPos); 2261 config->writeEntry("YPos",myViewInternal->yPos);
2260 config->writeEntry("CursorX",myViewInternal->cursor.x); 2262 config->writeEntry("CursorX",myViewInternal->cursor.x);
2261 config->writeEntry("CursorY",myViewInternal->cursor.y); 2263 config->writeEntry("CursorY",myViewInternal->cursor.y);
2262 config->writeEntry("IconBorder on", myIconBorder); 2264 config->writeEntry("IconBorder on", myIconBorder);
2263} 2265}
2264 2266
2265void KateView::configDialog() 2267void KateView::configDialog()
2266{ 2268{
2267 2269
2268#warning fixme 2270#warning fixme
2269 QScrollView *pScroll;
2270 2271
2271#if 1 2272#if 1
2272 KDialogBase *kd = new KDialogBase(KDialogBase::IconList, 2273 KDialogBase *kd = new KDialogBase(KDialogBase::IconList,
2273 i18n("Configure Editor"), 2274 i18n("Configure Editor"),
2274 KDialogBase::Ok | KDialogBase::Cancel | 2275 KDialogBase::Ok | KDialogBase::Cancel |
2275 KDialogBase::Help , 2276 KDialogBase::Help ,
2276 KDialogBase::Ok, this, "tabdialog"); 2277 KDialogBase::Ok, this, "tabdialog");
2277 2278
2278 // color options 2279 // color options
2279 QFrame *page=kd->addPage(i18n("Colors")); 2280 QFrame *page=kd->addPage(i18n("Colors"));
2280 (new QVBoxLayout(page))->setAutoAdd(true); 2281 (new QVBoxLayout(page))->setAutoAdd(true);
2281 ColorConfig *colorConfig = new ColorConfig(page); 2282 ColorConfig *colorConfig = new ColorConfig(page);
2282 QColor* colors = getColors(); 2283 QColor* colors = getColors();
2283 colorConfig->setColors(colors); 2284 colorConfig->setColors(colors);
2284 2285
2285 page = kd->addPage(i18n("Fonts")); 2286 page = kd->addPage(i18n("Fonts"));
2286 (new QVBoxLayout(page))->setAutoAdd(true); 2287 (new QVBoxLayout(page))->setAutoAdd(true);
2287 2288
2288 FontConfig *fontConfig = new FontConfig(page); 2289 FontConfig *fontConfig = new FontConfig(page);
2289 fontConfig->setFont (myDoc->getFont()); 2290 fontConfig->setFont (myDoc->getFont());
2290 2291
2291 // indent options 2292 // indent options
2292 page=kd->addPage(i18n("Indent")); 2293 page=kd->addPage(i18n("Indent"));
2293 (new QVBoxLayout(page))->setAutoAdd(true); 2294 (new QVBoxLayout(page))->setAutoAdd(true);
2294 2295
2295 IndentConfigTab *indentConfig = new IndentConfigTab(page, this); 2296 IndentConfigTab *indentConfig = new IndentConfigTab(page, this);
2296 2297
2297 // select options 2298 // select options
2298 page=kd->addPage(i18n("Select")); 2299 page=kd->addPage(i18n("Select"));
2299 (new QVBoxLayout(page))->setAutoAdd(true); 2300 (new QVBoxLayout(page))->setAutoAdd(true);
2300 2301
2301 SelectConfigTab *selectConfig = new SelectConfigTab(page, this); 2302 SelectConfigTab *selectConfig = new SelectConfigTab(page, this);
2302 2303
2303 // edit options 2304 // edit options
2304 page=kd->addPage(i18n("Edit")); 2305 page=kd->addPage(i18n("Edit"));
2305 (new QVBoxLayout(page))->setAutoAdd(true); 2306 (new QVBoxLayout(page))->setAutoAdd(true);
2306 pScroll=new QScrollView(page); 2307
2307 EditConfigTab *editConfig = new EditConfigTab(page, this); 2308 EditConfigTab *editConfig = new EditConfigTab(page, this);
2308 pScroll->addChild(editConfig);
2309 2309
2310 2310
2311 2311
2312 HighlightDialogPage *hlPage; 2312 HighlightDialogPage *hlPage;
2313 HlManager *hlManager; 2313 HlManager *hlManager;
2314 HlDataList hlDataList; 2314 HlDataList hlDataList;
2315 ItemStyleList defaultStyleList; 2315 ItemStyleList defaultStyleList;
2316 2316
2317 hlManager = HlManager::self(); 2317 hlManager = HlManager::self();
2318 2318
2319 defaultStyleList.setAutoDelete(true); 2319 defaultStyleList.setAutoDelete(true);
2320 hlManager->getDefaults(defaultStyleList); 2320 hlManager->getDefaults(defaultStyleList);
2321 2321
2322 hlDataList.setAutoDelete(true); 2322 hlDataList.setAutoDelete(true);
2323 //this gets the data from the KateConfig object 2323 //this gets the data from the KateConfig object
2324 hlManager->getHlDataList(hlDataList); 2324 hlManager->getHlDataList(hlDataList);
2325 2325
2326 page=kd->addPage(i18n("Highlighting")); 2326 page=kd->addPage(i18n("Highlighting"));
2327 (new QVBoxLayout(page))->setAutoAdd(true); 2327 (new QVBoxLayout(page))->setAutoAdd(true);
2328 pScroll=new QScrollView(page);
2329 hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, pScroll->viewport());
2330 pScroll->addChild(hlPage);
2331 2328
2332 kd->showMaximized(); 2329 hlPage = new HighlightDialogPage(hlManager, &defaultStyleList, &hlDataList, 0, page);
2330 kd->showMaximized();
2333 if (kd->exec()) { 2331 if (kd->exec()) {
2334 // color options 2332 // color options
2335 colorConfig->getColors(colors); 2333 colorConfig->getColors(colors);
2336 myDoc->setFont (fontConfig->getFont()); 2334 myDoc->setFont (fontConfig->getFont());
2337 2335
2338 applyColors(); 2336 applyColors();
2339 // indent options 2337 // indent options
2340 indentConfig->getData(this); 2338 indentConfig->getData(this);
2341 // select options 2339 // select options
2342 selectConfig->getData(this); 2340 selectConfig->getData(this);
2343 // edit options 2341 // edit options
2344 editConfig->getData(this); 2342 editConfig->getData(this);
2345 // spell checker 2343 // spell checker
2346 hlManager->setHlDataList(hlDataList); 2344 hlManager->setHlDataList(hlDataList);
2347 hlManager->setDefaults(defaultStyleList); 2345 hlManager->setDefaults(defaultStyleList);
2348 hlPage->saveData(); 2346 hlPage->saveData();
2349 } 2347 }
2350 2348
2351// delete kd; 2349// delete kd;
2352 2350
2353#endif 2351#endif
2354} 2352}
2355 2353
2356int KateView::getHl() { 2354int KateView::getHl() {
diff --git a/noncore/apps/tinykate/main.cpp b/noncore/apps/tinykate/main.cpp
index e92df69..e06668a 100644
--- a/noncore/apps/tinykate/main.cpp
+++ b/noncore/apps/tinykate/main.cpp
@@ -1,29 +1,28 @@
1/*************************************************************************** 1/***************************************************************************
2 main.cpp 2 main.cpp
3 ------------------- 3 -------------------
4 begin : November 2002 4 begin : November 2002
5 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org> 5 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org>
6 ***************************************************************************/ 6 ***************************************************************************/
7 7
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation. * 12 * the Free Software Foundation. *
13 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE * 13 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qmainwindow.h> 17#include <qmainwindow.h>
18#include "tinykate.h" 18#include "tinykate.h"
19 19
20 20
21int main( int argc, char ** argv ) 21int main( int argc, char ** argv )
22{ 22{
23 QPEApplication a( argc, argv ); 23 QPEApplication a( argc, argv );
24 24
25 TinyKate *m = new TinyKate(); 25 TinyKate m;
26 a.setMainWidget( m ); 26 a.showMainWidget(&m );
27 m->showMaximized();
28 return a.exec(); 27 return a.exec();
29} 28}
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-commondev.control b/noncore/apps/tinykate/opie-tinykate-syntax-commondev.control
index 76704c1..dd5e24b 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-commondev.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-commondev.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-commondev 1Package: opie-tinykate-syntax-commondev
2Files: share/tinykate/syntax/c.xml share/tinykate/syntax/cpp.xml share/tinykate/syntax/gnuassembler.xml share/tinykate/syntax/kbasic.xml share/tinykate/syntax/pascal.xml share/tinykate/syntax/perl.xml share/tinykate/syntax/php.xml share/tinykate/syntax/python.xml share/tinykate/syntax/ruby.xml share/tinykate/syntax/sql.xml share/tinykate/syntax/tcl.xml share/tinykate/syntax/xml.xml share/tinykate/syntax/xmldebug.xml share/tinykate/syntax/java.xml 2Files: share/tinykate/syntax/c.xml share/tinykate/syntax/cpp.xml share/tinykate/syntax/gnuassembler.xml share/tinykate/syntax/kbasic.xml share/tinykate/syntax/pascal.xml share/tinykate/syntax/perl.xml share/tinykate/syntax/php.xml share/tinykate/syntax/python.xml share/tinykate/syntax/ruby.xml share/tinykate/syntax/sql.xml share/tinykate/syntax/tcl.xml share/tinykate/syntax/xml.xml share/tinykate/syntax/xmldebug.xml share/tinykate/syntax/java.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for for common programming languages for TinyKate 8Description: Syntax Highlighting Patterns for for common programming languages for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-documentation.control b/noncore/apps/tinykate/opie-tinykate-syntax-documentation.control
index 9f60156..c47acc0 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-documentation.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-documentation.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-documentation 1Package: opie-tinykate-syntax-documentation
2Files: share/tinykate/syntax/latex.xml share/tinykate/syntax/postscript.xml share/tinykate/syntax/sgml.xml 2Files: share/tinykate/syntax/latex.xml share/tinykate/syntax/postscript.xml share/tinykate/syntax/sgml.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for document oriented languages for TinyKate 8Description: Syntax Highlighting Patterns for document oriented languages for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-misc.control b/noncore/apps/tinykate/opie-tinykate-syntax-misc.control
index 4e0f529..0e80518 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-misc.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-misc.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-misc 1Package: opie-tinykate-syntax-misc
2Files: share/tinykate/syntax/idconsole.xml share/tinykate/syntax/matlab.xml share/tinykate/syntax/verilog.xml share/tinykate/syntax/vhdl.xml 2Files: share/tinykate/syntax/idconsole.xml share/tinykate/syntax/matlab.xml share/tinykate/syntax/verilog.xml share/tinykate/syntax/vhdl.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for misc languages for TinyKate 8Description: Syntax Highlighting Patterns for misc languages for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-miscdev.control b/noncore/apps/tinykate/opie-tinykate-syntax-miscdev.control
index 3c8f61a..3f7ea0d 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-miscdev.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-miscdev.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-miscdev 1Package: opie-tinykate-syntax-miscdev
2Files: share/tinykate/syntax/ada.xml share/tinykate/syntax/eiffel.xml share/tinykate/syntax/ferite.xml share/tinykate/syntax/fortran.xml share/tinykate/syntax/haskell.xml share/tinykate/syntax/literate-haskell.xml share/tinykate/syntax/objectivec.xml share/tinykate/syntax/sather.xml share/tinykate/syntax/scheme.xml 2Files: share/tinykate/syntax/ada.xml share/tinykate/syntax/eiffel.xml share/tinykate/syntax/ferite.xml share/tinykate/syntax/fortran.xml share/tinykate/syntax/haskell.xml share/tinykate/syntax/literate-haskell.xml share/tinykate/syntax/objectivec.xml share/tinykate/syntax/sather.xml share/tinykate/syntax/scheme.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for for uncommon programming languages for TinyKate 8Description: Syntax Highlighting Patterns for for uncommon programming languages for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-unix.control b/noncore/apps/tinykate/opie-tinykate-syntax-unix.control
index 36e88b5..ea4e026 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-unix.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-unix.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-unix 1Package: opie-tinykate-syntax-unix
2Files: share/tinykate/syntax/cs.xml share/tinykate/syntax/bash.xml share/tinykate/syntax/changelog.xml share/tinykate/syntax/desktop.xml share/tinykate/syntax/diff.xml share/tinykate/syntax/mab.xml share/tinykate/syntax/makefile.xml share/tinykate/syntax/rpmspec.xml share/tinykate/syntax/sml.xml share/tinykate/syntax/winehq.xml 2Files: share/tinykate/syntax/cs.xml share/tinykate/syntax/bash.xml share/tinykate/syntax/changelog.xml share/tinykate/syntax/desktop.xml share/tinykate/syntax/diff.xml share/tinykate/syntax/mab.xml share/tinykate/syntax/makefile.xml share/tinykate/syntax/rpmspec.xml share/tinykate/syntax/sml.xml share/tinykate/syntax/winehq.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for UNIX/Linux specific files for TinyKate 8Description: Syntax Highlighting Patterns for UNIX/Linux specific files for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax-web.control b/noncore/apps/tinykate/opie-tinykate-syntax-web.control
index 46fe64a..8f9c71a 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax-web.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax-web.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax-web 1Package: opie-tinykate-syntax-web
2Files: share/tinykate/syntax/css.xml share/tinykate/syntax/html.xml share/tinykate/syntax/javascript.xml 2Files: share/tinykate/syntax/css.xml share/tinykate/syntax/html.xml share/tinykate/syntax/javascript.xml
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, opie-tinykate 7Depends: task-opie-minimal, opie-tinykate
9Description: Syntax Highlighting Patterns for for common programming languages for TinyKate 8Description: Syntax Highlighting Patterns for for common programming languages for TinyKate
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate-syntax.control b/noncore/apps/tinykate/opie-tinykate-syntax.control
index c4156fc..712933c 100644
--- a/noncore/apps/tinykate/opie-tinykate-syntax.control
+++ b/noncore/apps/tinykate/opie-tinykate-syntax.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate-syntax 1Package: opie-tinykate-syntax
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Opie Team <opie@handhelds.org> 4Maintainer: Opie Team <opie@handhelds.org>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION
7Depends: task-opie-minimal, opie-tinykate, opie-tinykate-syntax-commondev, opie-tinykate-syntax-documentation, opie-tinykate-syntax-misc, opie-tinykate-syntax-miscdev, opie-tinykate-syntax-unix, opie-tinykate-syntax-web 6Depends: task-opie-minimal, opie-tinykate, opie-tinykate-syntax-commondev, opie-tinykate-syntax-documentation, opie-tinykate-syntax-misc, opie-tinykate-syntax-miscdev, opie-tinykate-syntax-unix, opie-tinykate-syntax-web
8Description: Syntax Highlighting Patterns virtual package, which installs all available syntax patterns. 7Description: Syntax Highlighting Patterns virtual package, which installs all available syntax patterns.
9Files: 8Files:
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/opie-tinykate.control b/noncore/apps/tinykate/opie-tinykate.control
index 95dd7e0..731375c 100644
--- a/noncore/apps/tinykate/opie-tinykate.control
+++ b/noncore/apps/tinykate/opie-tinykate.control
@@ -1,9 +1,9 @@
1Package: opie-tinykate 1Package: opie-tinykate
2Files: bin/tinykate apps/Applications/tinykate.desktop pics/tinykate $OPIEDIR/lib/libtinykate.so.1.0.0 $OPIEDIR/lib/libtinykate.so.1.0 $OPIEDIR/lib/libtinykate.so.1 2Files: bin/tinykate apps/Applications/tinykate.desktop pics/tinykate $OPIEDIR/lib/libtinykate.so.1.0.0 $OPIEDIR/lib/libtinykate.so.1.0 $OPIEDIR/lib/libtinykate.so.1
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Opie Team <opie@handhelds.org> 5Maintainer: Opie Team <opie@handhelds.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Kate for opie 8Description: Kate for opie
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp
index dda8405..f470645 100644
--- a/noncore/apps/tinykate/tinykate.cpp
+++ b/noncore/apps/tinykate/tinykate.cpp
@@ -1,321 +1,283 @@
1/*************************************************************************** 1/***************************************************************************
2 tinykate.cpp 2 tinykate.cpp
3 Tiny KATE mainwindow 3 Tiny KATE mainwindow
4 ------------------- 4 -------------------
5 begin : November 2002 5 begin : November 2002
6 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org> 6 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org>
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free softwaSre; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation. * 13 * the Free Software Foundation. *
14 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE * 14 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17#include <qwidget.h> 17#include <qwidget.h>
18#include <qaction.h> 18#include <qaction.h>
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qpe/qpetoolbar.h> 20#include <qtoolbutton.h>
21#include <qpe/qpemenubar.h> 21#include <qmenubar.h>
22#include <qpe/resource.h> 22#include <qpe/resource.h>
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25 25
26#include <opie/ofiledialog.h> 26#include <opie/ofiledialog.h>
27 27
28#include "cgotoline.h"
29
30#include "tinykate.h" 28#include "tinykate.h"
31 29
32#include <katedocument.h> 30#include <katedocument.h>
33#include <katehighlight.h> 31#include <katehighlight.h>
34#include <kateview.h> 32#include <kateview.h>
35#include <kglobal.h> 33#include <kglobal.h>
36 34
37TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : 35TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) :
38 QMainWindow( parent, name, f ) 36 QMainWindow( parent, name, f )
39{ 37{
38 shutDown=false;
40 nextUnnamed=0; 39 nextUnnamed=0;
41 currentView=0; 40 currentView=0;
42 viewCount=0; 41 viewCount=0;
43 setCaption("TinyKATE : line 1 col 1"); 42 setCaption(tr("TinyKATE"));
44 KGlobal::setAppName("TinyKATE"); 43 KGlobal::setAppName("TinyKATE");
45 44
46 curLine=curCol=1; 45 QMenuBar *mb = new QMenuBar( this );
47 46 mb->setMargin( 0 );
48 setToolBarsMovable(FALSE);
49
50 QPEToolBar *bar = new QPEToolBar( this );
51 bar->setHorizontalStretchable( TRUE );
52 QPEMenuBar *mb = new QPEMenuBar( bar );
53 mb->setMargin( 0 );
54 47
55 tabwidget=new OTabWidget(this); 48 tabwidget=new OTabWidget(this);
56 setCentralWidget(tabwidget); 49 setCentralWidget(tabwidget);
57 connect(tabwidget,SIGNAL(currentChanged( QWidget *)),this,SLOT(slotCurrentChanged(QWidget *))); 50 connect(tabwidget,SIGNAL(currentChanged( QWidget *)),this,SLOT(slotCurrentChanged(QWidget *)));
58 51
59//FILE ACTIONS 52//FILE ACTIONS
60 QPopupMenu *popup = new QPopupMenu( this ); 53 QPopupMenu *popup = new QPopupMenu( this );
61 54
62 // Action for creating a new document 55 // Action for creating a new document
63 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, CTRL+Key_N, this, 0 ); 56 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
64 a->addTo( popup ); 57 a->addTo( popup );
65 connect(a, SIGNAL(activated()), this, SLOT(slotNew())); 58 connect(a, SIGNAL(activated()), this, SLOT(slotNew()));
66 59
67 // Action for opening an exisiting document 60 // Action for opening an exisiting document
68 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, CTRL+Key_O, this, 0 ); 61 a = new QAction( tr( "Open" ),Resource::loadPixmap( "fileopen" ) , QString::null, 0, this, 0 );
69 a->addTo(popup); 62 a->addTo(popup);
70 connect(a, SIGNAL(activated()), this, SLOT(slotOpen())); 63 connect(a, SIGNAL(activated()), this, SLOT(slotOpen()));
71 64
72 65
73 // Action for saving document 66 // Action for saving document
74 a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ), QString::null, CTRL+Key_S, this, 0 ); 67 a = new QAction( tr( "Save" ), Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 );
75 a->addTo(popup); 68 a->addTo(popup);
76 connect(a, SIGNAL(activated()), this, SLOT(slotSave())); 69 connect(a, SIGNAL(activated()), this, SLOT(slotSave()));
77 70
78 // Action for saving document to a new name 71 // Action for saving document to a new name
79 a = new QAction( tr( "Save As" ), Resource::loadPixmap( "save" ), QString::null, 0, this, 0 ); 72 a = new QAction( tr( "Save As" ),Resource::loadPixmap( "save" ) , QString::null, 0, this, 0 );
80 a->addTo(popup); 73 a->addTo(popup);
81 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs())); 74 connect(a, SIGNAL(activated()), this, SLOT(slotSaveAs()));
82 75
83 // Action for closing the currently active document 76 // Action for closing the currently active document
84 a = new QAction( tr( "Close" ), Resource::loadPixmap( "close" ), QString::null, CTRL+Key_W, this, 0 ); 77 a = new QAction( tr( "Close" ), Resource::loadPixmap( "quit_icon" ) , QString::null, 0, this, 0 );
85 a->addTo(popup); 78 a->addTo(popup);
86 connect(a, SIGNAL(activated()), this, SLOT(slotClose())); 79 connect(a, SIGNAL(activated()), this, SLOT(slotClose()));
87 80
88 81
89 mb->insertItem(tr("File"),popup); 82 mb->insertItem(tr("File"),popup);
90 83
91//EDIT ACTIONS 84//EDIT ACTIONS
92 85
93 // Action for cutting text 86 // Action for cutting text
94 editCut = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ), QString::null, CTRL+Key_X, this, 0 ); 87 editCut = new QToolButton( 0 );
95 editCut->addTo( bar ); 88 editCut->setAutoRaise( true );
89 editCut->setIconSet( Resource::loadPixmap( "cut" ) );
96 90
97 // Action for Copying text 91 // Action for Copying text
98 editCopy = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ), QString::null, CTRL+Key_C, this, 0 ); 92 editCopy = new QToolButton( 0 );
99 editCopy->addTo( bar ); 93 editCopy->setAutoRaise( true );
94 editCopy->setIconSet( Resource::loadPixmap( "copy" ) );
100 95
101 // Action for pasting text 96 // Action for pasting text
102 editPaste = new QAction( tr( "Paste" ), Resource::loadPixmap( "paste" ), QString::null, CTRL+Key_V, this, 0 ); 97 editPaste = new QToolButton( 0 );
103 editPaste->addTo( bar ); 98 editPaste->setAutoRaise( true );
104 99 editPaste->setIconSet( Resource::loadPixmap( "paste" ) );
105 100
106 // Action for finding / replacing text 101 // Action for finding / replacing text
107 editFindReplace = new QAction( tr( "Replace" ), Resource::loadPixmap("find"), QString::null, CTRL+Key_R, this, 0 ); 102 editFindReplace = new QToolButton( 0 );
108 editFind = new QAction( tr( "Find" ), Resource::loadPixmap("find"), QString::null, CTRL+Key_F, this, 0 ); 103 editFindReplace->setAutoRaise( true );
109 editFind->addTo( bar ); 104 editFindReplace->setIconSet( Resource::loadPixmap("find") );
110 105
111 // Action for undo 106 // Action for undo
112 editUndo = new QAction( tr( "Undo" ), Resource::loadPixmap( "undo" ), QString::null, CTRL+Key_Z, this, 0 ); 107 editUndo = new QToolButton( 0 );
113 editUndo->addTo( bar ); 108 editUndo->setAutoRaise( true );
109 editUndo->setIconSet( Resource::loadPixmap( "undo" ) );
114 110
115 // Action for redo 111 // Action for redo
116 editRedo = new QAction( tr( "Redo" ), Resource::loadPixmap( "redo" ), QString::null, CTRL+SHIFT+Key_Z, this, 0 ); 112 editRedo = new QToolButton( 0 );
117 editRedo->addTo( bar ); 113 editRedo->setAutoRaise( true );
118 114 editRedo->setIconSet( Resource::loadPixmap( "redo" ) );
119 115
120//VIEW ACITONS 116//VIEW ACITONS
121 popup = new QPopupMenu( this ); 117 popup = new QPopupMenu( this );
122 118
123 a = new QAction( tr( "Goto" ), QString::null, CTRL+Key_G, this, 0 );
124 a->addTo( popup );
125 connect(a, SIGNAL(activated()), this, SLOT(slotGoTo()));
126
127 viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 ); 119 viewIncFontSizes = new QAction( tr( "Font +" ), QString::null, 0, this, 0 );
128 viewIncFontSizes->addTo( popup ); 120 viewIncFontSizes->addTo( popup );
129 121
130 viewDecFontSizes = new QAction( tr( "Font -" ), QString::null, 0, this, 0 ); 122 viewDecFontSizes = new QAction( tr( "Font -" ), QString::null, 0, this, 0 );
131 viewDecFontSizes->addTo( popup ); 123 viewDecFontSizes->addTo( popup );
132 124
133 mb->insertItem(tr("View"),popup); 125 mb->insertItem(tr("View"),popup);
134 126
127 popup = new QPopupMenu( this );
128 mb->insertItem(tr("Utils"),popup);
135 129
136 130
137 popup = new QPopupMenu( this ); 131 mb->insertItem( editCut );
138 mb->insertItem(tr("Utils"),popup); 132 mb->insertItem( editCopy );
133 mb->insertItem( editPaste );
134 mb->insertItem( editFindReplace );
135 mb->insertItem( editUndo );
136 mb->insertItem( editRedo );
137
139 138
140//Highlight management 139//Highlight management
141 hlmenu=new QPopupMenu(this); 140 hlmenu=new QPopupMenu(this);
142 HlManager *hlm=HlManager::self(); 141 HlManager *hlm=HlManager::self();
143 for (int i=0;i<hlm->highlights();i++) 142 for (int i=0;i<hlm->highlights();i++)
144 { 143 {
145 hlmenu->insertItem(hlm->hlName(i),i); 144 hlmenu->insertItem(hlm->hlName(i),i);
146 } 145 }
147 popup->insertItem(tr("Highlighting"),hlmenu); 146 popup->insertItem(tr("Highlighting"),hlmenu);
148 147
149 148
150 utilSettings = new QAction( tr( "Settings" ), QString::null, 0, this, 0 ); 149 utilSettings = new QAction( tr( "Settings" ), QString::null, 0, this, 0 );
151 utilSettings->addTo( popup); 150 utilSettings->addTo( popup);
152 151
153 popup->insertSeparator();
154 editFind->addTo(popup);
155 editFindReplace->addTo(popup);
156
157 if( qApp->argc() > 1) open(qApp->argv()[1]); 152 if( qApp->argc() > 1) open(qApp->argv()[1]);
158 else slotNew(); 153 else slotNew();
159 154
160} 155}
161 156
162TinyKate::~TinyKate( ) 157TinyKate::~TinyKate( )
163{ 158{
164 qWarning("TinyKate destructor\n"); 159 qWarning("TinyKate destructor\n");
165 printf("~TinyKate()\n"); 160
161 shutDown=true;
162 while (currentView!=0) {
163 slotClose();
164 }
165
166 if( KGlobal::config() != 0 ) { 166 if( KGlobal::config() != 0 ) {
167 printf("~TinyKate(): delete configs...\n");
168 qWarning("deleting KateConfig object..\n"); 167 qWarning("deleting KateConfig object..\n");
169 delete KGlobal::config(); 168 delete KGlobal::config();
170 } 169 }
171} 170}
172 171
173void TinyKate::slotOpen( ) 172void TinyKate::slotOpen( )
174{ 173{
175 QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL, 174 QString filename = OFileDialog::getOpenFileName( OFileSelector::EXTENDED_ALL,
176 QString::null); 175 QString::null);
177 if (!filename.isEmpty()) { 176 if (!filename.isEmpty()) {
178 open(filename); 177 open(filename);
179 } 178 }
180} 179}
181 180
182void TinyKate::open(const QString & filename) 181void TinyKate::open(const QString & filename)
183{ 182{
184 KateDocument *kd= new KateDocument(false, false, this,0,this); 183 KateDocument *kd= new KateDocument(false, false, this,0,this);
185 KTextEditor::View *kv; 184 KTextEditor::View *kv;
186 QFileInfo fi(filename); 185 QFileInfo fi(filename);
187 QString filenamed = fi.fileName(); 186 QString filenamed = fi.fileName();
188 tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed ); 187 tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate", filenamed );
189 qDebug(filename); 188 qDebug(filename);
190 189
191 kd->setDocName( filenamed); 190 kd->setDocName( filenamed);
192 kd->open( filename ); 191 kd->open( filename );
193 viewCount++; 192 viewCount++;
194} 193}
195 194
196void TinyKate::setDocument(const QString &doc) 195void TinyKate::setDocument(const QString& fileref)
197{ 196{
198 printf("tinykate: setDocument(\"%s\")\n",(const char*)doc); 197 open( fileref );
199 open(doc);
200} 198}
201 199
202void TinyKate::slotCurrentChanged( QWidget * view) 200void TinyKate::slotCurrentChanged( QWidget * view)
203{ 201{
204 if (currentView) { 202 if (currentView) {
205 203
206 disconnect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); 204 disconnect(editCopy,SIGNAL(activated()),currentView,SLOT(copy()));
207 disconnect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); 205 disconnect(editCut,SIGNAL(activated()),currentView,SLOT(cut()));
208 disconnect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); 206 disconnect(editPaste,SIGNAL(activated()),currentView,SLOT(paste()));
209 disconnect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); 207 disconnect(editUndo,SIGNAL(activated()),currentView,SLOT(undo()));
210 disconnect(editRedo,SIGNAL(activated()),currentView,SLOT(redo())); 208 disconnect(editRedo,SIGNAL(activated()),currentView,SLOT(redo()));
211 disconnect(editFindReplace,SIGNAL(activated()),currentView,SLOT(replace())); 209 disconnect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
212 disconnect(editFind,SIGNAL(activated()),currentView,SLOT(find())); 210 disconnect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));
213 disconnect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
214 disconnect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));
215 disconnect(hlmenu,SIGNAL(activated(int)), currentView,SLOT(setHl(int))); 211 disconnect(hlmenu,SIGNAL(activated(int)), currentView,SLOT(setHl(int)));
216 disconnect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog())); 212 disconnect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog()));
217 disconnect(currentView,SIGNAL(newCurPos()),this,SLOT(slotCursorMoved()));
218 } 213 }
219 214
220 currentView=(KTextEditor::View*)view; 215 currentView=(KTextEditor::View*)view;
221 216
222 connect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); 217 connect(editCopy,SIGNAL(clicked()),currentView,SLOT(copy()));
223 connect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); 218 connect(editCut,SIGNAL(clicked()),currentView,SLOT(cut()));
224 connect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); 219 connect(editPaste,SIGNAL(clicked()),currentView,SLOT(paste()));
225 connect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); 220 connect(editUndo,SIGNAL(clicked()),currentView,SLOT(undo()));
226 connect(editRedo,SIGNAL(activated()),currentView,SLOT(redo())); 221 connect(editRedo,SIGNAL(clicked()),currentView,SLOT(redo()));
227 connect(editFindReplace,SIGNAL(activated()),currentView,SLOT(replace()));
228 connect(editFind,SIGNAL(activated()),currentView,SLOT(find()));
229 connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes())); 222 connect(viewIncFontSizes,SIGNAL(activated()), currentView,SLOT(slotIncFontSizes()));
230 connect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes())); 223 connect(viewDecFontSizes,SIGNAL(activated()), currentView,SLOT(slotDecFontSizes()));
231 connect(hlmenu,SIGNAL(activated(int)), currentView,SLOT(setHl(int))); 224 connect(hlmenu,SIGNAL(activated(int)), currentView,SLOT(setHl(int)));
232 connect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog())); 225 connect(utilSettings,SIGNAL(activated()), currentView,SLOT(configDialog()));
233 connect(currentView,SIGNAL(newCurPos()),this,SLOT(slotCursorMoved())); 226
234} 227}
235 228
236void TinyKate::slotNew( ) 229void TinyKate::slotNew( )
237{ 230{
238 KateDocument *kd= new KateDocument(false, false, this,0,this); 231 KateDocument *kd= new KateDocument(false, false, this,0,this);
239 KTextEditor::View *kv; 232 KTextEditor::View *kv;
240 tabwidget->addTab(kv=kd->createView(tabwidget,"BLAH"), 233 tabwidget->addTab(kv=kd->createView(tabwidget,"BLAH"),
241 "tinykate/tinykate", 234 "tinykate/tinykate",
242 tr("Unnamed %1").arg(nextUnnamed++)); 235 tr("Unnamed %1").arg(nextUnnamed++));
243 viewCount++; 236 viewCount++;
244} 237}
245 238
246void TinyKate::slotClose( ) 239void TinyKate::slotClose( )
247{ 240{
248 if (currentView==0) return; 241 if (currentView==0) return;
249 KTextEditor::View *dv=currentView; 242 KTextEditor::View *dv=currentView;
250 currentView=0; 243 currentView=0;
251 tabwidget->removePage(dv); 244 tabwidget->removePage(dv);
252 delete dv->document(); 245 delete dv->document();
253 viewCount--; 246 viewCount--;
254 if (!viewCount) slotNew(); 247 if ((!viewCount) && (!shutDown)) slotNew();
255} 248}
256 249
257void TinyKate::slotSave() { 250void TinyKate::slotSave() {
258 // feel free to make this how you want 251 // feel free to make this how you want
259 if (currentView==0) return; 252 if (currentView==0) return;
260 253
261 // KateView *kv = (KateView*) currentView; 254 // KateView *kv = (KateView*) currentView;
262 KateDocument *kd = (KateDocument*) currentView->document(); 255 KateDocument *kd = (KateDocument*) currentView->document();
263 // qDebug("saving file "+kd->docName()); 256 // qDebug("saving file "+kd->docName());
264 if( kd->docName().isEmpty()) 257 if( kd->docName().isEmpty())
265 slotSaveAs(); 258 slotSaveAs();
266 else 259 else
267 kd->saveFile(); 260 kd->saveFile();
268 // kv->save(); 261 // kv->save();
269 // kd->saveFile(); 262 // kd->saveFile();
270} 263}
271 264
272void TinyKate::slotSaveAs() { 265void TinyKate::slotSaveAs() {
273 if (currentView==0) return; 266 if (currentView==0) return;
274 KateDocument *kd = (KateDocument*) currentView->document(); 267 KateDocument *kd = (KateDocument*) currentView->document();
275 268
276 QString filename=OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL, 269 QString filename=OFileDialog::getSaveFileName(OFileSelector::EXTENDED_ALL,
277 QString::null); 270 QString::null);
278 if (!filename.isEmpty()) { 271 if (!filename.isEmpty()) {
279 qDebug("saving file "+filename); 272 qDebug("saving file "+filename);
280 QFileInfo fi(filename); 273 QFileInfo fi(filename);
281 QString filenamed = fi.fileName(); 274 QString filenamed = fi.fileName();
282 kd->setDocFile( filename); 275 kd->setDocFile( filename);
283 kd->setDocName( filenamed); 276 kd->setDocName( filenamed);
284 kd->saveFile(); 277 kd->saveFile();
285// KTextEditor::View *dv = currentView; 278// KTextEditor::View *dv = currentView;
286// tabwidget->changeTab( dv, filenamed); 279// tabwidget->changeTab( dv, filenamed);
287 // need to change tab label here 280 // need to change tab label here
288 } 281 }
289 282
290} 283}
291
292void TinyKate::slotGoTo()
293{
294 int l,c;
295 if (currentView==0) return;
296
297 currentView->getCursorPosition(&l,&c);
298
299 CGotoLine g(l);
300
301 if(g.exec()==QDialog::Accepted)
302 {
303 currentView->setCursorPosition( g.line(), c );
304 }
305}
306
307void TinyKate::slotCursorMoved()
308{
309 char buf[100];
310 int newLine,newCol;
311 currentView->getCursorPosition(&newLine,&newCol);
312 newLine++;
313 newCol++;
314 if((newLine!=curLine)||(newCol!=curCol))
315 {
316 sprintf(buf,"TinyKATE : line %-6d col %d",newLine,newCol);
317 setCaption(buf);
318 curLine=newLine;
319 curCol=newCol;
320 }
321}
diff --git a/noncore/apps/tinykate/tinykate.h b/noncore/apps/tinykate/tinykate.h
index 077d5f0..2bf4de6 100644
--- a/noncore/apps/tinykate/tinykate.h
+++ b/noncore/apps/tinykate/tinykate.h
@@ -2,74 +2,63 @@
2 tinykate.h 2 tinykate.h
3 Tiny KATE mainwindow 3 Tiny KATE mainwindow
4 ------------------- 4 -------------------
5 begin : November 2002 5 begin : November 2002
6 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org> 6 copyright : (C) 2002 by Joseph Wenninger <jowenn@kde.org>
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation. * 13 * the Free Software Foundation. *
14 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE * 14 * ONLY VERSION 2 OF THE LICENSE IS APPLICABLE *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#ifndef __TINYKATE_H__ 18#ifndef __TINYKATE_H__
19#define __TINYKATE_H__ 19#define __TINYKATE_H__
20 20
21 21
22#include <qmainwindow.h> 22#include <qmainwindow.h>
23#include <opie/otabwidget.h> 23#include <opie/otabwidget.h>
24#include <ktexteditor.h> 24#include <ktexteditor.h>
25 25
26class QToolButton;
26class QAction; 27class QAction;
27class QPopupMenu; 28class QPopupMenu;
28class CGotoLine;
29 29
30class TinyKate : public QMainWindow 30class TinyKate : public QMainWindow
31{ 31{
32Q_OBJECT 32Q_OBJECT
33public: 33public:
34 TinyKate( QWidget *parent=0, const char *name=0, WFlags f = 0); 34 TinyKate( QWidget *parent=0, const char *name=0, WFlags f = 0);
35 ~TinyKate( ); 35 ~TinyKate( );
36 36
37public slots: 37public slots:
38 void slotNew(); 38 void slotNew();
39 void setDocument(const QString& fileref);
39 40
40protected slots: 41protected slots:
41 void slotOpen(); 42 void slotOpen();
42 void slotClose(); 43 void slotClose();
43 void slotCurrentChanged(QWidget *); 44 void slotCurrentChanged(QWidget *);
44 void slotSave(); 45 void slotSave();
45 void slotSaveAs(); 46 void slotSaveAs();
46 void slotGoTo();
47 void slotCursorMoved();
48 void setDocument(const QString &doc);
49
50protected: 47protected:
51 void open(const QString&); 48 void open(const QString&);
52private: 49private:
53 QString currentFileName; 50 QString currentFileName;
54 OTabWidget *tabwidget; 51 OTabWidget *tabwidget;
55 KTextEditor::View *currentView; 52 KTextEditor::View *currentView;
56 53 bool shutDown;
57 QAction *editCopy; 54
58 QAction *editCut; 55 QToolButton *editCopy, *editCut, *editPaste, *editUndo, *editRedo, *editFindReplace;
59 QAction *editPaste; 56 QAction *viewIncFontSizes, *viewDecFontSizes, *utilSettings;
60 QAction *editUndo; 57
61 QAction *editRedo;
62 QAction *editFind;
63 QAction *editFindReplace;
64 QAction *viewIncFontSizes;
65 QAction *viewDecFontSizes;
66 QAction *utilSettings;
67
68 QPopupMenu *hlmenu; 58 QPopupMenu *hlmenu;
69 uint nextUnnamed; 59 uint nextUnnamed;
70 uint viewCount; 60 uint viewCount;
71 int curLine,curCol;
72}; 61};
73 62
74 63
75#endif // __TINYKATE_H__ 64#endif // __TINYKATE_H__
diff --git a/noncore/apps/tinykate/tinykate.pro b/noncore/apps/tinykate/tinykate.pro
index f7ff451..632bd49 100644
--- a/noncore/apps/tinykate/tinykate.pro
+++ b/noncore/apps/tinykate/tinykate.pro
@@ -1,22 +1,22 @@
1TEMPLATE = app 1 TEMPLATE= app
2CONFIG = qt warn_on release 2 CONFIG = qt warn_on release
3DESTDIR = $(OPIEDIR)/bin 3 DESTDIR = $(OPIEDIR)/bin
4HEADERS = tinykate.h cgotoline.h 4 HEADERS = tinykate.h
5SOURCES = tinykate.cpp main.cpp cgotoline.cpp 5 SOURCES = tinykate.cpp main.cpp
6INTERFACES = cgotobase.ui 6 INTERFACES=
7INCLUDEPATH += $(OPIEDIR)/include \ 7 INCLUDEPATH+= $(OPIEDIR)/include \
8 $(OPIEDIR)/noncore/apps/tinykate/libkate \ 8 $(OPIEDIR)/noncore/apps/tinykate/libkate \
9 $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \ 9 $(OPIEDIR)/noncore/apps/tinykate/libkate/microkde \
10 $(OPIEDIR)/noncore/apps/tinykate/libkate/document \ 10 $(OPIEDIR)/noncore/apps/tinykate/libkate/document \
11 $(OPIEDIR)/noncore/apps/tinykate/libkate/view \ 11 $(OPIEDIR)/noncore/apps/tinykate/libkate/view \
12 $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \ 12 $(OPIEDIR)/noncore/apps/tinykate/libkate/interfaces \
13 $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \ 13 $(OPIEDIR)/noncore/apps/tinykate/libkate/ktexteditor \
14 $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back 14 $(OPIEDIR)/noncore/apps/tinykate/libkate/qt3back
15 15
16DEPENDPATH += $(OPIEDIR)/include 16 DEPENDPATH+= $(OPIEDIR)/include
17LIBS += -lqpe -ltinykate -lopie 17LIBS += -lqpe -ltinykate -lopie
18TARGET = tinykate 18 TARGET = tinykate
19 19
20 20
21 21
22include ( $(OPIEDIR)/include.pro ) 22include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 45a6663..42093cf 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -991,116 +991,128 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
991{ 991{
992 QString name = item->text(); 992 QString name = item->text();
993 993
994 // Get package 994 // Get package
995 Server *s = mgr->getServer( serversList->currentText() ); 995 Server *s = mgr->getServer( serversList->currentText() );
996 Package *p = s->getPackage( name ); 996 Package *p = s->getPackage( name );
997 997
998 // If the package has a filename then it is a local file 998 // If the package has a filename then it is a local file
999 if ( p->isPackageStoredLocally() ) 999 if ( p->isPackageStoredLocally() )
1000 name = p->getFilename(); 1000 name = p->getFilename();
1001 1001
1002 QString option; 1002 QString option;
1003 QString dest = "root"; 1003 QString dest = "root";
1004 if ( !p->isInstalled() ) 1004 if ( !p->isInstalled() )
1005 { 1005 {
1006 InstallData *newitem = new InstallData(); 1006 InstallData *newitem = new InstallData();
1007 newitem->option = "I"; 1007 newitem->option = "I";
1008 newitem->packageName = name; 1008 newitem->packageName = name;
1009 return newitem; 1009 return newitem;
1010 } 1010 }
1011 else 1011 else
1012 { 1012 {
1013 InstallData *newitem = new InstallData(); 1013 InstallData *newitem = new InstallData();
1014 newitem->option = "D"; 1014 newitem->option = "D";
1015
1016 // If local file, remove using package name, not filename
1017 if ( p->isPackageStoredLocally() )
1018 name = item->text();
1019
1015 if ( !p->isPackageStoredLocally() ) 1020 if ( !p->isPackageStoredLocally() )
1016 newitem->packageName = p->getInstalledPackageName(); 1021 newitem->packageName = p->getInstalledPackageName();
1017 else 1022 else
1018 newitem->packageName = name; 1023 newitem->packageName = name;
1019 1024
1020 if ( p->getInstalledTo() ) 1025 if ( p->getInstalledTo() )
1021 { 1026 {
1022 newitem->destination = p->getInstalledTo(); 1027 newitem->destination = p->getInstalledTo();
1023 } 1028 }
1024 else 1029 else
1025 { 1030 {
1026 newitem->destination = p->getLocalPackage()->getInstalledTo(); 1031 newitem->destination = p->getLocalPackage()->getInstalledTo();
1027 } 1032 }
1028 1033
1029 // Now see if version is newer or not 1034 // Now see if version is newer or not
1030 int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); 1035 int val = compareVersions( p->getInstalledVersion(), p->getVersion() );
1031 1036
1032 // If the version requested is older and user selected a local ipk file, then reinstall the file 1037 // If the version requested is older and user selected a local ipk file, then reinstall the file
1033 if ( p->isPackageStoredLocally() && val == -1 ) 1038 if ( p->isPackageStoredLocally() && val == -1 )
1034 val = 0; 1039 val = 0;
1035 1040
1036 if ( val == -2 ) 1041 if ( val == -2 )
1037 { 1042 {
1038 // Error - should handle 1043 // Error - should handle
1039 } 1044 }
1040 else if ( val == -1 ) 1045 else if ( val == -1 )
1041 { 1046 {
1042 // Version available is older - remove only 1047 // Version available is older - remove only
1043 newitem->option = "D"; 1048 newitem->option = "D";
1049
1050 // If local file, remove using package name, not filename
1051 if ( p->isPackageStoredLocally() )
1052 name = item->text();
1044 } 1053 }
1045 else 1054 else
1046 { 1055 {
1047 QString caption; 1056 QString caption;
1048 QString text; 1057 QString text;
1049 QString secondButton; 1058 QString secondButton;
1050 QString secondOption; 1059 QString secondOption;
1051 if ( val == 0 ) 1060 if ( val == 0 )
1052 { 1061 {
1053 // Version available is the same - option to remove or reinstall 1062 // Version available is the same - option to remove or reinstall
1054 caption = tr( "Do you wish to remove or reinstall\n%1?" ); 1063 caption = tr( "Do you wish to remove or reinstall\n%1?" );
1055 text = tr( "Remove or ReInstall" ); 1064 text = tr( "Remove or ReInstall" );
1056 secondButton = tr( "ReInstall" ); 1065 secondButton = tr( "ReInstall" );
1057 secondOption = "R"; // Internal action code, do not translate 1066 secondOption = "R"; // Internal action code, do not translate
1058 } 1067 }
1059 else if ( val == 1 ) 1068 else if ( val == 1 )
1060 { 1069 {
1061 // Version available is newer - option to remove or upgrade 1070 // Version available is newer - option to remove or upgrade
1062 caption = tr( "Do you wish to remove or upgrade\n%1?" ); 1071 caption = tr( "Do you wish to remove or upgrade\n%1?" );
1063 text = tr( "Remove or Upgrade" ); 1072 text = tr( "Remove or Upgrade" );
1064 secondButton = tr( "Upgrade" ); 1073 secondButton = tr( "Upgrade" );
1065 secondOption = "U"; // Internal action code, do not translate 1074 secondOption = "U"; // Internal action code, do not translate
1066 } 1075 }
1067 1076
1068 // Sticky option not implemented yet, but will eventually allow 1077 // Sticky option not implemented yet, but will eventually allow
1069 // the user to say something like 'remove all' 1078 // the user to say something like 'remove all'
1070 if ( stickyOption == "" ) 1079 if ( stickyOption == "" )
1071 { 1080 {
1072 QString msgtext; 1081 QString msgtext;
1073 msgtext = caption.arg( ( const char * )name ); 1082 msgtext = caption.arg( ( const char * )name );
1074 QuestionDlg dlg( text, msgtext, secondButton ); 1083 QuestionDlg dlg( text, msgtext, secondButton );
1075 switch( dlg.exec() ) 1084 switch( dlg.exec() )
1076 { 1085 {
1077 case 0: // Cancel 1086 case 0: // Cancel
1078 delete newitem; 1087 delete newitem;
1079 return 0x0; 1088 return 0x0;
1080 break; 1089 break;
1081 case 1: // Remove 1090 case 1: // Remove
1082 newitem->option = "D"; 1091 newitem->option = "D";
1092 // If local file, remove using package name, not filename
1093 if ( p->isPackageStoredLocally() )
1094 name = item->text();
1083 break; 1095 break;
1084 case 2: // Reinstall or Upgrade 1096 case 2: // Reinstall or Upgrade
1085 newitem->option = secondOption; 1097 newitem->option = secondOption;
1086 break; 1098 break;
1087 } 1099 }
1088 } 1100 }
1089 else 1101 else
1090 { 1102 {
1091// newitem->option = stickyOption; 1103// newitem->option = stickyOption;
1092 } 1104 }
1093 } 1105 }
1094 1106
1095 1107
1096 // Check if we are reinstalling the same version 1108 // Check if we are reinstalling the same version
1097 if ( newitem->option != "R" ) 1109 if ( newitem->option != "R" )
1098 newitem->recreateLinks = true; 1110 newitem->recreateLinks = true;
1099 else 1111 else
1100 newitem->recreateLinks = false; 1112 newitem->recreateLinks = false;
1101 1113
1102 // User hit cancel (on dlg - assume remove) 1114 // User hit cancel (on dlg - assume remove)
1103 return newitem; 1115 return newitem;
1104 } 1116 }
1105} 1117}
1106 1118
diff --git a/noncore/settings/aqpkg/opie-aqpkg.control b/noncore/settings/aqpkg/opie-aqpkg.control
index b8ad1e8..46bffdd 100644
--- a/noncore/settings/aqpkg/opie-aqpkg.control
+++ b/noncore/settings/aqpkg/opie-aqpkg.control
@@ -1,11 +1,11 @@
1Package: opie-aqpkg 1Package: opie-aqpkg
2Files: bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop 2Files: bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop
3Priority: optional 3Priority: optional
4Section: Settings 4Section: Settings
5Version: $QPE_VERSION-$SUB_VERSION
6Depends: task-opie-minimal 5Depends: task-opie-minimal
7Replaces: aqpkg 6Replaces: aqpkg
8Architecture: arm 7Architecture: arm
9Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) 8Maintainer: Andy Qua (andy.qua@blueyonder.co.uk)
10Description: A Package Manager 9Description: A Package Manager
11 10
11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index adda832..5a521d3 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -95,48 +95,49 @@ void Package :: setStatus( const QString &s )
95 95
96 two = status.find( " " ); // find second column 96 two = status.find( " " ); // find second column
97 three = status.find( " ", two + 1 ); // find third column 97 three = status.find( " ", two + 1 ); // find third column
98 98
99 state_status = status.mid( three ).stripWhiteSpace( ); 99 state_status = status.mid( three ).stripWhiteSpace( );
100 100
101 if ( state_status == "installed" ) 101 if ( state_status == "installed" )
102 installed = true; 102 installed = true;
103} 103}
104 104
105void Package :: setLocalPackage( Package *p ) 105void Package :: setLocalPackage( Package *p )
106{ 106{
107 localPackage = p; 107 localPackage = p;
108 108
109 if ( localPackage ) 109 if ( localPackage )
110 if ( localPackage->getVersion() < getVersion() && !installed ) 110 if ( localPackage->getVersion() < getVersion() && !installed )
111 differentVersionAvailable = true; 111 differentVersionAvailable = true;
112 else 112 else
113 differentVersionAvailable = false; 113 differentVersionAvailable = false;
114} 114}
115 115
116void Package :: setVersion( const QString &v ) 116void Package :: setVersion( const QString &v )
117{ 117{
118 version = v; 118 version = v;
119 differentVersionAvailable = false;
119 120
120 if ( localPackage ) 121 if ( localPackage )
121 if ( localPackage->getVersion() < getVersion() && !installed ) 122 if ( localPackage->getVersion() < getVersion() && !installed )
122 differentVersionAvailable = true; 123 differentVersionAvailable = true;
123 else 124 else
124 differentVersionAvailable = false; 125 differentVersionAvailable = false;
125} 126}
126 127
127void Package :: setPackageName( const QString &name ) 128void Package :: setPackageName( const QString &name )
128{ 129{
129 packageName = name; 130 packageName = name;
130} 131}
131 132
132void Package :: setDescription( const QString &d ) 133void Package :: setDescription( const QString &d )
133{ 134{
134 description = d; 135 description = d;
135} 136}
136 137
137void Package :: setFilename( const QString &f ) 138void Package :: setFilename( const QString &f )
138{ 139{
139 filename = f; 140 filename = f;
140} 141}
141 142
142 143
diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp
index 9553cd1..499d647 100644
--- a/noncore/settings/aqpkg/packagewin.cpp
+++ b/noncore/settings/aqpkg/packagewin.cpp
@@ -23,91 +23,92 @@
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23  -_. . .   )=.  = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24    --        :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "packagewin.h" 30#include "packagewin.h"
31#include "package.h" 31#include "package.h"
32#include "datamgr.h" 32#include "datamgr.h"
33 33
34#include <qpe/resource.h> 34#include <qpe/resource.h>
35 35
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qstring.h> 38#include <qstring.h>
39#include <qtextview.h> 39#include <qtextview.h>
40 40
41PackageWindow::PackageWindow( Package *package, const QString &server ) 41PackageWindow::PackageWindow( Package *package, const QString &server )
42 : QWidget( 0, 0, 0 ) 42 : QWidget( 0, 0, 0 )
43{ 43{
44 QString str; 44 QString str;
45 if ( package ) 45 if ( package )
46 { 46 {
47 Package *local = package->getLocalPackage();
47 setCaption( package->getPackageName() ); 48 setCaption( package->getPackageName() );
48 QString destName; 49 QString destName;
49 if ( package->getLocalPackage() ) 50 if ( local )
50 { 51 {
51 if ( package->getLocalPackage()->getInstalledTo() ) 52 if ( local->getInstalledTo() )
52 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); 53 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName();
53 } 54 }
54 else 55 else
55 { 56 {
56 if ( package->getInstalledTo() ) 57 if ( package->getInstalledTo() )
57 destName = package->getInstalledTo()->getDestinationName(); 58 destName = package->getInstalledTo()->getDestinationName();
58 } 59 }
59 60
60 if ( !package->isPackageStoredLocally() ) 61 if ( !package->isPackageStoredLocally() )
61 { 62 {
62 str.append( tr( "<b>Description</b> - " ) ); 63 str.append( tr( "<b>Description</b> - " ) );
63 str.append( package->getDescription() ); 64 str.append( package->getDescription() );
64 if ( !destName.isNull() ) 65 if ( !destName.isNull() )
65 { 66 {
66 str.append( tr( "<p><b>Installed To</b> - " ) ); 67 str.append( tr( "<p><b>Installed To</b> - " ) );
67 str.append( destName ); 68 str.append( destName );
68 } 69 }
69 str.append( tr( "<p><b>Size</b> - " ) ); 70 str.append( tr( "<p><b>Size</b> - " ) );
70 str.append( package->getPackageSize() ); 71 str.append( package->getPackageSize() );
71 str.append( tr( "<p><b>Section</b> - " ) ); 72 str.append( tr( "<p><b>Section</b> - " ) );
72 str.append( package->getSection() ); 73 str.append( package->getSection() );
73 } 74 }
74 else 75 else
75 { 76 {
76 str.append( tr( "<p><b>Filename</b> - " ) ); 77 str.append( tr( "<p><b>Filename</b> - " ) );
77 str.append( package->getFilename() ); 78 str.append( package->getFilename() );
78 } 79 }
79 80
80 if ( server == LOCAL_SERVER ) 81 if ( server == LOCAL_SERVER )
81 { 82 {
82 str.append( tr( "<p><b>Version Installed</b> - " ) ); 83 str.append( tr( "<p><b>Version Installed</b> - " ) );
83 str.append( package->getVersion() ); 84 str.append( package->getVersion() );
84 } 85 }
85 else 86 else
86 { 87 {
87 str.append( tr( "<p><b>Version Available</b> - " ) ); 88 str.append( tr( "<p><b>Version Available</b> - " ) );
88 str.append( package->getVersion() ); 89 str.append( package->getVersion() );
89 if ( package->getLocalPackage() ) 90 if ( local )
90 { 91 {
91 if ( package->isInstalled() ) 92 if ( package->isInstalled() )
92 { 93 {
93 str.append( tr( "<p><b>Version Installed</b> - " ) ); 94 str.append( tr( "<p><b>Version Installed</b> - " ) );
94 str.append( package->getInstalledVersion() ); 95 str.append( package->getInstalledVersion() );
95 } 96 }
96 } 97 }
97 } 98 }
98 } 99 }
99 else 100 else
100 { 101 {
101 setCaption( tr( "Package Information" ) ); 102 setCaption( tr( "Package Information" ) );
102 str = tr( "Package information is unavailable" ); 103 str = tr( "Package information is unavailable" );
103 } 104 }
104 105
105 QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); 106 QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 );
106 107
107 QTextView *l = new QTextView( str, QString::null, this ); 108 QTextView *l = new QTextView( str, QString::null, this );
108 layout->addWidget( l ); 109 layout->addWidget( l );
109 110
110 QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); 111 QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this );
111 layout->addWidget( btn ); 112 layout->addWidget( btn );
112 connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) ); 113 connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) );
113 114
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 4693db1..0282236 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -98,49 +98,49 @@ void Server :: readStatusFile( QList<Destination> &destList )
98 } 98 }
99} 99}
100 100
101void Server :: readLocalIpks( Server *local ) 101void Server :: readLocalIpks( Server *local )
102{ 102{
103 cleanUp(); 103 cleanUp();
104 104
105#ifdef QWS 105#ifdef QWS
106 // First, get any local IPKGs in the documents area 106 // First, get any local IPKGs in the documents area
107 // Only applicable to Qtopie/Opie 107 // Only applicable to Qtopie/Opie
108 108
109 DocLnkSet files; 109 DocLnkSet files;
110 Global::findDocuments( &files, "application/ipkg" ); 110 Global::findDocuments( &files, "application/ipkg" );
111 111
112 // Now add the items to the list 112 // Now add the items to the list
113 QListIterator<DocLnk> it( files.children() ); 113 QListIterator<DocLnk> it( files.children() );
114 114
115 for ( ; it.current() ; ++it ) 115 for ( ; it.current() ; ++it )
116 { 116 {
117 // OK, we have a local IPK file, I think the standard naming conventions 117 // OK, we have a local IPK file, I think the standard naming conventions
118 // for these are packagename_version_arm.ipk 118 // for these are packagename_version_arm.ipk
119 QString file = (*it)->file(); 119 QString file = (*it)->file();
120 120
121 // Changed to display the filename (excluding the path) 121 // Changed to display the filename (excluding the path)
122 QString packageName = Utils::getFilenameFromIpkFilename( file ); 122 QString packageName = Utils::getPackageNameFromIpkFilename( file );
123 QString ver = Utils::getPackageVersionFromIpkFilename( file ); 123 QString ver = Utils::getPackageVersionFromIpkFilename( file );
124 Package *package = new Package( packageName ); 124 Package *package = new Package( packageName );
125 package->setVersion( ver ); 125 package->setVersion( ver );
126 package->setFilename( file ); 126 package->setFilename( file );
127 package->setPackageStoredLocally( true ); 127 package->setPackageStoredLocally( true );
128 packageList.append( package ); 128 packageList.append( package );
129 } 129 }
130#else 130#else
131 QString names[] = { "advancedfm_0.9.1-20020811_arm.ipk", "libopie_0.9.1-20020811_arm.ipk", "libopieobex_0.9.1-20020811.1_arm.ipk", "opie-addressbook_0.9.1-20020811_arm.ipk" }; 131 QString names[] = { "advancedfm_0.9.1-20020811_arm.ipk", "libopie_0.9.1-20020811_arm.ipk", "libopieobex_0.9.1-20020811.1_arm.ipk", "opie-addressbook_0.9.1-20020811_arm.ipk" };
132 for ( int i = 0 ; i < 4 ; ++i ) 132 for ( int i = 0 ; i < 4 ; ++i )
133 { 133 {
134 // OK, we have a local IPK file, I think the standard naming conventions 134 // OK, we have a local IPK file, I think the standard naming conventions
135 // for these are packagename_version_arm.ipk 135 // for these are packagename_version_arm.ipk
136 QString file = names[i]; 136 QString file = names[i];
137 int p = file.find( "_" ); 137 int p = file.find( "_" );
138 QString tmp = file.mid( 0, p ); 138 QString tmp = file.mid( 0, p );
139 packageList.push_back( Package( tmp ) ); 139 packageList.push_back( Package( tmp ) );
140 int p2 = file.find( "_", p+1 ); 140 int p2 = file.find( "_", p+1 );
141 tmp = file.mid( p+1, p2-(p+1) ); 141 tmp = file.mid( p+1, p2-(p+1) );
142 packageList.back().setVersion( tmp ); 142 packageList.back().setVersion( tmp );
143 packageList.back().setPackageStoredLocally( true ); 143 packageList.back().setPackageStoredLocally( true );
144 } 144 }
145#endif 145#endif
146 146
@@ -223,63 +223,74 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
223 } 223 }
224 else if ( key == "Section" ) 224 else if ( key == "Section" )
225 { 225 {
226 if ( currPackage ) 226 if ( currPackage )
227 currPackage->setSection( value ); 227 currPackage->setSection( value );
228 228
229 DataManager::setAvailableCategories( value ); 229 DataManager::setAvailableCategories( value );
230 } 230 }
231 else if ( key == QString::null ) 231 else if ( key == QString::null )
232 { 232 {
233 newPackage = true; 233 newPackage = true;
234 } 234 }
235 } 235 }
236 236
237 f.close(); 237 f.close();
238 238
239 // build local packages 239 // build local packages
240 buildLocalPackages( local ); 240 buildLocalPackages( local );
241} 241}
242 242
243void Server :: buildLocalPackages( Server *local ) 243void Server :: buildLocalPackages( Server *local )
244{ 244{
245 Package *curr; 245 Package *curr;
246 QListIterator<Package> it( packageList ); 246 QListIterator<Package> it( packageList );
247
248 QList<Package> *locallist = &local->getPackageList();
249
247 for ( ; it.current(); ++it ) 250 for ( ; it.current(); ++it )
248 { 251 {
249 curr = it.current(); 252 curr = it.current();
250 QString name = curr->getPackageName(); 253 QString name = curr->getPackageName();
251 254
252 // If the package name is an ipk name, then convert the filename to a package name 255 // If the package name is an ipk name, then convert the filename to a package name
253 if ( name.find( ".ipk" ) != -1 ) 256 if ( name.find( ".ipk" ) != -1 )
254 name = Utils::getPackageNameFromIpkFilename( curr->getFilename() ); 257 name = Utils::getPackageNameFromIpkFilename( curr->getFilename() );
255 258
256 if ( local ) 259 if ( local )
257 { 260 {
258 Package *p = local->getPackage( name ); 261 Package *p = local->getPackage( name );
259 curr->setLocalPackage( p ); 262 curr->setLocalPackage( p );
260 if ( p ) 263 if ( p )
261 { 264 {
265 // Replace local version
266 if ( curr->getVersion() > p->getVersion() )
267 {
268 int pos = locallist->at();
269 locallist->remove( p );
270 locallist->insert( pos, curr );
271 }
272
262 // Set some default stuff like size and things 273 // Set some default stuff like size and things
263 if ( p->getInstalledVersion() == curr->getVersion() ) 274 if ( p->getInstalledVersion() == curr->getVersion() )
264 { 275 {
265 p->setPackageSize( curr->getPackageSize() ); 276 p->setPackageSize( curr->getPackageSize() );
266 p->setSection( curr->getSection() ); 277 p->setSection( curr->getSection() );
267 p->setDescription( curr->getDescription() ); 278 p->setDescription( curr->getDescription() );
268 } 279 }
269 } 280 }
270 281
271 } 282 }
272 else 283 else
273 curr->setLocalPackage( 0 ); 284 curr->setLocalPackage( 0 );
274 } 285 }
275 286
276} 287}
277 288
278Package *Server :: getPackage( QString &name ) 289Package *Server :: getPackage( QString &name )
279{ 290{
280 return getPackage( (const char *)name ); 291 return getPackage( (const char *)name );
281} 292}
282 293
283Package *Server :: getPackage( const char *name ) 294Package *Server :: getPackage( const char *name )
284{ 295{
285 Package *ret = 0; 296 Package *ret = 0;
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp
index 3d127a8..8def0d6 100644
--- a/noncore/settings/sysinfo/modulesinfo.cpp
+++ b/noncore/settings/sysinfo/modulesinfo.cpp
@@ -27,49 +27,49 @@
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlistview.h> 28#include <qlistview.h>
29#include <qmessagebox.h> 29#include <qmessagebox.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qtimer.h> 32#include <qtimer.h>
33#include <qwhatsthis.h> 33#include <qwhatsthis.h>
34 34
35#include "modulesinfo.h" 35#include "modulesinfo.h"
36#include "detail.h" 36#include "detail.h"
37 37
38ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) 38ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl )
39 : QWidget( parent, name, fl ) 39 : QWidget( parent, name, fl )
40{ 40{
41 QGridLayout *layout = new QGridLayout( this ); 41 QGridLayout *layout = new QGridLayout( this );
42 layout->setSpacing( 4 ); 42 layout->setSpacing( 4 );
43 layout->setMargin( 4 ); 43 layout->setMargin( 4 );
44 44
45 ModulesView = new QListView( this ); 45 ModulesView = new QListView( this );
46 int colnum = ModulesView->addColumn( tr( "Module" ) ); 46 int colnum = ModulesView->addColumn( tr( "Module" ) );
47 colnum = ModulesView->addColumn( tr( "Size" ) ); 47 colnum = ModulesView->addColumn( tr( "Size" ) );
48 ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); 48 ModulesView->setColumnAlignment( colnum, Qt::AlignRight );
49 colnum = ModulesView->addColumn( tr( "Use#" ) ); 49 colnum = ModulesView->addColumn( tr( "Use#" ) );
50 ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); 50 ModulesView->setColumnAlignment( colnum, Qt::AlignRight );
51 colnum = ModulesView->addColumn( tr( "Used By" ) ); 51 colnum = ModulesView->addColumn( tr( "Used by" ) );
52 ModulesView->setAllColumnsShowFocus( TRUE ); 52 ModulesView->setAllColumnsShowFocus( TRUE );
53 layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); 53 layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 );
54 QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); 54 QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) );
55 55
56 // Test if we have /sbin/modinfo, and if so, allow module detail window 56 // Test if we have /sbin/modinfo, and if so, allow module detail window
57 if ( QFile::exists( "/sbin/modinfo" ) ) 57 if ( QFile::exists( "/sbin/modinfo" ) )
58 { 58 {
59 QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); 59 QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold );
60 connect( ModulesView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), 60 connect( ModulesView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ),
61 this, SLOT( viewModules( QListViewItem * ) ) ); 61 this, SLOT( viewModules( QListViewItem * ) ) );
62 } 62 }
63 63
64 CommandCB = new QComboBox( FALSE, this ); 64 CommandCB = new QComboBox( FALSE, this );
65 CommandCB->insertItem( "modprobe -r" ); 65 CommandCB->insertItem( "modprobe -r" );
66 CommandCB->insertItem( "rmmod" ); 66 CommandCB->insertItem( "rmmod" );
67 // I can't think of other useful commands yet. Anyone? 67 // I can't think of other useful commands yet. Anyone?
68 layout->addWidget( CommandCB, 1, 0 ); 68 layout->addWidget( CommandCB, 1, 0 );
69 QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command to module selected above." ) ); 69 QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command to module selected above." ) );
70 70
71 QPushButton *btn = new QPushButton( this ); 71 QPushButton *btn = new QPushButton( this );
72 btn->setMinimumSize( QSize( 50, 24 ) ); 72 btn->setMinimumSize( QSize( 50, 24 ) );
73 btn->setMaximumSize( QSize( 50, 24 ) ); 73 btn->setMaximumSize( QSize( 50, 24 ) );
74 btn->setText( tr( "Send" ) ); 74 btn->setText( tr( "Send" ) );
75 connect( btn, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); 75 connect( btn, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) );
@@ -120,51 +120,49 @@ void ModulesInfo::updateData()
120 QString qmodname = QString( modname ); 120 QString qmodname = QString( modname );
121 QString qmodsize = QString::number( modsize ).rightJustify( 6, ' ' ); 121 QString qmodsize = QString::number( modsize ).rightJustify( 6, ' ' );
122 QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' ); 122 QString qusecount = QString::number( usecount ).rightJustify( 2, ' ' );
123 QString qusage = QString( usage ); 123 QString qusage = QString( usage );
124 124
125 newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage ); 125 newitem = new QListViewItem( ModulesView, qmodname, qmodsize, qusecount, qusage );
126 if ( qmodname == selectedmod ) 126 if ( qmodname == selectedmod )
127 { 127 {
128 selecteditem = newitem; 128 selecteditem = newitem;
129 } 129 }
130 } 130 }
131 ModulesView->setCurrentItem( selecteditem ); 131 ModulesView->setCurrentItem( selecteditem );
132 132
133 fclose( procfile ); 133 fclose( procfile );
134 } 134 }
135} 135}
136 136
137void ModulesInfo::slotSendClicked() 137void ModulesInfo::slotSendClicked()
138{ 138{
139 if ( !ModulesView->currentItem() ) 139 if ( !ModulesView->currentItem() )
140 { 140 {
141 return; 141 return;
142 } 142 }
143 143
144 QString capstr = tr( "You really want to execute\n" ); 144 QString capstr = tr( "You really want to execute %1 for this module?" ).arg( CommandCB->currentText() );
145 capstr.append( CommandCB->currentText() );
146 capstr.append( "\nfor this module?" );
147 145
148 QString modname = ModulesView->currentItem()->text( 0 ); 146 QString modname = ModulesView->currentItem()->text( 0 );
149 147
150 if ( QMessageBox::warning( this, modname, capstr, 148 if ( QMessageBox::warning( this, modname, capstr,
151 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) 149 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
152 { 150 {
153 QString command = "/sbin/"; 151 QString command = "/sbin/";
154 command.append( CommandCB->currentText() ); 152 command.append( CommandCB->currentText() );
155 command.append( " " ); 153 command.append( " " );
156 command.append( modname ); 154 command.append( modname );
157 155
158 FILE* stream = popen( command, "r" ); 156 FILE* stream = popen( command, "r" );
159 if ( stream ) 157 if ( stream )
160 pclose( stream ); 158 pclose( stream );
161 } 159 }
162 160
163} 161}
164 162
165void ModulesInfo::viewModules( QListViewItem *modules ) 163void ModulesInfo::viewModules( QListViewItem *modules )
166{ 164{
167 QString modname = modules->text( 0 ); 165 QString modname = modules->text( 0 );
168 QString capstr = "Module: "; 166 QString capstr = "Module: ";
169 capstr.append( modname ); 167 capstr.append( modname );
170 ModulesDtl->setCaption( capstr ); 168 ModulesDtl->setCaption( capstr );
diff --git a/noncore/settings/sysinfo/opie-sysinfo.control b/noncore/settings/sysinfo/opie-sysinfo.control
index acb51e5..8250174 100644
--- a/noncore/settings/sysinfo/opie-sysinfo.control
+++ b/noncore/settings/sysinfo/opie-sysinfo.control
@@ -1,10 +1,10 @@
1Package: opie-sysinfo 1Package: opie-sysinfo
2Files: bin/sysinfo apps/Settings/sysinfo.desktop pics/sysinfo 2Files: bin/sysinfo apps/Settings/sysinfo.desktop pics/sysinfo
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Dan Williams <williamsdr@acm.org> 5Maintainer: Dan Williams <williamsdr@acm.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal, libopie1 7Depends: task-opie-minimal, libopie1
9Description: System Information dialog 8Description: System Information dialog
10 For the Opie environment. 9 For the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp
index 1de1a19..8dec9be 100644
--- a/noncore/settings/sysinfo/processinfo.cpp
+++ b/noncore/settings/sysinfo/processinfo.cpp
@@ -143,51 +143,49 @@ void ProcessInfo::updateData()
143 143
144 newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime ); 144 newitem = new QListViewItem( ProcessView, processnum, processcmd, processstatus, processtime );
145 if ( processnum == selectedpid ) 145 if ( processnum == selectedpid )
146 { 146 {
147 selecteditem = newitem; 147 selecteditem = newitem;
148 } 148 }
149 } 149 }
150 } 150 }
151 } 151 }
152 ProcessView->setCurrentItem( selecteditem ); 152 ProcessView->setCurrentItem( selecteditem );
153 } 153 }
154 154
155 delete proclist; 155 delete proclist;
156 delete procdir; 156 delete procdir;
157} 157}
158 158
159void ProcessInfo::slotSendClicked() 159void ProcessInfo::slotSendClicked()
160{ 160{
161 QListViewItem *currprocess = ProcessView->currentItem(); 161 QListViewItem *currprocess = ProcessView->currentItem();
162 if ( !currprocess ) 162 if ( !currprocess )
163 { 163 {
164 return; 164 return;
165 } 165 }
166 166
167 QString capstr = tr( "You really want to send\n" ); 167 QString capstr = tr( "You really want to send %1 to this process?" ).arg( SignalCB->currentText() );
168 capstr.append( SignalCB->currentText() );
169 capstr.append( "\nto this process?" );
170 168
171 169
172 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, 170 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr,
173 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) 171 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
174 { 172 {
175 currprocess = ProcessView->currentItem(); 173 currprocess = ProcessView->currentItem();
176 if ( currprocess ) 174 if ( currprocess )
177 { 175 {
178 QString sigstr = SignalCB->currentText(); 176 QString sigstr = SignalCB->currentText();
179 sigstr.truncate(2); 177 sigstr.truncate(2);
180 int sigid = sigstr.toUInt(); 178 int sigid = sigstr.toUInt();
181 kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid ); 179 kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
182 } 180 }
183 } 181 }
184 182
185} 183}
186 184
187void ProcessInfo::viewProcess( QListViewItem *process ) 185void ProcessInfo::viewProcess( QListViewItem *process )
188{ 186{
189 QString pid= process->text( 0 ).stripWhiteSpace(); 187 QString pid= process->text( 0 ).stripWhiteSpace();
190 QString command = process->text( 1 ); 188 QString command = process->text( 1 );
191 ProcessDtl->setCaption( pid + " - " + command ); 189 ProcessDtl->setCaption( pid + " - " + command );
192 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r"); 190 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
193 if ( statfile ) 191 if ( statfile )