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,3 +1,3 @@ config MAILIT - boolean "opie-mailit (a simple POP3 email client)" + boolean "mailit" default "n" 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 @@ -43,2 +43,3 @@ PopClient::PopClient() headerLimit = 0; + mailList = 0; preview = FALSE; @@ -193,3 +194,3 @@ void PopClient::incomingData() - if (selected) { + if (selected && mailList ) { int *ptr = mailList->first(); 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "qpeapplication.h" -#include "resource.h" -#include <qdir.h> -#include <qfile.h> -#include <qregexp.h> -#include <qpixmapcache.h> -#include <qpainter.h> - -#include "inlinepics_p.h" - -/*! - \class Resource resource.h - \brief The Resource class provides access to named resources. - - The resources may be provided from files or other sources. -*/ - -/*! - \fn Resource::Resource() - \internal -*/ - -/*! - Returns the QPixmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QPixmap Resource::loadPixmap( const QString &pix ) -{ - QPixmap pm; - QString key="QPE_"+pix; - if ( !QPixmapCache::find(key,pm) ) { - pm.convertFromImage(loadImage(pix)); - QPixmapCache::insert(key,pm); - } - return pm; -} - -/*! - Returns the QBitmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QBitmap Resource::loadBitmap( const QString &pix ) -{ - QBitmap bm; - bm = loadPixmap(pix); - return bm; -} - -/*! - Returns the filename of a pixmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). - - Normally you will use loadPixmap() rather than this function. -*/ -QString Resource::findPixmap( const QString &pix ) -{ - QString picsPath = QPEApplication::qpeDir() + "pics/"; - - if ( QFile( picsPath + pix + ".png").exists() ) - return picsPath + pix + ".png"; - else if ( QFile( picsPath + pix + ".xpm").exists() ) - return picsPath + pix + ".xpm"; - else if ( QFile( picsPath + pix ).exists() ) - return picsPath + pix; - - //qDebug("Cannot find pixmap: %s", pix.latin1()); - return QString(); -} - -/*! - Returns a sound file for a sound named \a name. - You should avoid including any filename type extension (eg. .wav, .au, .mp3). -*/ -QString Resource::findSound( const QString &name ) -{ - QString picsPath = QPEApplication::qpeDir() + "sounds/"; - - QString result; - if ( QFile( (result = picsPath + name + ".wav") ).exists() ) - return result; - - return QString(); -} - -/*! - Returns a list of all sound names. -*/ -QStringList Resource::allSounds() -{ - QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); - QStringList entries = resourcedir.entryList(); - QStringList result; - for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) - result.append((*i).replace(QRegExp("\\.wav"),"")); - return result; -} - -/*! - Returns the QImage named \a name. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QImage Resource::loadImage( const QString &name) -{ - QImage img = qembed_findImage(name.latin1()); - if ( img.isNull() ) - return QImage(findPixmap(name)); - return img; -} - -/*! - \fn QIconSet Resource::loadIconSet( const QString &name ) - - Returns a QIconSet for the pixmap named \a name. A disabled icon is - generated that conforms to the Qtopia look & feel. You should avoid - including any filename type extension (eg. .png, .xpm). -*/ 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#ifndef PIXMAPLOADER_H -#define PIXMAPLOADER_H - -#include <qimage.h> -#include <qbitmap.h> -#include <qiconset.h> -#include <qstringlist.h> - -class Resource -{ -public: - Resource() {} - - static QImage loadImage( const QString &name); - - static QPixmap loadPixmap( const QString &name ); - static QBitmap loadBitmap( const QString &name ); - static QString findPixmap( const QString &name ); - - static QIconSet loadIconSet( const QString &name ); - - static QString findSound( const QString &name ); - static QStringList allSounds(); -}; - -// Inline for compatibility with SHARP ROMs -inline QIconSet Resource::loadIconSet( const QString &pix ) -{ - QImage img = loadImage( pix ); - QPixmap pm; - pm.convertFromImage( img ); - QIconSet is( pm ); - QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large; - - QPixmap dpm = loadPixmap( pix + "_disabled" ); - -#ifndef QT_NO_DEPTH_32 // have alpha-blended pixmaps - if ( dpm.isNull() ) { - QImage dimg( img.width(), img.height(), 32 ); - for ( int y = 0; y < img.height(); y++ ) { - for ( int x = 0; x < img.width(); x++ ) { - QRgb p = img.pixel( x, y ); - uint a = (p & 0xff000000) / 3; - p = (p & 0x00ffffff) | (a & 0xff000000); - dimg.setPixel( x, y, p ); - } - } - - dimg.setAlphaBuffer( TRUE ); - dpm.convertFromImage( dimg ); - } -#endif - - if ( !dpm.isNull() ) - is.setPixmap( dpm, size, QIconSet::Disabled ); - - return is; -} - - -#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 @@ -106,3 +106,3 @@ void SmtpClient::incomingData() qDebug(mailPtr->from); - *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; + *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; status = Recv; @@ -117,3 +117,3 @@ void SmtpClient::incomingData() } - *stream << "RCPT TO: <" << *it << ">\r\n"; + *stream << "RCPT TO: " << *it << "\r\n"; status = MRcv; @@ -126,3 +126,3 @@ void SmtpClient::incomingData() if ( it != mailPtr->to.end() ) { - *stream << "RCPT TO: <" << *it << ">\r\n"; + *stream << "RCPT TO: " << *it << "\r\n"; break; 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 @@ -19,3 +19,3 @@ **********************************************************************/ -#include "resource.h" +#include <qpe/resource.h> #include "viewatt.h" 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 @@ -2,3 +2,3 @@ TEMPLATE = app CONFIG += qt warn_on release -HEADERS = opieftp.h inputDialog.h ftplib.h +HEADERS = opieftp.h inputDialog.h SOURCES = opieftp.cpp inputDialog.cpp main.cpp 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,3 +1,3 @@ config OPIEIRC - boolean "opieirc" + boolean "opie-irc (chat via your favorite IRC server)" default "y" 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 @@ -37 +37,12 @@ bool IRCChannelList::hasPerson(QString nick) { } + +bool IRCChannelList::removePerson(QString nick) { + for (unsigned int i=0; i<count(); i++) { + if (text(i) == nick){ + removeItem(i); + return TRUE; + } + } + return FALSE; +} + 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 @@ -31,2 +31,3 @@ public: bool hasPerson(QString nick); + bool removePerson(QString nick); protected: 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 @@ -64,2 +64,3 @@ void IRCChannelTab::appendText(QString text) { } + m_textview->ensureVisible(0, m_textview->contentsHeight()); m_textview->setText(txt); 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 @@ -208,4 +208,5 @@ void IRCMessageParser::parseLiteralPrivMsg(IRCMessage *message) { void IRCMessageParser::parseLiteralNick(IRCMessage *message) { - IRCPerson mask(message->prefix()); + IRCPerson mask(message->prefix()); + /* this way of handling nick changes really sucks */ if (mask.nick() == m_session->m_server->nick()) { @@ -220,2 +221,13 @@ void IRCMessageParser::parseLiteralNick(IRCMessage *message) { if (person) { + //IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0))); + + /* new code starts here -- this removes the person from all channels */ + QList<IRCChannel> channels; + m_session->getChannelsByPerson(person, channels); + QListIterator<IRCChannel> it(channels); + for (;it.current(); ++it) { + IRCChannelPerson *chanperson = it.current()->getPerson(mask.nick()); + it.current()->removePerson(chanperson); + chanperson->person->setNick(message->param(0)); + it.current()->addPerson(chanperson); IRCOutput output(OUTPUT_NICKCHANGE, tr("%1 is now known as %2").arg( mask.nick() ).arg( message->param(0 ))); @@ -223,2 +235,4 @@ void IRCMessageParser::parseLiteralNick(IRCMessage *message) { emit outputReady(output); + } + /* new code ends here */ } else { @@ -399,2 +413,3 @@ void IRCMessageParser::parseLiteralKick(IRCMessage *message) { } else { + /* someone else got kicked */ channel->removePerson(person); 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 @@ -125,12 +125,6 @@ void IRCServerTab::executeCommand(IRCTab *tab, QString line) { if (nickname.length() > 0) { - if (line.length() > 7 + nickname.length()) { - QString text = line.right(line.length()-nickname.length()-7); + QString text = line.right(line.length()-nickname.length()-5); IRCPerson person; person.setNick(nickname); - m_session->kick(((IRCChannelTab *)tab)->channel(), &person, text); - } else { - IRCPerson person; - person.setNick(nickname); - m_session->kick(((IRCChannelTab *)tab)->channel(), &person); - } + m_session->op(((IRCChannelTab *)tab)->channel(), &person); } @@ -348,3 +342,15 @@ void IRCServerTab::display(IRCOutput output) { break; - case OUTPUT_OTHERJOIN: +/* case OUTPUT_NICKCHANGE: { + //WAS HERE + QString nick = ((IRCPerson *)output.getParam(0))->nick(); + QListIterator<IRCChannelTab> it(m_channelTabs); + for (; it.current(); ++it) { + if (it.current()->list()->hasPerson(nick)) { + it.current()->appendText("<font color=\"" + m_notificationColor + "\">"+output.htmlMessage()+"</font><br>"); + it.current()->list()->update(); + } + } + } + break; + */ case OUTPUT_OTHERJOIN: case OUTPUT_OTHERKICK: 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 @@ -62,2 +62,6 @@ void IRCSession::kick(IRCChannel *channel, IRCPerson *person) { +void IRCSession::op(IRCChannel *channel, IRCPerson *person) { + m_connection->sendLine("MODE "+ channel->channelname() + " +ooo " + person->nick()); +} + void IRCSession::kick(IRCChannel *channel, IRCPerson *person, QString message) { 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 @@ -53,2 +53,3 @@ public: void part(IRCChannel *channel); + void op(IRCChannel *channel, IRCPerson *person); void kick(IRCChannel *channel, IRCPerson *person); 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 @@ -22,2 +22,3 @@ PinDlg::PinDlg( const QString& status, txtStatus->setText(status); + showMaximized(); } 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 @@ -3,3 +3,2 @@ #include <qdialog.h> - #include "pindlgbase.h" @@ -7,4 +6,7 @@ namespace OpieTooth { + class PinDlg : public PinDlgBase { + Q_OBJECT + public: @@ -17,2 +19,3 @@ namespace OpieTooth { QString pin() const; + private: @@ -20,7 +23,7 @@ namespace OpieTooth { QString m_mac; + protected slots: void accept(); - }; - }; +}; 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 @@ -14,4 +14,4 @@ <y>0</y> - <width>248</width> - <height>167</height> + <width>258</width> + <height>245</height> </rect> @@ -22,3 +22,3 @@ </property> - <grid> + <vbox> <property stdset="1"> @@ -31,3 +31,39 @@ </property> - <widget row="0" column="0" > + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>txtStatus</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string></string> + </property> + <property stdset="1"> + <name>textFormat</name> + <enum>RichText</enum> + </property> + </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer4_2</cstring> + </property> + <property stdset="1"> + <name>orientation</name> + <enum>Vertical</enum> + </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Expanding</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget> <class>QLayoutWidget</class> @@ -37,3 +73,29 @@ </property> - <grid> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Please enter PIN:</string> + </property> + </widget> + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout5</cstring> + </property> + <hbox> <property stdset="1"> @@ -46,3 +108,3 @@ </property> - <widget row="3" column="0" rowspan="1" colspan="3" > + <widget> <class>QLineEdit</class> @@ -57,6 +119,6 @@ </widget> - <spacer row="5" column="4" > + <spacer> <property> <name>name</name> - <cstring>Spacer2</cstring> + <cstring>Spacer4</cstring> </property> @@ -73,3 +135,3 @@ <size> - <width>16</width> + <width>21</width> <height>20</height> @@ -78,6 +140,21 @@ </spacer> - <spacer row="5" column="0" > + </hbox> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>ckbPin</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Save pin</string> + </property> + </widget> + </vbox> + </widget> + <spacer> <property> <name>name</name> - <cstring>Spacer1</cstring> + <cstring>Spacer5</cstring> </property> @@ -85,3 +162,3 @@ <name>orientation</name> - <enum>Horizontal</enum> + <enum>Vertical</enum> </property> @@ -89,3 +166,3 @@ <name>sizeType</name> - <enum>Fixed</enum> + <enum>Expanding</enum> </property> @@ -94,3 +171,3 @@ <size> - <width>30</width> + <width>20</width> <height>20</height> @@ -99,6 +176,21 @@ </spacer> - <spacer row="3" column="3" > + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout7</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <spacer> <property> <name>name</name> - <cstring>Spacer4</cstring> + <cstring>Spacer1</cstring> </property> @@ -115,3 +207,3 @@ <size> - <width>21</width> + <width>30</width> <height>20</height> @@ -120,29 +212,3 @@ </spacer> - <widget row="0" column="0" rowspan="1" colspan="5" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>txtStatus</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string></string> - </property> - <property stdset="1"> - <name>textFormat</name> - <enum>RichText</enum> - </property> - </widget> - <widget row="2" column="0" rowspan="1" colspan="5" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel3</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Please enter PIN:</string> - </property> - </widget> - <widget row="5" column="1" > + <widget> <class>QPushButton</class> @@ -157,3 +223,3 @@ </widget> - <widget row="5" column="2" rowspan="1" colspan="2" > + <widget> <class>QPushButton</class> @@ -168,16 +234,26 @@ </widget> - <widget row="4" column="0" rowspan="1" colspan="5" > - <class>QCheckBox</class> - <property stdset="1"> + <spacer> + <property> <name>name</name> - <cstring>ckbPin</cstring> + <cstring>Spacer2</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Save pin</string> + <name>orientation</name> + <enum>Horizontal</enum> </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Fixed</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>16</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> </widget> - </grid> - </widget> - </grid> + </vbox> </widget> 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 @@ -152,3 +152,3 @@ void BlueBase::writeToHciConfig() { hciconf.load(); - hciconf.setPinHelper( "/bin/QtPalmtop/bin/blue-pin" ); + hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); hciconf.setName( m_deviceName ); 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 @@ -97,4 +97,4 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const { - QMessageBox *mb = new QMessageBox("Error!", - "couldnt find ip address", + QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), + QObject::tr("IP-Address not found"), QMessageBox::NoIcon, @@ -116,4 +116,4 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const { - QMessageBox *mb = new QMessageBox("Error!", - "couldnt create socket", + QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), + QObject::tr("Error creating socket"), QMessageBox::NoIcon, @@ -134,4 +134,4 @@ const QMimeSource * HttpFactory::data(const QString &abs_name) const { - QMessageBox *mb = new QMessageBox("Error!", - "couldnt connect to socket", + QMessageBox *mb = new QMessageBox(QObject::tr("Error!"), + QObject::tr("Error connecting to socket"), QMessageBox::NoIcon, 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 @@ -22,3 +22,3 @@ MainView::MainView(QWidget *parent, const char *name) : QMainWindow(parent, name setIcon( Resource::loadPixmap( "remote" ) ); - setCaption("uBrowser"); + setCaption(tr("uBrowser")); @@ -104,3 +104,3 @@ void MainView::textChanged() { - setCaption(browser->source() + " - uBrowser"); + setCaption( tr("%1 - uBrowser").arg( browser->source() ) ); } @@ -108,3 +108,3 @@ void MainView::textChanged() { - setCaption(browser->documentTitle() + " - uBrowser"); + setCaption(tr(" - uBrowser").arg( browser->documentTitle() )); } 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 @@ +Package: opie-ubrowser +Files: bin/ubrowser apps/Applications/ubrowser.desktop pics/ubrowser/*.png +Priority: optional +Section: opie/applications +Maintainer: Thomas Stephens <spiralman@softhome.net> +Architecture: arm +Version: 0.1-$SUB_VERSION +Depends: task-opie-minimal +License: GPL +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,3 +1,3 @@ config MAILIT - boolean "mailit" + boolean "opie-mailit (a simple POP3 email client)" default "n" 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 @@ -43,2 +43,3 @@ PopClient::PopClient() headerLimit = 0; + mailList = 0; preview = FALSE; @@ -193,3 +194,3 @@ void PopClient::incomingData() - if (selected) { + if (selected && mailList ) { int *ptr = mailList->first(); 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "qpeapplication.h" -#include "resource.h" -#include <qdir.h> -#include <qfile.h> -#include <qregexp.h> -#include <qpixmapcache.h> -#include <qpainter.h> - -#include "inlinepics_p.h" - -/*! - \class Resource resource.h - \brief The Resource class provides access to named resources. - - The resources may be provided from files or other sources. -*/ - -/*! - \fn Resource::Resource() - \internal -*/ - -/*! - Returns the QPixmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QPixmap Resource::loadPixmap( const QString &pix ) -{ - QPixmap pm; - QString key="QPE_"+pix; - if ( !QPixmapCache::find(key,pm) ) { - pm.convertFromImage(loadImage(pix)); - QPixmapCache::insert(key,pm); - } - return pm; -} - -/*! - Returns the QBitmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QBitmap Resource::loadBitmap( const QString &pix ) -{ - QBitmap bm; - bm = loadPixmap(pix); - return bm; -} - -/*! - Returns the filename of a pixmap named \a pix. You should avoid including - any filename type extension (eg. .png, .xpm). - - Normally you will use loadPixmap() rather than this function. -*/ -QString Resource::findPixmap( const QString &pix ) -{ - QString picsPath = QPEApplication::qpeDir() + "pics/"; - - if ( QFile( picsPath + pix + ".png").exists() ) - return picsPath + pix + ".png"; - else if ( QFile( picsPath + pix + ".xpm").exists() ) - return picsPath + pix + ".xpm"; - else if ( QFile( picsPath + pix ).exists() ) - return picsPath + pix; - - //qDebug("Cannot find pixmap: %s", pix.latin1()); - return QString(); -} - -/*! - Returns a sound file for a sound named \a name. - You should avoid including any filename type extension (eg. .wav, .au, .mp3). -*/ -QString Resource::findSound( const QString &name ) -{ - QString picsPath = QPEApplication::qpeDir() + "sounds/"; - - QString result; - if ( QFile( (result = picsPath + name + ".wav") ).exists() ) - return result; - - return QString(); -} - -/*! - Returns a list of all sound names. -*/ -QStringList Resource::allSounds() -{ - QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); - QStringList entries = resourcedir.entryList(); - QStringList result; - for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) - result.append((*i).replace(QRegExp("\\.wav"),"")); - return result; -} - -/*! - Returns the QImage named \a name. You should avoid including - any filename type extension (eg. .png, .xpm). -*/ -QImage Resource::loadImage( const QString &name) -{ - QImage img = qembed_findImage(name.latin1()); - if ( img.isNull() ) - return QImage(findPixmap(name)); - return img; -} - -/*! - \fn QIconSet Resource::loadIconSet( const QString &name ) - - Returns a QIconSet for the pixmap named \a name. A disabled icon is - generated that conforms to the Qtopia look & feel. You should avoid - including any filename type extension (eg. .png, .xpm). -*/ 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 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of Qtopia Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#ifndef PIXMAPLOADER_H -#define PIXMAPLOADER_H - -#include <qimage.h> -#include <qbitmap.h> -#include <qiconset.h> -#include <qstringlist.h> - -class Resource -{ -public: - Resource() {} - - static QImage loadImage( const QString &name); - - static QPixmap loadPixmap( const QString &name ); - static QBitmap loadBitmap( const QString &name ); - static QString findPixmap( const QString &name ); - - static QIconSet loadIconSet( const QString &name ); - - static QString findSound( const QString &name ); - static QStringList allSounds(); -}; - -// Inline for compatibility with SHARP ROMs -inline QIconSet Resource::loadIconSet( const QString &pix ) -{ - QImage img = loadImage( pix ); - QPixmap pm; - pm.convertFromImage( img ); - QIconSet is( pm ); - QIconSet::Size size = pm.width() <= 22 ? QIconSet::Small : QIconSet::Large; - - QPixmap dpm = loadPixmap( pix + "_disabled" ); - -#ifndef QT_NO_DEPTH_32 // have alpha-blended pixmaps - if ( dpm.isNull() ) { - QImage dimg( img.width(), img.height(), 32 ); - for ( int y = 0; y < img.height(); y++ ) { - for ( int x = 0; x < img.width(); x++ ) { - QRgb p = img.pixel( x, y ); - uint a = (p & 0xff000000) / 3; - p = (p & 0x00ffffff) | (a & 0xff000000); - dimg.setPixel( x, y, p ); - } - } - - dimg.setAlphaBuffer( TRUE ); - dpm.convertFromImage( dimg ); - } -#endif - - if ( !dpm.isNull() ) - is.setPixmap( dpm, size, QIconSet::Disabled ); - - return is; -} - - -#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 @@ -106,3 +106,3 @@ void SmtpClient::incomingData() qDebug(mailPtr->from); - *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; + *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; status = Recv; @@ -117,3 +117,3 @@ void SmtpClient::incomingData() } - *stream << "RCPT TO: <" << *it << ">\r\n"; + *stream << "RCPT TO: " << *it << "\r\n"; status = MRcv; @@ -126,3 +126,3 @@ void SmtpClient::incomingData() if ( it != mailPtr->to.end() ) { - *stream << "RCPT TO: <" << *it << ">\r\n"; + *stream << "RCPT TO: " << *it << "\r\n"; break; 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 @@ -19,3 +19,3 @@ **********************************************************************/ -#include "resource.h" +#include <qpe/resource.h> #include "viewatt.h" |