author | kergoth <kergoth> | 2003-08-09 17:00:23 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:00:23 (UTC) |
commit | c33d5ec60361238e50a4a9d6e0eec03e396dce60 (patch) (unidiff) | |
tree | 31c0c85dc4262044db90c7918014bc45265ef420 /noncore | |
parent | 78c296d534589835801fb6374ac9d43d44b2b1c9 (diff) | |
download | opie-c33d5ec60361238e50a4a9d6e0eec03e396dce60.zip opie-c33d5ec60361238e50a4a9d6e0eec03e396dce60.tar.gz opie-c33d5ec60361238e50a4a9d6e0eec03e396dce60.tar.bz2 |
Merge from BRANCH_1_0
28 files changed, 222 insertions, 523 deletions
diff --git a/noncore/net/mailit/config.in b/noncore/net/mailit/config.in index 142b840..2b56b5f 100644 --- a/noncore/net/mailit/config.in +++ b/noncore/net/mailit/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config MAILIT | 1 | config MAILIT |
2 | boolean "opie-mailit (a simple POP3 email client)" | 2 | boolean "mailit" |
3 | default "n" | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) |
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp index 5da3bcb..1df6b2b 100644 --- a/noncore/net/mailit/popclient.cpp +++ b/noncore/net/mailit/popclient.cpp | |||
@@ -32,24 +32,25 @@ PopClient::PopClient() | |||
32 | 32 | ||
33 | socket = new QSocket(this, "popClient"); | 33 | socket = new QSocket(this, "popClient"); |
34 | connect(socket, SIGNAL(error(int)), this, SLOT(errorHandling(int))); | 34 | connect(socket, SIGNAL(error(int)), this, SLOT(errorHandling(int))); |
35 | connect(socket, SIGNAL(connected()), this, SLOT(connectionEstablished())); | 35 | connect(socket, SIGNAL(connected()), this, SLOT(connectionEstablished())); |
36 | connect(socket, SIGNAL(readyRead()), this, SLOT(incomingData())); | 36 | connect(socket, SIGNAL(readyRead()), this, SLOT(incomingData())); |
37 | 37 | ||
38 | stream = new QTextStream(socket); | 38 | stream = new QTextStream(socket); |
39 | 39 | ||
40 | receiving = FALSE; | 40 | receiving = FALSE; |
41 | synchronize = FALSE; | 41 | synchronize = FALSE; |
42 | lastSync = 0; | 42 | lastSync = 0; |
43 | headerLimit = 0; | 43 | headerLimit = 0; |
44 | mailList = 0; | ||
44 | preview = FALSE; | 45 | preview = FALSE; |
45 | } | 46 | } |
46 | 47 | ||
47 | PopClient::~PopClient() | 48 | PopClient::~PopClient() |
48 | { | 49 | { |
49 | delete socket; | 50 | delete socket; |
50 | delete stream; | 51 | delete stream; |
51 | } | 52 | } |
52 | 53 | ||
53 | void PopClient::newConnection(const QString &target, int port) | 54 | void PopClient::newConnection(const QString &target, int port) |
54 | { | 55 | { |
55 | if (receiving) { | 56 | if (receiving) { |
@@ -182,25 +183,25 @@ void PopClient::incomingData() | |||
182 | temp.truncate((uint) x); | 183 | temp.truncate((uint) x); |
183 | newMessages = temp.toInt(); | 184 | newMessages = temp.toInt(); |
184 | messageCount = 1; | 185 | messageCount = 1; |
185 | status = List; | 186 | status = List; |
186 | 187 | ||
187 | if (synchronize) { | 188 | if (synchronize) { |
188 | //messages deleted from server, reload all | 189 | //messages deleted from server, reload all |
189 | if (newMessages < lastSync) | 190 | if (newMessages < lastSync) |
190 | lastSync = 0; | 191 | lastSync = 0; |
191 | messageCount = 1; | 192 | messageCount = 1; |
192 | } | 193 | } |
193 | 194 | ||
194 | if (selected) { | 195 | if (selected && mailList ) { |
195 | int *ptr = mailList->first(); | 196 | int *ptr = mailList->first(); |
196 | if (ptr != 0) { | 197 | if (ptr != 0) { |
197 | newMessages++; //to ensure no early jumpout | 198 | newMessages++; //to ensure no early jumpout |
198 | messageCount = *ptr; | 199 | messageCount = *ptr; |
199 | } else newMessages = 0; | 200 | } else newMessages = 0; |
200 | } | 201 | } |
201 | 202 | ||
202 | } else errorHandlingWithMsg(ErrUnknownResponse, response); | 203 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
203 | } | 204 | } |
204 | //Read message number x, count upwards to messageCount | 205 | //Read message number x, count upwards to messageCount |
205 | case List: { | 206 | case List: { |
206 | if (messageCount <= newMessages) { | 207 | if (messageCount <= newMessages) { |
diff --git a/noncore/net/mailit/resource.cpp b/noncore/net/mailit/resource.cpp deleted file mode 100644 index dc19880..0000000 --- a/noncore/net/mailit/resource.cpp +++ b/dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "qpeapplication.h" | ||
22 | #include "resource.h" | ||
23 | #include <qdir.h> | ||
24 | #include <qfile.h> | ||
25 | #include <qregexp.h> | ||
26 | #include <qpixmapcache.h> | ||
27 | #include <qpainter.h> | ||
28 | |||
29 | #include "inlinepics_p.h" | ||
30 | |||
31 | /*! | ||
32 | \class Resource resource.h | ||
33 | \brief The Resource class provides access to named resources. | ||
34 | |||
35 | The resources may be provided from files or other sources. | ||
36 | */ | ||
37 | |||
38 | /*! | ||
39 | \fn Resource::Resource() | ||
40 | \internal | ||
41 | */ | ||
42 | |||
43 | /*! | ||
44 | Returns the QPixmap named \a pix. You should avoid including | ||
45 | any filename type extension (eg. .png, .xpm). | ||
46 | */ | ||
47 | QPixmap Resource::loadPixmap( const QString &pix ) | ||
48 | { | ||
49 | QPixmap pm; | ||
50 | QString key="QPE_"+pix; | ||
51 | if ( !QPixmapCache::find(key,pm) ) { | ||
52 | pm.convertFromImage(loadImage(pix)); | ||
53 | QPixmapCache::insert(key,pm); | ||
54 | } | ||
55 | return pm; | ||
56 | } | ||
57 | |||
58 | /*! | ||
59 | Returns the QBitmap named \a pix. You should avoid including | ||
60 | any filename type extension (eg. .png, .xpm). | ||
61 | */ | ||
62 | QBitmap Resource::loadBitmap( const QString &pix ) | ||
63 | { | ||
64 | QBitmap bm; | ||
65 | bm = loadPixmap(pix); | ||
66 | return bm; | ||
67 | } | ||
68 | |||
69 | /*! | ||
70 | Returns the filename of a pixmap named \a pix. You should avoid including | ||
71 | any filename type extension (eg. .png, .xpm). | ||
72 | |||
73 | Normally you will use loadPixmap() rather than this function. | ||
74 | */ | ||
75 | QString Resource::findPixmap( const QString &pix ) | ||
76 | { | ||
77 | QString picsPath = QPEApplication::qpeDir() + "pics/"; | ||
78 | |||
79 | if ( QFile( picsPath + pix + ".png").exists() ) | ||
80 | return picsPath + pix + ".png"; | ||
81 | else if ( QFile( picsPath + pix + ".xpm").exists() ) | ||
82 | return picsPath + pix + ".xpm"; | ||
83 | else if ( QFile( picsPath + pix ).exists() ) | ||
84 | return picsPath + pix; | ||
85 | |||
86 | //qDebug("Cannot find pixmap: %s", pix.latin1()); | ||
87 | return QString(); | ||
88 | } | ||
89 | |||
90 | /*! | ||
91 | Returns a sound file for a sound named \a name. | ||
92 | You should avoid including any filename type extension (eg. .wav, .au, .mp3). | ||
93 | */ | ||
94 | QString Resource::findSound( const QString &name ) | ||
95 | { | ||
96 | QString picsPath = QPEApplication::qpeDir() + "sounds/"; | ||
97 | |||
98 | QString result; | ||
99 | if ( QFile( (result = picsPath + name + ".wav") ).exists() ) | ||
100 | return result; | ||
101 | |||
102 | return QString(); | ||
103 | } | ||
104 | |||
105 | /*! | ||
106 | Returns a list of all sound names. | ||
107 | */ | ||
108 | QStringList Resource::allSounds() | ||
109 | { | ||
110 | QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); | ||
111 | QStringList entries = resourcedir.entryList(); | ||
112 | QStringList result; | ||
113 | for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) | ||
114 | result.append((*i).replace(QRegExp("\\.wav"),"")); | ||
115 | return result; | ||
116 | } | ||
117 | |||
118 | /*! | ||
119 | Returns the QImage named \a name. You should avoid including | ||
120 | any filename type extension (eg. .png, .xpm). | ||
121 | */ | ||
122 | QImage Resource::loadImage( const QString &name) | ||
123 | { | ||
124 | QImage img = qembed_findImage(name.latin1()); | ||
125 | if ( img.isNull() ) | ||
126 | return QImage(findPixmap(name)); | ||
127 | return img; | ||
128 | } | ||
129 | |||
130 | /*! | ||
131 | \fn QIconSet Resource::loadIconSet( const QString &name ) | ||
132 | |||
133 | Returns a QIconSet for the pixmap named \a name. A disabled icon is | ||
134 | generated that conforms to the Qtopia look & feel. You should avoid | ||
135 | including any filename type extension (eg. .png, .xpm). | ||
136 | */ | ||
diff --git a/noncore/net/mailit/resource.h b/noncore/net/mailit/resource.h deleted file mode 100644 index 982c58a..0000000 --- a/noncore/net/mailit/resource.h +++ b/dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef PIXMAPLOADER_H | ||
21 | #define PIXMAPLOADER_H | ||
22 | |||
23 | #include <qimage.h> | ||
24 | #include <qbitmap.h> | ||
25 | #include <qiconset.h> | ||
26 | #include <qstringlist.h> | ||
27 | |||
28 | class Resource | ||
29 | { | ||
30 | public: | ||
31 | Resource() {} | ||
32 | |||
33 | static QImage loadImage( const QString &name); | ||
34 | |||
35 | static QPixmap loadPixmap( const QString &name ); | ||
36 | static QBitmap loadBitmap( const QString &name ); | ||
37 | static QString findPixmap( const QString &name ); | ||
38 | |||
39 | static QIconSet loadIconSet( const QString &name ); | ||
40 | |||
41 | static QString findSound( const QString &name ); | ||
42 | static QStringList allSounds(); | ||
43 | }; | ||
44 | |||
45 | // Inline for compatibility with SHARP ROMs | ||
46 | inline QIconSet Resource::loadIconSet( const QString &pix ) | ||
47 | { | ||
48 | QImage img = loadImage( pix ); | ||
49 | QPixmap pm; | ||
50 | pm.convertFromImage( img ); | ||
51 | QIconSet is( pm ); | ||
52 | QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large; | ||
53 | |||
54 | QPixmap dpm = loadPixmap( pix + "_disabled" ); | ||
55 | |||
56 | #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps | ||
57 | if ( dpm.isNull() ) { | ||
58 | QImage dimg( img.width(), img.height(), 32 ); | ||
59 | for ( int y = 0; y < img.height(); y++ ) { | ||
60 | for ( int x = 0; x < img.width(); x++ ) { | ||
61 | QRgb p = img.pixel( x, y ); | ||
62 | uint a = (p & 0xff000000) / 3; | ||
63 | p = (p & 0x00ffffff) | (a & 0xff000000); | ||
64 | dimg.setPixel( x, y, p ); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | dimg.setAlphaBuffer( TRUE ); | ||
69 | dpm.convertFromImage( dimg ); | ||
70 | } | ||
71 | #endif | ||
72 | |||
73 | if ( !dpm.isNull() ) | ||
74 | is.setPixmap( dpm, size, QIconSet::Disabled ); | ||
75 | |||
76 | return is; | ||
77 | } | ||
78 | |||
79 | |||
80 | #endif | ||
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp index 5b5ef52..51ca50b 100644 --- a/noncore/net/mailit/smtpclient.cpp +++ b/noncore/net/mailit/smtpclient.cpp | |||
@@ -95,45 +95,45 @@ void SmtpClient::incomingData() | |||
95 | switch(status) { | 95 | switch(status) { |
96 | case Init: { | 96 | case Init: { |
97 | if (response[0] == '2') { | 97 | if (response[0] == '2') { |
98 | status = From; | 98 | status = From; |
99 | mailPtr = mailList.first(); | 99 | mailPtr = mailList.first(); |
100 | *stream << "HELO there\r\n"; | 100 | *stream << "HELO there\r\n"; |
101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
102 | break; | 102 | break; |
103 | } | 103 | } |
104 | case From: { | 104 | case From: { |
105 | if (response[0] == '2') { | 105 | if (response[0] == '2') { |
106 | qDebug(mailPtr->from); | 106 | qDebug(mailPtr->from); |
107 | *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; | 107 | *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; |
108 | status = Recv; | 108 | status = Recv; |
109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); | 109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); |
110 | break; | 110 | break; |
111 | } | 111 | } |
112 | case Recv: { | 112 | case Recv: { |
113 | if (response[0] == '2') { | 113 | if (response[0] == '2') { |
114 | it = mailPtr->to.begin(); | 114 | it = mailPtr->to.begin(); |
115 | if (it == NULL) { | 115 | if (it == NULL) { |
116 | errorHandlingWithMsg(ErrUnknownResponse,response); | 116 | errorHandlingWithMsg(ErrUnknownResponse,response); |
117 | } | 117 | } |
118 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 118 | *stream << "RCPT TO: " << *it << "\r\n"; |
119 | status = MRcv; | 119 | status = MRcv; |
120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
121 | break; | 121 | break; |
122 | } | 122 | } |
123 | case MRcv: { | 123 | case MRcv: { |
124 | if (response[0] == '2') { | 124 | if (response[0] == '2') { |
125 | it++; | 125 | it++; |
126 | if ( it != mailPtr->to.end() ) { | 126 | if ( it != mailPtr->to.end() ) { |
127 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 127 | *stream << "RCPT TO: " << *it << "\r\n"; |
128 | break; | 128 | break; |
129 | } else { | 129 | } else { |
130 | status = Data; | 130 | status = Data; |
131 | } | 131 | } |
132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
133 | } | 133 | } |
134 | case Data: { | 134 | case Data: { |
135 | if (response[0] == '2') { | 135 | if (response[0] == '2') { |
136 | *stream << "DATA\r\n"; | 136 | *stream << "DATA\r\n"; |
137 | status = Body; | 137 | status = Body; |
138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); | 138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); |
139 | 139 | ||
diff --git a/noncore/net/mailit/viewatt.cpp b/noncore/net/mailit/viewatt.cpp index 293e137..3515ba5 100644 --- a/noncore/net/mailit/viewatt.cpp +++ b/noncore/net/mailit/viewatt.cpp | |||
@@ -8,25 +8,25 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "resource.h" | 20 | #include <qpe/resource.h> |
21 | #include "viewatt.h" | 21 | #include "viewatt.h" |
22 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
23 | #include <qpe/applnk.h> | 23 | #include <qpe/applnk.h> |
24 | #include <qpe/mimetype.h> | 24 | #include <qpe/mimetype.h> |
25 | 25 | ||
26 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | 26 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) |
27 | : QMainWindow(parent, name, f) | 27 | : QMainWindow(parent, name, f) |
28 | { | 28 | { |
29 | setCaption(tr("Exploring attatchments")); | 29 | setCaption(tr("Exploring attatchments")); |
30 | 30 | ||
31 | setToolBarsMovable( FALSE ); | 31 | setToolBarsMovable( FALSE ); |
32 | bar = new QToolBar(this); | 32 | bar = new QToolBar(this); |
diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index dbccd98..ac16819 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | HEADERS = opieftp.h inputDialog.h ftplib.h | 3 | HEADERS = opieftp.h inputDialog.h |
4 | SOURCES = opieftp.cpp inputDialog.cpp main.cpp | 4 | SOURCES = opieftp.cpp inputDialog.cpp main.cpp |
5 | TARGET = opieftp | 5 | TARGET = opieftp |
6 | DESTDIR = $(OPIEDIR)/bin | 6 | DESTDIR = $(OPIEDIR)/bin |
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe -lftplib | 9 | LIBS += -lqpe -lftplib |
10 | 10 | ||
11 | TRANSLATIONS = ../../../i18n/de/opieftp.ts \ | 11 | TRANSLATIONS = ../../../i18n/de/opieftp.ts \ |
12 | ../../../i18n/nl/opieftp.ts \ | 12 | ../../../i18n/nl/opieftp.ts \ |
13 | ../../../i18n/da/opieftp.ts \ | 13 | ../../../i18n/da/opieftp.ts \ |
14 | ../../../i18n/xx/opieftp.ts \ | 14 | ../../../i18n/xx/opieftp.ts \ |
15 | ../../../i18n/en/opieftp.ts \ | 15 | ../../../i18n/en/opieftp.ts \ |
diff --git a/noncore/net/opieirc/config.in b/noncore/net/opieirc/config.in index 30184a9..7c6949d 100644 --- a/noncore/net/opieirc/config.in +++ b/noncore/net/opieirc/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config OPIEIRC | 1 | config OPIEIRC |
2 | boolean "opieirc" | 2 | boolean "opie-irc (chat via your favorite IRC server)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE |
diff --git a/noncore/net/opieirc/ircchannellist.cpp b/noncore/net/opieirc/ircchannellist.cpp index e592d05..566b223 100644 --- a/noncore/net/opieirc/ircchannellist.cpp +++ b/noncore/net/opieirc/ircchannellist.cpp | |||
@@ -26,12 +26,23 @@ void IRCChannelList::update() { | |||
26 | } | 26 | } |
27 | sort(); | 27 | sort(); |
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
31 | bool IRCChannelList::hasPerson(QString nick) { | 31 | bool IRCChannelList::hasPerson(QString nick) { |
32 | for (unsigned int i=0; i<count(); i++) { | 32 | for (unsigned int i=0; i<count(); i++) { |
33 | if (text(i) == nick) | 33 | if (text(i) == nick) |
34 | return TRUE; | 34 | return TRUE; |
35 | } | 35 | } |
36 | return FALSE; | 36 | return FALSE; |
37 | } | 37 | } |
38 | |||
39 | bool IRCChannelList::removePerson(QString nick) { | ||
40 | for (unsigned int i=0; i<count(); i++) { | ||
41 | if (text(i) == nick){ | ||
42 | removeItem(i); | ||
43 | return TRUE; | ||
44 | } | ||
45 | } | ||
46 | return FALSE; | ||
47 | } | ||
48 | |||
diff --git a/noncore/net/opieirc/ircchannellist.h b/noncore/net/opieirc/ircchannellist.h index fa3c8cd..deab649 100644 --- a/noncore/net/opieirc/ircchannellist.h +++ b/noncore/net/opieirc/ircchannellist.h | |||
@@ -20,17 +20,18 @@ | |||
20 | 20 | ||
21 | #ifndef __IRCCHANNELLIST_H | 21 | #ifndef __IRCCHANNELLIST_H |
22 | #define __IRCCHANNELLIST_H | 22 | #define __IRCCHANNELLIST_H |
23 | 23 | ||
24 | #include <qlistbox.h> | 24 | #include <qlistbox.h> |
25 | #include "ircchannel.h" | 25 | #include "ircchannel.h" |
26 | 26 | ||
27 | class IRCChannelList : public QListBox { | 27 | class IRCChannelList : public QListBox { |
28 | public: | 28 | public: |
29 | IRCChannelList(IRCChannel *channel, QWidget *parent = 0, const char *name = 0, WFlags f = 0); | 29 | IRCChannelList(IRCChannel *channel, QWidget *parent = 0, const char *name = 0, WFlags f = 0); |
30 | void update(); | 30 | void update(); |
31 | bool hasPerson(QString nick); | 31 | bool hasPerson(QString nick); |
32 | bool removePerson(QString nick); | ||
32 | protected: | 33 | protected: |
33 | IRCChannel *m_channel; | 34 | IRCChannel *m_channel; |
34 | }; | 35 | }; |
35 | 36 | ||
36 | #endif /* __IRCCHANNELLIST_H */ | 37 | #endif /* __IRCCHANNELLIST_H */ |
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index beb8bce..2b8b65e 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -53,24 +53,25 @@ void IRCChannelTab::scrolling(){ | |||
53 | 53 | ||
54 | void IRCChannelTab::appendText(QString text) { | 54 | void IRCChannelTab::appendText(QString text) { |
55 | /* not using append because it creates layout problems */ | 55 | /* not using append because it creates layout problems */ |
56 | QString txt = m_textview->text() + text + "\n"; | 56 | QString txt = m_textview->text() + text + "\n"; |
57 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 57 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
58 | int firstBreak = txt.find('\n'); | 58 | int firstBreak = txt.find('\n'); |
59 | if (firstBreak != -1) { | 59 | if (firstBreak != -1) { |
60 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 60 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
61 | } | 61 | } |
62 | } else { | 62 | } else { |
63 | m_lines++; | 63 | m_lines++; |
64 | } | 64 | } |
65 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | ||
65 | m_textview->setText(txt); | 66 | m_textview->setText(txt); |
66 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 67 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
67 | emit changed(this); | 68 | emit changed(this); |
68 | } | 69 | } |
69 | 70 | ||
70 | IRCChannelTab::~IRCChannelTab() { | 71 | IRCChannelTab::~IRCChannelTab() { |
71 | m_parentTab->removeChannelTab(this); | 72 | m_parentTab->removeChannelTab(this); |
72 | } | 73 | } |
73 | 74 | ||
74 | void IRCChannelTab::processCommand() { | 75 | void IRCChannelTab::processCommand() { |
75 | QString text = m_field->text(); | 76 | QString text = m_field->text(); |
76 | if (text.length()>0) { | 77 | if (text.length()>0) { |
diff --git a/noncore/net/opieirc/ircmessageparser.cpp b/noncore/net/opieirc/ircmessageparser.cpp index 6b88f34..400ff41 100644 --- a/noncore/net/opieirc/ircmessageparser.cpp +++ b/noncore/net/opieirc/ircmessageparser.cpp | |||
@@ -197,39 +197,53 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) { | |||
197 | } else { | 197 | } else { |
198 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown sender"))); | 198 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown sender"))); |
199 | } | 199 | } |
200 | } else { | 200 | } else { |
201 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel %1").arg(message->param(0).lower()) )); | 201 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Channel message with unknown channel %1").arg(message->param(0).lower()) )); |
202 | } | 202 | } |
203 | } else { | 203 | } else { |
204 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received PRIVMSG of unknown type"))); | 204 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Received PRIVMSG of unknown type"))); |
205 | } | 205 | } |
206 | } | 206 | } |
207 | 207 | ||
208 | void IRCMessageParser::parseLiteralNick(IRCMessage *message) { | 208 | void IRCMessageParser::parseLiteralNick(IRCMessage *message) { |
209 | IRCPerson mask(message->prefix()); | ||
210 | 209 | ||
210 | IRCPerson mask(message->prefix()); | ||
211 | /* this way of handling nick changes really sucks */ | ||
211 | if (mask.nick() == m_session->m_server->nick()) { | 212 | if (mask.nick() == m_session->m_server->nick()) { |
212 | /* We are changing our nickname */ | 213 | /* We are changing our nickname */ |
213 | m_session->m_server->setNick(message->param(0)); | 214 | m_session->m_server->setNick(message->param(0)); |
214 | IRCOutput output(OUTPUT_NICKCHANGE, tr("You are now known as %1").arg( message->param(0))); | 215 | IRCOutput output(OUTPUT_NICKCHANGE, tr("You are now known as %1").arg( message->param(0))); |
215 | output.addParam(0); | 216 | output.addParam(0); |
216 | emit outputReady(output); | 217 | emit outputReady(output); |
217 | } else { | 218 | } else { |
218 | /* Someone else is */ | 219 | /* Someone else is */ |
219 | IRCPerson *person = m_session->getPerson(mask.nick()); | 220 | IRCPerson *person = m_session->getPerson(mask.nick()); |
220 | if (person) { | 221 | if (person) { |
222 | //IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0))); | ||
223 | |||
224 | /* new code starts here -- this removes the person from all channels */ | ||
225 | QList<IRCChannel> channels; | ||
226 | m_session->getChannelsByPerson(person, channels); | ||
227 | QListIterator<IRCChannel> it(channels); | ||
228 | for (;it.current(); ++it) { | ||
229 | IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick()); | ||
230 | it.current()->removePerson(chanperson); | ||
231 | chanperson->person->setNick(message->param(0)); | ||
232 | it.current()->addPerson(chanperson); | ||
221 | IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0 ))); | 233 | IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0 ))); |
222 | output.addParam(person); | 234 | output.addParam(person); |
223 | emit outputReady(output); | 235 | emit outputReady(output); |
236 | } | ||
237 | /* new code ends here */ | ||
224 | } else { | 238 | } else { |
225 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Nickname change of an unknown person"))); | 239 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Nickname change of an unknown person"))); |
226 | } | 240 | } |
227 | } | 241 | } |
228 | } | 242 | } |
229 | 243 | ||
230 | void IRCMessageParser::parseLiteralQuit(IRCMessage *message) { | 244 | void IRCMessageParser::parseLiteralQuit(IRCMessage *message) { |
231 | IRCPerson mask(message->prefix()); | 245 | IRCPerson mask(message->prefix()); |
232 | IRCPerson *person = m_session->getPerson(mask.nick()); | 246 | IRCPerson *person = m_session->getPerson(mask.nick()); |
233 | if (person) { | 247 | if (person) { |
234 | QList<IRCChannel> channels; | 248 | QList<IRCChannel> channels; |
235 | m_session->getChannelsByPerson(person, channels); | 249 | m_session->getChannelsByPerson(person, channels); |
@@ -388,24 +402,25 @@ void IRCMessageParser::parseLiteralMode(IRCMessage *message) { | |||
388 | void IRCMessageParser::parseLiteralKick(IRCMessage *message) { | 402 | void IRCMessageParser::parseLiteralKick(IRCMessage *message) { |
389 | IRCPerson mask(message->prefix()); | 403 | IRCPerson mask(message->prefix()); |
390 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); | 404 | IRCChannel *channel = m_session->getChannel(message->param(0).lower()); |
391 | if (channel) { | 405 | if (channel) { |
392 | IRCChannelPerson *person = channel->getPerson(message->param(1)); | 406 | IRCChannelPerson *person = channel->getPerson(message->param(1)); |
393 | if (person) { | 407 | if (person) { |
394 | if (person->person->nick() == m_session->m_server->nick()) { | 408 | if (person->person->nick() == m_session->m_server->nick()) { |
395 | m_session->removeChannel(channel); | 409 | m_session->removeChannel(channel); |
396 | IRCOutput output(OUTPUT_SELFKICK, tr("You were kicked from ") + channel->channelname() + tr(" by ") + mask.nick() + " (" + message->param(2) + ")"); | 410 | IRCOutput output(OUTPUT_SELFKICK, tr("You were kicked from ") + channel->channelname() + tr(" by ") + mask.nick() + " (" + message->param(2) + ")"); |
397 | output.addParam(channel); | 411 | output.addParam(channel); |
398 | emit outputReady(output); | 412 | emit outputReady(output); |
399 | } else { | 413 | } else { |
414 | /* someone else got kicked */ | ||
400 | channel->removePerson(person); | 415 | channel->removePerson(person); |
401 | IRCOutput output(OUTPUT_OTHERKICK, person->person->nick() + tr(" was kicked from ") + channel->channelname() + tr(" by ") + mask.nick()+ " (" + message->param(2) + ")"); | 416 | IRCOutput output(OUTPUT_OTHERKICK, person->person->nick() + tr(" was kicked from ") + channel->channelname() + tr(" by ") + mask.nick()+ " (" + message->param(2) + ")"); |
402 | output.addParam(channel); | 417 | output.addParam(channel); |
403 | output.addParam(person); | 418 | output.addParam(person); |
404 | emit outputReady(output); | 419 | emit outputReady(output); |
405 | } | 420 | } |
406 | } else { | 421 | } else { |
407 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person kick - desynchronized?"))); | 422 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown person kick - desynchronized?"))); |
408 | } | 423 | } |
409 | } else { | 424 | } else { |
410 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown channel kick - desynchronized?"))); | 425 | emit outputReady(IRCOutput(OUTPUT_ERROR, tr("Unknown channel kick - desynchronized?"))); |
411 | } | 426 | } |
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index 1d9520a..2c28507 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -114,34 +114,28 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { | |||
114 | } else { | 114 | } else { |
115 | IRCPerson person; | 115 | IRCPerson person; |
116 | person.setNick(nickname); | 116 | person.setNick(nickname); |
117 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person); | 117 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | else if (command == "OP"){ | 122 | else if (command == "OP"){ |
123 | QString nickname; | 123 | QString nickname; |
124 | stream >> nickname; | 124 | stream >> nickname; |
125 | if (nickname.length() > 0) { | 125 | if (nickname.length() > 0) { |
126 | if (line.length() > 7 + nickname.length()) { | 126 | QString text = line.right(line.length()-nickname.length()-5); |
127 | QString text = line.right(line.length()-nickname.length()-7); | ||
128 | IRCPerson person; | 127 | IRCPerson person; |
129 | person.setNick(nickname); | 128 | person.setNick(nickname); |
130 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person, text); | 129 | m_session->op(((IRCChannelTab *)tab)->channel(), &person); |
131 | } else { | ||
132 | IRCPerson person; | ||
133 | person.setNick(nickname); | ||
134 | m_session->kick(((IRCChannelTab *)tab)->channel(), &person); | ||
135 | } | ||
136 | } | 130 | } |
137 | } | 131 | } |
138 | 132 | ||
139 | //SEND MODES | 133 | //SEND MODES |
140 | else if (command == "MODE"){ | 134 | else if (command == "MODE"){ |
141 | QString text = line.right(line.length()-6); | 135 | QString text = line.right(line.length()-6); |
142 | if (text.length() > 0) { | 136 | if (text.length() > 0) { |
143 | m_session->mode(text); | 137 | m_session->mode(text); |
144 | } else { | 138 | } else { |
145 | tab->appendText("<font color=\"" + m_errorColor + "\">/mode channel {[+|-]|o|p|s|i|t|n|b|v} [limit] [user] [ban mask]<br>/mode nickname {[+|-]|i|w|s|o}</font><br>"); | 139 | tab->appendText("<font color=\"" + m_errorColor + "\">/mode channel {[+|-]|o|p|s|i|t|n|b|v} [limit] [user] [ban mask]<br>/mode nickname {[+|-]|i|w|s|o}</font><br>"); |
146 | } | 140 | } |
147 | } | 141 | } |
@@ -337,25 +331,37 @@ void IRCServerTab::display(IRCOutput output) { | |||
337 | break; | 331 | break; |
338 | case OUTPUT_QUIT: { | 332 | case OUTPUT_QUIT: { |
339 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); | 333 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); |
340 | QListIterator<IRCChannelTab> it(m_channelTabs); | 334 | QListIterator<IRCChannelTab> it(m_channelTabs); |
341 | for (; it.current(); ++it) { | 335 | for (; it.current(); ++it) { |
342 | if (it.current()->list()->hasPerson(nick)) { | 336 | if (it.current()->list()->hasPerson(nick)) { |
343 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 337 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
344 | it.current()->list()->update(); | 338 | it.current()->list()->update(); |
345 | } | 339 | } |
346 | } | 340 | } |
347 | } | 341 | } |
348 | break; | 342 | break; |
349 | case OUTPUT_OTHERJOIN: | 343 | /* case OUTPUT_NICKCHANGE: { |
344 | //WAS HERE | ||
345 | QString nick = ((IRCPerson *)output.getParam(0))->nick(); | ||
346 | QListIterator<IRCChannelTab> it(m_channelTabs); | ||
347 | for (; it.current(); ++it) { | ||
348 | if (it.current()->list()->hasPerson(nick)) { | ||
349 | it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | ||
350 | it.current()->list()->update(); | ||
351 | } | ||
352 | } | ||
353 | } | ||
354 | break; | ||
355 | */ case OUTPUT_OTHERJOIN: | ||
350 | case OUTPUT_OTHERKICK: | 356 | case OUTPUT_OTHERKICK: |
351 | case OUTPUT_CHANPERSONMODE: | 357 | case OUTPUT_CHANPERSONMODE: |
352 | case OUTPUT_OTHERPART: { | 358 | case OUTPUT_OTHERPART: { |
353 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); | 359 | IRCChannelTab *channelTab = getTabForChannel((IRCChannel *)output.getParam(0)); |
354 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); | 360 | channelTab->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); |
355 | channelTab->list()->update(); | 361 | channelTab->list()->update(); |
356 | } | 362 | } |
357 | break; | 363 | break; |
358 | case OUTPUT_CTCP: | 364 | case OUTPUT_CTCP: |
359 | appendText("<font color=\"" + m_notificationColor + "\">" + output.htmlMessage() + "</font><br>"); | 365 | appendText("<font color=\"" + m_notificationColor + "\">" + output.htmlMessage() + "</font><br>"); |
360 | break; | 366 | break; |
361 | case OUTPUT_ERROR: | 367 | case OUTPUT_ERROR: |
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index 1cc1ee2..6404d71 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -51,24 +51,28 @@ void IRCSession::mode(IRCPerson *person, QString message){ | |||
51 | void IRCSession::mode(QString message){ | 51 | void IRCSession::mode(QString message){ |
52 | m_connection->sendLine("MODE " + message); | 52 | m_connection->sendLine("MODE " + message); |
53 | } | 53 | } |
54 | 54 | ||
55 | void IRCSession::raw(QString message){ | 55 | void IRCSession::raw(QString message){ |
56 | m_connection->sendLine(message); | 56 | m_connection->sendLine(message); |
57 | } | 57 | } |
58 | 58 | ||
59 | void IRCSession::kick(IRCChannel *channel, IRCPerson *person) { | 59 | void IRCSession::kick(IRCChannel *channel, IRCPerson *person) { |
60 | m_connection->sendLine("KICK "+ channel->channelname() + " " + person->nick() +" :0wn3d - no reason"); | 60 | m_connection->sendLine("KICK "+ channel->channelname() + " " + person->nick() +" :0wn3d - no reason"); |
61 | } | 61 | } |
62 | 62 | ||
63 | void IRCSession::op(IRCChannel *channel, IRCPerson *person) { | ||
64 | m_connection->sendLine("MODE "+ channel->channelname() + " +ooo " + person->nick()); | ||
65 | } | ||
66 | |||
63 | void IRCSession::kick(IRCChannel *channel, IRCPerson *person, QString message) { | 67 | void IRCSession::kick(IRCChannel *channel, IRCPerson *person, QString message) { |
64 | m_connection->sendLine("KICK "+ channel->channelname() + " " + person->nick() +" :" + message); | 68 | m_connection->sendLine("KICK "+ channel->channelname() + " " + person->nick() +" :" + message); |
65 | } | 69 | } |
66 | 70 | ||
67 | void IRCSession::sendMessage(IRCPerson *person, QString message) { | 71 | void IRCSession::sendMessage(IRCPerson *person, QString message) { |
68 | m_connection->sendLine("PRIVMSG " + person->nick() + " :" + message); | 72 | m_connection->sendLine("PRIVMSG " + person->nick() + " :" + message); |
69 | } | 73 | } |
70 | 74 | ||
71 | void IRCSession::sendMessage(IRCChannel *channel, QString message) { | 75 | void IRCSession::sendMessage(IRCChannel *channel, QString message) { |
72 | m_connection->sendLine("PRIVMSG " + channel->channelname() + " :" + message); | 76 | m_connection->sendLine("PRIVMSG " + channel->channelname() + " :" + message); |
73 | } | 77 | } |
74 | 78 | ||
diff --git a/noncore/net/opieirc/ircsession.h b/noncore/net/opieirc/ircsession.h index a6a3e50..f6330d8 100644 --- a/noncore/net/opieirc/ircsession.h +++ b/noncore/net/opieirc/ircsession.h | |||
@@ -42,24 +42,25 @@ public: | |||
42 | IRCSession(IRCServer *server); | 42 | IRCSession(IRCServer *server); |
43 | ~IRCSession(); | 43 | ~IRCSession(); |
44 | 44 | ||
45 | void join(QString channel); | 45 | void join(QString channel); |
46 | void quit(QString message); | 46 | void quit(QString message); |
47 | void quit(); | 47 | void quit(); |
48 | void raw(QString message); | 48 | void raw(QString message); |
49 | void topic(IRCChannel *channel, QString message); | 49 | void topic(IRCChannel *channel, QString message); |
50 | void mode(IRCChannel *channel, QString message); | 50 | void mode(IRCChannel *channel, QString message); |
51 | void mode(IRCPerson *person, QString message); | 51 | void mode(IRCPerson *person, QString message); |
52 | void mode(QString message); | 52 | void mode(QString message); |
53 | void part(IRCChannel *channel); | 53 | void part(IRCChannel *channel); |
54 | void op(IRCChannel *channel, IRCPerson *person); | ||
54 | void kick(IRCChannel *channel, IRCPerson *person); | 55 | void kick(IRCChannel *channel, IRCPerson *person); |
55 | void kick(IRCChannel *channel, IRCPerson *person, QString message); | 56 | void kick(IRCChannel *channel, IRCPerson *person, QString message); |
56 | void beginSession(); | 57 | void beginSession(); |
57 | bool isSessionActive(); | 58 | bool isSessionActive(); |
58 | void endSession(); | 59 | void endSession(); |
59 | void sendMessage(IRCPerson *person, QString message); | 60 | void sendMessage(IRCPerson *person, QString message); |
60 | void sendMessage(IRCChannel *channel, QString message); | 61 | void sendMessage(IRCChannel *channel, QString message); |
61 | void sendAction(IRCPerson *person, QString message); | 62 | void sendAction(IRCPerson *person, QString message); |
62 | void sendAction(IRCChannel *channel, QString message); | 63 | void sendAction(IRCChannel *channel, QString message); |
63 | IRCChannel *getChannel(QString channelname); | 64 | IRCChannel *getChannel(QString channelname); |
64 | IRCPerson *getPerson(QString nickname); | 65 | IRCPerson *getPerson(QString nickname); |
65 | protected: | 66 | protected: |
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 54f096e..7d60d6c 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc | |||
@@ -11,24 +11,25 @@ | |||
11 | #include "pindlg.h" | 11 | #include "pindlg.h" |
12 | 12 | ||
13 | using namespace OpieTooth; | 13 | using namespace OpieTooth; |
14 | 14 | ||
15 | PinDlg::PinDlg( const QString& status, | 15 | PinDlg::PinDlg( const QString& status, |
16 | const QString& mac, QWidget* parent, | 16 | const QString& mac, QWidget* parent, |
17 | const char* name ) | 17 | const char* name ) |
18 | : PinDlgBase( parent, name, WType_Modal ) | 18 | : PinDlgBase( parent, name, WType_Modal ) |
19 | { | 19 | { |
20 | m_mac = mac; | 20 | m_mac = mac; |
21 | test( mac ); | 21 | test( mac ); |
22 | txtStatus->setText(status); | 22 | txtStatus->setText(status); |
23 | showMaximized(); | ||
23 | } | 24 | } |
24 | PinDlg::~PinDlg() { | 25 | PinDlg::~PinDlg() { |
25 | 26 | ||
26 | } | 27 | } |
27 | void PinDlg::setMac( const QString& mac ) { | 28 | void PinDlg::setMac( const QString& mac ) { |
28 | txtStatus->setText( mac ); | 29 | txtStatus->setText( mac ); |
29 | } | 30 | } |
30 | QString PinDlg::pin() const{ | 31 | QString PinDlg::pin() const{ |
31 | return lnePin->text(); | 32 | return lnePin->text(); |
32 | } | 33 | } |
33 | 34 | ||
34 | void PinDlg::test( const QString& mac ) { | 35 | void PinDlg::test( const QString& mac ) { |
diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h index b4f5ff8..5e5a763 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.h +++ b/noncore/net/opietooth/blue-pin/pindlg.h | |||
@@ -1,26 +1,29 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include <qdialog.h> | 3 | #include <qdialog.h> |
4 | |||
5 | #include "pindlgbase.h" | 4 | #include "pindlgbase.h" |
6 | 5 | ||
7 | namespace OpieTooth { | 6 | namespace OpieTooth { |
7 | |||
8 | class PinDlg : public PinDlgBase { | 8 | class PinDlg : public PinDlgBase { |
9 | |||
9 | Q_OBJECT | 10 | Q_OBJECT |
11 | |||
10 | public: | 12 | public: |
11 | PinDlg(const QString& text, | 13 | PinDlg(const QString& text, |
12 | const QString& mac, | 14 | const QString& mac, |
13 | QWidget* parent = 0, | 15 | QWidget* parent = 0, |
14 | const char* name= 0 ); | 16 | const char* name= 0 ); |
15 | ~PinDlg(); | 17 | ~PinDlg(); |
16 | void setMac( const QString& ); | 18 | void setMac( const QString& ); |
17 | QString pin() const; | 19 | QString pin() const; |
20 | |||
18 | private: | 21 | private: |
19 | void test( const QString& mac ); | 22 | void test( const QString& mac ); |
20 | QString m_mac; | 23 | QString m_mac; |
24 | |||
21 | protected slots: | 25 | protected slots: |
22 | void accept(); | 26 | void accept(); |
23 | }; | ||
24 | |||
25 | 27 | ||
26 | }; | 28 | }; |
29 | }; | ||
diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui index 6966a03..889a25e 100644 --- a/noncore/net/opietooth/blue-pin/pindlgbase.ui +++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui | |||
@@ -3,192 +3,268 @@ | |||
3 | <author>zecke</author> | 3 | <author>zecke</author> |
4 | <widget> | 4 | <widget> |
5 | <class>QDialog</class> | 5 | <class>QDialog</class> |
6 | <property stdset="1"> | 6 | <property stdset="1"> |
7 | <name>name</name> | 7 | <name>name</name> |
8 | <cstring>Form1</cstring> | 8 | <cstring>Form1</cstring> |
9 | </property> | 9 | </property> |
10 | <property stdset="1"> | 10 | <property stdset="1"> |
11 | <name>geometry</name> | 11 | <name>geometry</name> |
12 | <rect> | 12 | <rect> |
13 | <x>0</x> | 13 | <x>0</x> |
14 | <y>0</y> | 14 | <y>0</y> |
15 | <width>248</width> | 15 | <width>258</width> |
16 | <height>167</height> | 16 | <height>245</height> |
17 | </rect> | 17 | </rect> |
18 | </property> | 18 | </property> |
19 | <property stdset="1"> | 19 | <property stdset="1"> |
20 | <name>caption</name> | 20 | <name>caption</name> |
21 | <string>Please enter pin</string> | 21 | <string>Please enter pin</string> |
22 | </property> | 22 | </property> |
23 | <grid> | 23 | <vbox> |
24 | <property stdset="1"> | 24 | <property stdset="1"> |
25 | <name>margin</name> | 25 | <name>margin</name> |
26 | <number>11</number> | 26 | <number>11</number> |
27 | </property> | 27 | </property> |
28 | <property stdset="1"> | 28 | <property stdset="1"> |
29 | <name>spacing</name> | 29 | <name>spacing</name> |
30 | <number>6</number> | 30 | <number>6</number> |
31 | </property> | 31 | </property> |
32 | <widget row="0" column="0" > | 32 | <widget> |
33 | <class>QLabel</class> | ||
34 | <property stdset="1"> | ||
35 | <name>name</name> | ||
36 | <cstring>txtStatus</cstring> | ||
37 | </property> | ||
38 | <property stdset="1"> | ||
39 | <name>text</name> | ||
40 | <string></string> | ||
41 | </property> | ||
42 | <property stdset="1"> | ||
43 | <name>textFormat</name> | ||
44 | <enum>RichText</enum> | ||
45 | </property> | ||
46 | </widget> | ||
47 | <spacer> | ||
48 | <property> | ||
49 | <name>name</name> | ||
50 | <cstring>Spacer4_2</cstring> | ||
51 | </property> | ||
52 | <property stdset="1"> | ||
53 | <name>orientation</name> | ||
54 | <enum>Vertical</enum> | ||
55 | </property> | ||
56 | <property stdset="1"> | ||
57 | <name>sizeType</name> | ||
58 | <enum>Expanding</enum> | ||
59 | </property> | ||
60 | <property> | ||
61 | <name>sizeHint</name> | ||
62 | <size> | ||
63 | <width>20</width> | ||
64 | <height>20</height> | ||
65 | </size> | ||
66 | </property> | ||
67 | </spacer> | ||
68 | <widget> | ||
33 | <class>QLayoutWidget</class> | 69 | <class>QLayoutWidget</class> |
34 | <property stdset="1"> | 70 | <property stdset="1"> |
35 | <name>name</name> | 71 | <name>name</name> |
36 | <cstring>Layout6</cstring> | 72 | <cstring>Layout6</cstring> |
37 | </property> | 73 | </property> |
38 | <grid> | 74 | <vbox> |
75 | <property stdset="1"> | ||
76 | <name>margin</name> | ||
77 | <number>0</number> | ||
78 | </property> | ||
79 | <property stdset="1"> | ||
80 | <name>spacing</name> | ||
81 | <number>6</number> | ||
82 | </property> | ||
83 | <widget> | ||
84 | <class>QLabel</class> | ||
85 | <property stdset="1"> | ||
86 | <name>name</name> | ||
87 | <cstring>TextLabel3</cstring> | ||
88 | </property> | ||
89 | <property stdset="1"> | ||
90 | <name>text</name> | ||
91 | <string>Please enter PIN:</string> | ||
92 | </property> | ||
93 | </widget> | ||
94 | <widget> | ||
95 | <class>QLayoutWidget</class> | ||
96 | <property stdset="1"> | ||
97 | <name>name</name> | ||
98 | <cstring>Layout5</cstring> | ||
99 | </property> | ||
100 | <hbox> | ||
39 | <property stdset="1"> | 101 | <property stdset="1"> |
40 | <name>margin</name> | 102 | <name>margin</name> |
41 | <number>0</number> | 103 | <number>0</number> |
42 | </property> | 104 | </property> |
43 | <property stdset="1"> | 105 | <property stdset="1"> |
44 | <name>spacing</name> | 106 | <name>spacing</name> |
45 | <number>6</number> | 107 | <number>6</number> |
46 | </property> | 108 | </property> |
47 | <widget row="3" column="0" rowspan="1" colspan="3" > | 109 | <widget> |
48 | <class>QLineEdit</class> | 110 | <class>QLineEdit</class> |
49 | <property stdset="1"> | 111 | <property stdset="1"> |
50 | <name>name</name> | 112 | <name>name</name> |
51 | <cstring>lnePin</cstring> | 113 | <cstring>lnePin</cstring> |
52 | </property> | 114 | </property> |
53 | <property stdset="1"> | 115 | <property stdset="1"> |
54 | <name>echoMode</name> | 116 | <name>echoMode</name> |
55 | <enum>Password</enum> | 117 | <enum>Password</enum> |
56 | </property> | 118 | </property> |
57 | </widget> | 119 | </widget> |
58 | <spacer row="5" column="4" > | 120 | <spacer> |
59 | <property> | 121 | <property> |
60 | <name>name</name> | 122 | <name>name</name> |
61 | <cstring>Spacer2</cstring> | 123 | <cstring>Spacer4</cstring> |
62 | </property> | 124 | </property> |
63 | <property stdset="1"> | 125 | <property stdset="1"> |
64 | <name>orientation</name> | 126 | <name>orientation</name> |
65 | <enum>Horizontal</enum> | 127 | <enum>Horizontal</enum> |
66 | </property> | 128 | </property> |
67 | <property stdset="1"> | 129 | <property stdset="1"> |
68 | <name>sizeType</name> | 130 | <name>sizeType</name> |
69 | <enum>Fixed</enum> | 131 | <enum>Fixed</enum> |
70 | </property> | 132 | </property> |
71 | <property> | 133 | <property> |
72 | <name>sizeHint</name> | 134 | <name>sizeHint</name> |
73 | <size> | 135 | <size> |
74 | <width>16</width> | 136 | <width>21</width> |
75 | <height>20</height> | 137 | <height>20</height> |
76 | </size> | 138 | </size> |
77 | </property> | 139 | </property> |
78 | </spacer> | 140 | </spacer> |
79 | <spacer row="5" column="0" > | 141 | </hbox> |
142 | </widget> | ||
143 | <widget> | ||
144 | <class>QCheckBox</class> | ||
145 | <property stdset="1"> | ||
146 | <name>name</name> | ||
147 | <cstring>ckbPin</cstring> | ||
148 | </property> | ||
149 | <property stdset="1"> | ||
150 | <name>text</name> | ||
151 | <string>Save pin</string> | ||
152 | </property> | ||
153 | </widget> | ||
154 | </vbox> | ||
155 | </widget> | ||
156 | <spacer> | ||
80 | <property> | 157 | <property> |
81 | <name>name</name> | 158 | <name>name</name> |
82 | <cstring>Spacer1</cstring> | 159 | <cstring>Spacer5</cstring> |
83 | </property> | 160 | </property> |
84 | <property stdset="1"> | 161 | <property stdset="1"> |
85 | <name>orientation</name> | 162 | <name>orientation</name> |
86 | <enum>Horizontal</enum> | 163 | <enum>Vertical</enum> |
87 | </property> | 164 | </property> |
88 | <property stdset="1"> | 165 | <property stdset="1"> |
89 | <name>sizeType</name> | 166 | <name>sizeType</name> |
90 | <enum>Fixed</enum> | 167 | <enum>Expanding</enum> |
91 | </property> | 168 | </property> |
92 | <property> | 169 | <property> |
93 | <name>sizeHint</name> | 170 | <name>sizeHint</name> |
94 | <size> | 171 | <size> |
95 | <width>30</width> | 172 | <width>20</width> |
96 | <height>20</height> | 173 | <height>20</height> |
97 | </size> | 174 | </size> |
98 | </property> | 175 | </property> |
99 | </spacer> | 176 | </spacer> |
100 | <spacer row="3" column="3" > | 177 | <widget> |
178 | <class>QLayoutWidget</class> | ||
179 | <property stdset="1"> | ||
180 | <name>name</name> | ||
181 | <cstring>Layout7</cstring> | ||
182 | </property> | ||
183 | <hbox> | ||
184 | <property stdset="1"> | ||
185 | <name>margin</name> | ||
186 | <number>0</number> | ||
187 | </property> | ||
188 | <property stdset="1"> | ||
189 | <name>spacing</name> | ||
190 | <number>6</number> | ||
191 | </property> | ||
192 | <spacer> | ||
101 | <property> | 193 | <property> |
102 | <name>name</name> | 194 | <name>name</name> |
103 | <cstring>Spacer4</cstring> | 195 | <cstring>Spacer1</cstring> |
104 | </property> | 196 | </property> |
105 | <property stdset="1"> | 197 | <property stdset="1"> |
106 | <name>orientation</name> | 198 | <name>orientation</name> |
107 | <enum>Horizontal</enum> | 199 | <enum>Horizontal</enum> |
108 | </property> | 200 | </property> |
109 | <property stdset="1"> | 201 | <property stdset="1"> |
110 | <name>sizeType</name> | 202 | <name>sizeType</name> |
111 | <enum>Fixed</enum> | 203 | <enum>Fixed</enum> |
112 | </property> | 204 | </property> |
113 | <property> | 205 | <property> |
114 | <name>sizeHint</name> | 206 | <name>sizeHint</name> |
115 | <size> | 207 | <size> |
116 | <width>21</width> | 208 | <width>30</width> |
117 | <height>20</height> | 209 | <height>20</height> |
118 | </size> | 210 | </size> |
119 | </property> | 211 | </property> |
120 | </spacer> | 212 | </spacer> |
121 | <widget row="0" column="0" rowspan="1" colspan="5" > | 213 | <widget> |
122 | <class>QLabel</class> | ||
123 | <property stdset="1"> | ||
124 | <name>name</name> | ||
125 | <cstring>txtStatus</cstring> | ||
126 | </property> | ||
127 | <property stdset="1"> | ||
128 | <name>text</name> | ||
129 | <string></string> | ||
130 | </property> | ||
131 | <property stdset="1"> | ||
132 | <name>textFormat</name> | ||
133 | <enum>RichText</enum> | ||
134 | </property> | ||
135 | </widget> | ||
136 | <widget row="2" column="0" rowspan="1" colspan="5" > | ||
137 | <class>QLabel</class> | ||
138 | <property stdset="1"> | ||
139 | <name>name</name> | ||
140 | <cstring>TextLabel3</cstring> | ||
141 | </property> | ||
142 | <property stdset="1"> | ||
143 | <name>text</name> | ||
144 | <string>Please enter PIN:</string> | ||
145 | </property> | ||
146 | </widget> | ||
147 | <widget row="5" column="1" > | ||
148 | <class>QPushButton</class> | 214 | <class>QPushButton</class> |
149 | <property stdset="1"> | 215 | <property stdset="1"> |
150 | <name>name</name> | 216 | <name>name</name> |
151 | <cstring>PushButton1</cstring> | 217 | <cstring>PushButton1</cstring> |
152 | </property> | 218 | </property> |
153 | <property stdset="1"> | 219 | <property stdset="1"> |
154 | <name>text</name> | 220 | <name>text</name> |
155 | <string>&Ok</string> | 221 | <string>&Ok</string> |
156 | </property> | 222 | </property> |
157 | </widget> | 223 | </widget> |
158 | <widget row="5" column="2" rowspan="1" colspan="2" > | 224 | <widget> |
159 | <class>QPushButton</class> | 225 | <class>QPushButton</class> |
160 | <property stdset="1"> | 226 | <property stdset="1"> |
161 | <name>name</name> | 227 | <name>name</name> |
162 | <cstring>PushButton2</cstring> | 228 | <cstring>PushButton2</cstring> |
163 | </property> | 229 | </property> |
164 | <property stdset="1"> | 230 | <property stdset="1"> |
165 | <name>text</name> | 231 | <name>text</name> |
166 | <string>&Cancel</string> | 232 | <string>&Cancel</string> |
167 | </property> | 233 | </property> |
168 | </widget> | 234 | </widget> |
169 | <widget row="4" column="0" rowspan="1" colspan="5" > | 235 | <spacer> |
170 | <class>QCheckBox</class> | 236 | <property> |
171 | <property stdset="1"> | ||
172 | <name>name</name> | 237 | <name>name</name> |
173 | <cstring>ckbPin</cstring> | 238 | <cstring>Spacer2</cstring> |
174 | </property> | 239 | </property> |
175 | <property stdset="1"> | 240 | <property stdset="1"> |
176 | <name>text</name> | 241 | <name>orientation</name> |
177 | <string>Save pin</string> | 242 | <enum>Horizontal</enum> |
178 | </property> | 243 | </property> |
244 | <property stdset="1"> | ||
245 | <name>sizeType</name> | ||
246 | <enum>Fixed</enum> | ||
247 | </property> | ||
248 | <property> | ||
249 | <name>sizeHint</name> | ||
250 | <size> | ||
251 | <width>16</width> | ||
252 | <height>20</height> | ||
253 | </size> | ||
254 | </property> | ||
255 | </spacer> | ||
256 | </hbox> | ||
179 | </widget> | 257 | </widget> |
180 | </grid> | 258 | </vbox> |
181 | </widget> | ||
182 | </grid> | ||
183 | </widget> | 259 | </widget> |
184 | <connections> | 260 | <connections> |
185 | <connection> | 261 | <connection> |
186 | <sender>PushButton1</sender> | 262 | <sender>PushButton1</sender> |
187 | <signal>clicked()</signal> | 263 | <signal>clicked()</signal> |
188 | <receiver>Form1</receiver> | 264 | <receiver>Form1</receiver> |
189 | <slot>accept()</slot> | 265 | <slot>accept()</slot> |
190 | </connection> | 266 | </connection> |
191 | <connection> | 267 | <connection> |
192 | <sender>PushButton2</sender> | 268 | <sender>PushButton2</sender> |
193 | <signal>clicked()</signal> | 269 | <signal>clicked()</signal> |
194 | <receiver>Form1</receiver> | 270 | <receiver>Form1</receiver> |
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 935c11a..54808fa 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -141,25 +141,25 @@ void BlueBase::writeConfig() { | |||
141 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); | 141 | cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); |
142 | 142 | ||
143 | writeToHciConfig(); | 143 | writeToHciConfig(); |
144 | } | 144 | } |
145 | 145 | ||
146 | /** | 146 | /** |
147 | * Modify the hcid.conf file to our needs | 147 | * Modify the hcid.conf file to our needs |
148 | */ | 148 | */ |
149 | void BlueBase::writeToHciConfig() { | 149 | void BlueBase::writeToHciConfig() { |
150 | qWarning("writeToHciConfig"); | 150 | qWarning("writeToHciConfig"); |
151 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 151 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
152 | hciconf.load(); | 152 | hciconf.load(); |
153 | hciconf.setPinHelper( "/bin/QtPalmtop/bin/blue-pin" ); | 153 | hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); |
154 | hciconf.setName( m_deviceName ); | 154 | hciconf.setName( m_deviceName ); |
155 | hciconf.setEncrypt( m_useEncryption ); | 155 | hciconf.setEncrypt( m_useEncryption ); |
156 | hciconf.setAuth( m_enableAuthentification ); | 156 | hciconf.setAuth( m_enableAuthentification ); |
157 | hciconf.setPscan( m_enablePagescan ); | 157 | hciconf.setPscan( m_enablePagescan ); |
158 | hciconf.setIscan( m_enableInquiryscan ); | 158 | hciconf.setIscan( m_enableInquiryscan ); |
159 | hciconf.save(); | 159 | hciconf.save(); |
160 | } | 160 | } |
161 | 161 | ||
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Read the list of allready known devices | 164 | * Read the list of allready known devices |
165 | */ | 165 | */ |
diff --git a/noncore/net/ubrowser/httpfactory.cpp b/noncore/net/ubrowser/httpfactory.cpp index b57149f..369f206 100644 --- a/noncore/net/ubrowser/httpfactory.cpp +++ b/noncore/net/ubrowser/httpfactory.cpp | |||
@@ -86,63 +86,63 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const | |||
86 | //} | 86 | //} |
87 | 87 | ||
88 | //comm->setStuff(host, portS, file, text, image, isImage); | 88 | //comm->setStuff(host, portS, file, text, image, isImage); |
89 | 89 | ||
90 | //socket->connectToHost(host, port); | 90 | //socket->connectToHost(host, port); |
91 | 91 | ||
92 | int con, bytesSent; | 92 | int con, bytesSent; |
93 | struct sockaddr_in serverAddr; | 93 | struct sockaddr_in serverAddr; |
94 | struct hostent * serverInfo = gethostbyname( host.latin1() ); | 94 | struct hostent * serverInfo = gethostbyname( host.latin1() ); |
95 | 95 | ||
96 | if( serverInfo == NULL ) | 96 | if( serverInfo == NULL ) |
97 | { | 97 | { |
98 | QMessageBox *mb = new QMessageBox("Error!", | 98 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
99 | "couldnt find ip address", | 99 | QObject::tr("IP-Address not found"), |
100 | QMessageBox::NoIcon, | 100 | QMessageBox::NoIcon, |
101 | QMessageBox::Ok, | 101 | QMessageBox::Ok, |
102 | QMessageBox::NoButton, | 102 | QMessageBox::NoButton, |
103 | QMessageBox::NoButton); | 103 | QMessageBox::NoButton); |
104 | mb->exec(); | 104 | mb->exec(); |
105 | perror("HttpFactory::data:"); | 105 | perror("HttpFactory::data:"); |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | QByteArray data; | 109 | QByteArray data; |
110 | //printf( "HttpFactory::data: %s\n", inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); | 110 | //printf( "HttpFactory::data: %s\n", inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); |
111 | 111 | ||
112 | QString request("GET " + file + " HTTP/1.1\r\nHost: " + host + ':' + portS + "\r\nConnection: close\r\n\r\n"); | 112 | QString request("GET " + file + " HTTP/1.1\r\nHost: " + host + ':' + portS + "\r\nConnection: close\r\n\r\n"); |
113 | 113 | ||
114 | con = socket( AF_INET, SOCK_STREAM, 0 ); | 114 | con = socket( AF_INET, SOCK_STREAM, 0 ); |
115 | if( con == -1 ) | 115 | if( con == -1 ) |
116 | { | 116 | { |
117 | QMessageBox *mb = new QMessageBox("Error!", | 117 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
118 | "couldnt create socket", | 118 | QObject::tr("Error creating socket"), |
119 | QMessageBox::NoIcon, | 119 | QMessageBox::NoIcon, |
120 | QMessageBox::Ok, | 120 | QMessageBox::Ok, |
121 | QMessageBox::NoButton, | 121 | QMessageBox::NoButton, |
122 | QMessageBox::NoButton); | 122 | QMessageBox::NoButton); |
123 | mb->exec(); | 123 | mb->exec(); |
124 | perror("HttpFactory::data:"); | 124 | perror("HttpFactory::data:"); |
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
127 | 127 | ||
128 | serverAddr.sin_family = AF_INET; | 128 | serverAddr.sin_family = AF_INET; |
129 | serverAddr.sin_port = htons( port ); | 129 | serverAddr.sin_port = htons( port ); |
130 | serverAddr.sin_addr.s_addr = inet_addr( inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); | 130 | serverAddr.sin_addr.s_addr = inet_addr( inet_ntoa(*((struct in_addr *)serverInfo->h_addr )) ); |
131 | memset( &(serverAddr.sin_zero), '\0', 8 ); | 131 | memset( &(serverAddr.sin_zero), '\0', 8 ); |
132 | 132 | ||
133 | if(::connect( con, (struct sockaddr *)&serverAddr, sizeof(struct sockaddr)) == -1 ) | 133 | if(::connect( con, (struct sockaddr *)&serverAddr, sizeof(struct sockaddr)) == -1 ) |
134 | { | 134 | { |
135 | QMessageBox *mb = new QMessageBox("Error!", | 135 | QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), |
136 | "couldnt connect to socket", | 136 | QObject::tr("Error connecting to socket"), |
137 | QMessageBox::NoIcon, | 137 | QMessageBox::NoIcon, |
138 | QMessageBox::Ok, | 138 | QMessageBox::Ok, |
139 | QMessageBox::NoButton, | 139 | QMessageBox::NoButton, |
140 | QMessageBox::NoButton); | 140 | QMessageBox::NoButton); |
141 | mb->exec(); | 141 | mb->exec(); |
142 | perror("HttpFactory::data:"); | 142 | perror("HttpFactory::data:"); |
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | 145 | ||
146 | 146 | ||
147 | bytesSent = send( con, request.latin1(), request.length(), 0); | 147 | bytesSent = send( con, request.latin1(), request.length(), 0); |
148 | //printf("HttpFactory::data: bytes written: %d out of: %d\n", bytesSent, request.length() ); | 148 | //printf("HttpFactory::data: bytes written: %d out of: %d\n", bytesSent, request.length() ); |
diff --git a/noncore/net/ubrowser/mainview.cpp b/noncore/net/ubrowser/mainview.cpp index f68c5db..9302f05 100644 --- a/noncore/net/ubrowser/mainview.cpp +++ b/noncore/net/ubrowser/mainview.cpp | |||
@@ -11,25 +11,25 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
11 | Public License for more details. | 11 | Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free | 13 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free |
14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 14 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
15 | */ | 15 | */ |
16 | 16 | ||
17 | 17 | ||
18 | #include "mainview.h" | 18 | #include "mainview.h" |
19 | 19 | ||
20 | MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) | 20 | MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name) |
21 | { | 21 | { |
22 | setIcon( Resource::loadPixmap( "remote" ) ); | 22 | setIcon( Resource::loadPixmap( "remote" ) ); |
23 | setCaption("uBrowser"); | 23 | setCaption(tr("uBrowser")); |
24 | 24 | ||
25 | setToolBarsMovable( false ); | 25 | setToolBarsMovable( false ); |
26 | 26 | ||
27 | QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); | 27 | QPEToolBar *toolbar = new QPEToolBar(this, "toolbar"); |
28 | back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); | 28 | back = new QToolButton(Resource::loadPixmap("ubrowser/back"), 0, 0, 0, 0, toolbar, "back"); |
29 | forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); | 29 | forward = new QToolButton(Resource::loadPixmap("ubrowser/forward"), 0, 0, 0, 0, toolbar, "forward"); |
30 | home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home"); | 30 | home = new QToolButton(Resource::loadPixmap("ubrowser/home"), 0, 0, 0, 0, toolbar, "home"); |
31 | location = new QComboBox(true, toolbar, "location"); | 31 | location = new QComboBox(true, toolbar, "location"); |
32 | go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go"); | 32 | go = new QToolButton(Resource::loadPixmap("ubrowser/go"), 0, 0, 0, 0, toolbar, "go"); |
33 | 33 | ||
34 | toolbar->setStretchableWidget(location); | 34 | toolbar->setStretchableWidget(location); |
35 | toolbar->setHorizontalStretchable(true); | 35 | toolbar->setHorizontalStretchable(true); |
@@ -93,29 +93,29 @@ void MainView::goClicked() | |||
93 | { | 93 | { |
94 | browser->setMimeSourceFactory(QMimeSourceFactory::defaultFactory()); | 94 | browser->setMimeSourceFactory(QMimeSourceFactory::defaultFactory()); |
95 | printf("MainView::goClicked: using default source factory\n"); | 95 | printf("MainView::goClicked: using default source factory\n"); |
96 | } | 96 | } |
97 | 97 | ||
98 | browser->setSource(location->currentText()); | 98 | browser->setSource(location->currentText()); |
99 | } | 99 | } |
100 | 100 | ||
101 | void MainView::textChanged() | 101 | void MainView::textChanged() |
102 | { | 102 | { |
103 | if(browser->documentTitle().isNull()) | 103 | if(browser->documentTitle().isNull()) |
104 | { | 104 | { |
105 | setCaption(browser->source() + " - uBrowser"); | 105 | setCaption( tr("%1 - uBrowser").arg( browser->source() ) ); |
106 | } | 106 | } |
107 | else | 107 | else |
108 | { | 108 | { |
109 | setCaption(browser->documentTitle() + " - uBrowser"); | 109 | setCaption(tr(" - uBrowser").arg( browser->documentTitle() )); |
110 | } | 110 | } |
111 | 111 | ||
112 | location->setEditText(browser->source()); | 112 | location->setEditText(browser->source()); |
113 | } | 113 | } |
114 | 114 | ||
115 | void MainView::setDocument( const QString& applnk_filename ) | 115 | void MainView::setDocument( const QString& applnk_filename ) |
116 | { | 116 | { |
117 | DocLnk *file = new DocLnk( applnk_filename ); | 117 | DocLnk *file = new DocLnk( applnk_filename ); |
118 | 118 | ||
119 | location->setEditText( file->file() ); | 119 | location->setEditText( file->file() ); |
120 | goClicked(); | 120 | goClicked(); |
121 | } | 121 | } |
diff --git a/noncore/net/ubrowser/opie-ubrowser.control b/noncore/net/ubrowser/opie-ubrowser.control new file mode 100644 index 0000000..61a6cde --- a/dev/null +++ b/noncore/net/ubrowser/opie-ubrowser.control | |||
@@ -0,0 +1,10 @@ | |||
1 | Package: opie-ubrowser | ||
2 | Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png | ||
3 | Priority: optional | ||
4 | Section: opie/applications | ||
5 | Maintainer: Thomas Stephens <spiralman@softhome.net> | ||
6 | Architecture: arm | ||
7 | Version: 0.1-$SUB_VERSION | ||
8 | Depends: task-opie-minimal | ||
9 | License: GPL | ||
10 | Description: a very small web browser | ||
diff --git a/noncore/unsupported/mailit/config.in b/noncore/unsupported/mailit/config.in index 2b56b5f..142b840 100644 --- a/noncore/unsupported/mailit/config.in +++ b/noncore/unsupported/mailit/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config MAILIT | 1 | config MAILIT |
2 | boolean "mailit" | 2 | boolean "opie-mailit (a simple POP3 email client)" |
3 | default "n" | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) |
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp index 5da3bcb..1df6b2b 100644 --- a/noncore/unsupported/mailit/popclient.cpp +++ b/noncore/unsupported/mailit/popclient.cpp | |||
@@ -32,24 +32,25 @@ PopClient::PopClient() | |||
32 | 32 | ||
33 | socket = new QSocket(this, "popClient"); | 33 | socket = new QSocket(this, "popClient"); |
34 | connect(socket, SIGNAL(error(int)), this, SLOT(errorHandling(int))); | 34 | connect(socket, SIGNAL(error(int)), this, SLOT(errorHandling(int))); |
35 | connect(socket, SIGNAL(connected()), this, SLOT(connectionEstablished())); | 35 | connect(socket, SIGNAL(connected()), this, SLOT(connectionEstablished())); |
36 | connect(socket, SIGNAL(readyRead()), this, SLOT(incomingData())); | 36 | connect(socket, SIGNAL(readyRead()), this, SLOT(incomingData())); |
37 | 37 | ||
38 | stream = new QTextStream(socket); | 38 | stream = new QTextStream(socket); |
39 | 39 | ||
40 | receiving = FALSE; | 40 | receiving = FALSE; |
41 | synchronize = FALSE; | 41 | synchronize = FALSE; |
42 | lastSync = 0; | 42 | lastSync = 0; |
43 | headerLimit = 0; | 43 | headerLimit = 0; |
44 | mailList = 0; | ||
44 | preview = FALSE; | 45 | preview = FALSE; |
45 | } | 46 | } |
46 | 47 | ||
47 | PopClient::~PopClient() | 48 | PopClient::~PopClient() |
48 | { | 49 | { |
49 | delete socket; | 50 | delete socket; |
50 | delete stream; | 51 | delete stream; |
51 | } | 52 | } |
52 | 53 | ||
53 | void PopClient::newConnection(const QString &target, int port) | 54 | void PopClient::newConnection(const QString &target, int port) |
54 | { | 55 | { |
55 | if (receiving) { | 56 | if (receiving) { |
@@ -182,25 +183,25 @@ void PopClient::incomingData() | |||
182 | temp.truncate((uint) x); | 183 | temp.truncate((uint) x); |
183 | newMessages = temp.toInt(); | 184 | newMessages = temp.toInt(); |
184 | messageCount = 1; | 185 | messageCount = 1; |
185 | status = List; | 186 | status = List; |
186 | 187 | ||
187 | if (synchronize) { | 188 | if (synchronize) { |
188 | //messages deleted from server, reload all | 189 | //messages deleted from server, reload all |
189 | if (newMessages < lastSync) | 190 | if (newMessages < lastSync) |
190 | lastSync = 0; | 191 | lastSync = 0; |
191 | messageCount = 1; | 192 | messageCount = 1; |
192 | } | 193 | } |
193 | 194 | ||
194 | if (selected) { | 195 | if (selected && mailList ) { |
195 | int *ptr = mailList->first(); | 196 | int *ptr = mailList->first(); |
196 | if (ptr != 0) { | 197 | if (ptr != 0) { |
197 | newMessages++; //to ensure no early jumpout | 198 | newMessages++; //to ensure no early jumpout |
198 | messageCount = *ptr; | 199 | messageCount = *ptr; |
199 | } else newMessages = 0; | 200 | } else newMessages = 0; |
200 | } | 201 | } |
201 | 202 | ||
202 | } else errorHandlingWithMsg(ErrUnknownResponse, response); | 203 | } else errorHandlingWithMsg(ErrUnknownResponse, response); |
203 | } | 204 | } |
204 | //Read message number x, count upwards to messageCount | 205 | //Read message number x, count upwards to messageCount |
205 | case List: { | 206 | case List: { |
206 | if (messageCount <= newMessages) { | 207 | if (messageCount <= newMessages) { |
diff --git a/noncore/unsupported/mailit/resource.cpp b/noncore/unsupported/mailit/resource.cpp deleted file mode 100644 index dc19880..0000000 --- a/noncore/unsupported/mailit/resource.cpp +++ b/dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include "qpeapplication.h" | ||
22 | #include "resource.h" | ||
23 | #include <qdir.h> | ||
24 | #include <qfile.h> | ||
25 | #include <qregexp.h> | ||
26 | #include <qpixmapcache.h> | ||
27 | #include <qpainter.h> | ||
28 | |||
29 | #include "inlinepics_p.h" | ||
30 | |||
31 | /*! | ||
32 | \class Resource resource.h | ||
33 | \brief The Resource class provides access to named resources. | ||
34 | |||
35 | The resources may be provided from files or other sources. | ||
36 | */ | ||
37 | |||
38 | /*! | ||
39 | \fn Resource::Resource() | ||
40 | \internal | ||
41 | */ | ||
42 | |||
43 | /*! | ||
44 | Returns the QPixmap named \a pix. You should avoid including | ||
45 | any filename type extension (eg. .png, .xpm). | ||
46 | */ | ||
47 | QPixmap Resource::loadPixmap( const QString &pix ) | ||
48 | { | ||
49 | QPixmap pm; | ||
50 | QString key="QPE_"+pix; | ||
51 | if ( !QPixmapCache::find(key,pm) ) { | ||
52 | pm.convertFromImage(loadImage(pix)); | ||
53 | QPixmapCache::insert(key,pm); | ||
54 | } | ||
55 | return pm; | ||
56 | } | ||
57 | |||
58 | /*! | ||
59 | Returns the QBitmap named \a pix. You should avoid including | ||
60 | any filename type extension (eg. .png, .xpm). | ||
61 | */ | ||
62 | QBitmap Resource::loadBitmap( const QString &pix ) | ||
63 | { | ||
64 | QBitmap bm; | ||
65 | bm = loadPixmap(pix); | ||
66 | return bm; | ||
67 | } | ||
68 | |||
69 | /*! | ||
70 | Returns the filename of a pixmap named \a pix. You should avoid including | ||
71 | any filename type extension (eg. .png, .xpm). | ||
72 | |||
73 | Normally you will use loadPixmap() rather than this function. | ||
74 | */ | ||
75 | QString Resource::findPixmap( const QString &pix ) | ||
76 | { | ||
77 | QString picsPath = QPEApplication::qpeDir() + "pics/"; | ||
78 | |||
79 | if ( QFile( picsPath + pix + ".png").exists() ) | ||
80 | return picsPath + pix + ".png"; | ||
81 | else if ( QFile( picsPath + pix + ".xpm").exists() ) | ||
82 | return picsPath + pix + ".xpm"; | ||
83 | else if ( QFile( picsPath + pix ).exists() ) | ||
84 | return picsPath + pix; | ||
85 | |||
86 | //qDebug("Cannot find pixmap: %s", pix.latin1()); | ||
87 | return QString(); | ||
88 | } | ||
89 | |||
90 | /*! | ||
91 | Returns a sound file for a sound named \a name. | ||
92 | You should avoid including any filename type extension (eg. .wav, .au, .mp3). | ||
93 | */ | ||
94 | QString Resource::findSound( const QString &name ) | ||
95 | { | ||
96 | QString picsPath = QPEApplication::qpeDir() + "sounds/"; | ||
97 | |||
98 | QString result; | ||
99 | if ( QFile( (result = picsPath + name + ".wav") ).exists() ) | ||
100 | return result; | ||
101 | |||
102 | return QString(); | ||
103 | } | ||
104 | |||
105 | /*! | ||
106 | Returns a list of all sound names. | ||
107 | */ | ||
108 | QStringList Resource::allSounds() | ||
109 | { | ||
110 | QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); | ||
111 | QStringList entries = resourcedir.entryList(); | ||
112 | QStringList result; | ||
113 | for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) | ||
114 | result.append((*i).replace(QRegExp("\\.wav"),"")); | ||
115 | return result; | ||
116 | } | ||
117 | |||
118 | /*! | ||
119 | Returns the QImage named \a name. You should avoid including | ||
120 | any filename type extension (eg. .png, .xpm). | ||
121 | */ | ||
122 | QImage Resource::loadImage( const QString &name) | ||
123 | { | ||
124 | QImage img = qembed_findImage(name.latin1()); | ||
125 | if ( img.isNull() ) | ||
126 | return QImage(findPixmap(name)); | ||
127 | return img; | ||
128 | } | ||
129 | |||
130 | /*! | ||
131 | \fn QIconSet Resource::loadIconSet( const QString &name ) | ||
132 | |||
133 | Returns a QIconSet for the pixmap named \a name. A disabled icon is | ||
134 | generated that conforms to the Qtopia look & feel. You should avoid | ||
135 | including any filename type extension (eg. .png, .xpm). | ||
136 | */ | ||
diff --git a/noncore/unsupported/mailit/resource.h b/noncore/unsupported/mailit/resource.h deleted file mode 100644 index 982c58a..0000000 --- a/noncore/unsupported/mailit/resource.h +++ b/dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef PIXMAPLOADER_H | ||
21 | #define PIXMAPLOADER_H | ||
22 | |||
23 | #include <qimage.h> | ||
24 | #include <qbitmap.h> | ||
25 | #include <qiconset.h> | ||
26 | #include <qstringlist.h> | ||
27 | |||
28 | class Resource | ||
29 | { | ||
30 | public: | ||
31 | Resource() {} | ||
32 | |||
33 | static QImage loadImage( const QString &name); | ||
34 | |||
35 | static QPixmap loadPixmap( const QString &name ); | ||
36 | static QBitmap loadBitmap( const QString &name ); | ||
37 | static QString findPixmap( const QString &name ); | ||
38 | |||
39 | static QIconSet loadIconSet( const QString &name ); | ||
40 | |||
41 | static QString findSound( const QString &name ); | ||
42 | static QStringList allSounds(); | ||
43 | }; | ||
44 | |||
45 | // Inline for compatibility with SHARP ROMs | ||
46 | inline QIconSet Resource::loadIconSet( const QString &pix ) | ||
47 | { | ||
48 | QImage img = loadImage( pix ); | ||
49 | QPixmap pm; | ||
50 | pm.convertFromImage( img ); | ||
51 | QIconSet is( pm ); | ||
52 | QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large; | ||
53 | |||
54 | QPixmap dpm = loadPixmap( pix + "_disabled" ); | ||
55 | |||
56 | #ifndef QT_NO_DEPTH_32// have alpha-blended pixmaps | ||
57 | if ( dpm.isNull() ) { | ||
58 | QImage dimg( img.width(), img.height(), 32 ); | ||
59 | for ( int y = 0; y < img.height(); y++ ) { | ||
60 | for ( int x = 0; x < img.width(); x++ ) { | ||
61 | QRgb p = img.pixel( x, y ); | ||
62 | uint a = (p & 0xff000000) / 3; | ||
63 | p = (p & 0x00ffffff) | (a & 0xff000000); | ||
64 | dimg.setPixel( x, y, p ); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | dimg.setAlphaBuffer( TRUE ); | ||
69 | dpm.convertFromImage( dimg ); | ||
70 | } | ||
71 | #endif | ||
72 | |||
73 | if ( !dpm.isNull() ) | ||
74 | is.setPixmap( dpm, size, QIconSet::Disabled ); | ||
75 | |||
76 | return is; | ||
77 | } | ||
78 | |||
79 | |||
80 | #endif | ||
diff --git a/noncore/unsupported/mailit/smtpclient.cpp b/noncore/unsupported/mailit/smtpclient.cpp index 5b5ef52..51ca50b 100644 --- a/noncore/unsupported/mailit/smtpclient.cpp +++ b/noncore/unsupported/mailit/smtpclient.cpp | |||
@@ -95,45 +95,45 @@ void SmtpClient::incomingData() | |||
95 | switch(status) { | 95 | switch(status) { |
96 | case Init: { | 96 | case Init: { |
97 | if (response[0] == '2') { | 97 | if (response[0] == '2') { |
98 | status = From; | 98 | status = From; |
99 | mailPtr = mailList.first(); | 99 | mailPtr = mailList.first(); |
100 | *stream << "HELO there\r\n"; | 100 | *stream << "HELO there\r\n"; |
101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 101 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
102 | break; | 102 | break; |
103 | } | 103 | } |
104 | case From: { | 104 | case From: { |
105 | if (response[0] == '2') { | 105 | if (response[0] == '2') { |
106 | qDebug(mailPtr->from); | 106 | qDebug(mailPtr->from); |
107 | *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; | 107 | *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; |
108 | status = Recv; | 108 | status = Recv; |
109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); | 109 | } else errorHandlingWithMsg(ErrUnknownResponse, response ); |
110 | break; | 110 | break; |
111 | } | 111 | } |
112 | case Recv: { | 112 | case Recv: { |
113 | if (response[0] == '2') { | 113 | if (response[0] == '2') { |
114 | it = mailPtr->to.begin(); | 114 | it = mailPtr->to.begin(); |
115 | if (it == NULL) { | 115 | if (it == NULL) { |
116 | errorHandlingWithMsg(ErrUnknownResponse,response); | 116 | errorHandlingWithMsg(ErrUnknownResponse,response); |
117 | } | 117 | } |
118 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 118 | *stream << "RCPT TO: " << *it << "\r\n"; |
119 | status = MRcv; | 119 | status = MRcv; |
120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 120 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
121 | break; | 121 | break; |
122 | } | 122 | } |
123 | case MRcv: { | 123 | case MRcv: { |
124 | if (response[0] == '2') { | 124 | if (response[0] == '2') { |
125 | it++; | 125 | it++; |
126 | if ( it != mailPtr->to.end() ) { | 126 | if ( it != mailPtr->to.end() ) { |
127 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 127 | *stream << "RCPT TO: " << *it << "\r\n"; |
128 | break; | 128 | break; |
129 | } else { | 129 | } else { |
130 | status = Data; | 130 | status = Data; |
131 | } | 131 | } |
132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); | 132 | } else errorHandlingWithMsg(ErrUnknownResponse,response); |
133 | } | 133 | } |
134 | case Data: { | 134 | case Data: { |
135 | if (response[0] == '2') { | 135 | if (response[0] == '2') { |
136 | *stream << "DATA\r\n"; | 136 | *stream << "DATA\r\n"; |
137 | status = Body; | 137 | status = Body; |
138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); | 138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); |
139 | 139 | ||
diff --git a/noncore/unsupported/mailit/viewatt.cpp b/noncore/unsupported/mailit/viewatt.cpp index 293e137..3515ba5 100644 --- a/noncore/unsupported/mailit/viewatt.cpp +++ b/noncore/unsupported/mailit/viewatt.cpp | |||
@@ -8,25 +8,25 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "resource.h" | 20 | #include <qpe/resource.h> |
21 | #include "viewatt.h" | 21 | #include "viewatt.h" |
22 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
23 | #include <qpe/applnk.h> | 23 | #include <qpe/applnk.h> |
24 | #include <qpe/mimetype.h> | 24 | #include <qpe/mimetype.h> |
25 | 25 | ||
26 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) | 26 | ViewAtt::ViewAtt(QWidget *parent, const char *name, WFlags f) |
27 | : QMainWindow(parent, name, f) | 27 | : QMainWindow(parent, name, f) |
28 | { | 28 | { |
29 | setCaption(tr("Exploring attatchments")); | 29 | setCaption(tr("Exploring attatchments")); |
30 | 30 | ||
31 | setToolBarsMovable( FALSE ); | 31 | setToolBarsMovable( FALSE ); |
32 | bar = new QToolBar(this); | 32 | bar = new QToolBar(this); |