summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-02-25 11:27:48 (UTC)
committer mickeyl <mickeyl>2004-02-25 11:27:48 (UTC)
commit25e87d9ccc92b7a4c12518532576f55b11726b26 (patch) (side-by-side diff)
tree39c21854f8b6845736126a05f2cc89e552484881
parent50aef52b265bc8c8e5e5c6a871affe94142d74fb (diff)
downloadopie-25e87d9ccc92b7a4c12518532576f55b11726b26.zip
opie-25e87d9ccc92b7a4c12518532576f55b11726b26.tar.gz
opie-25e87d9ccc92b7a4c12518532576f55b11726b26.tar.bz2
fix most of zecke's comments. Someone should look into the open issues though
(see mail to opie-devel)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/MyPty.cpp7
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp21
-rw-r--r--core/apps/embeddedkonsole/konsole.h6
-rw-r--r--core/apps/embeddedkonsole/session.h2
4 files changed, 17 insertions, 19 deletions
diff --git a/core/apps/embeddedkonsole/MyPty.cpp b/core/apps/embeddedkonsole/MyPty.cpp
index e7d8274..5a8519a 100644
--- a/core/apps/embeddedkonsole/MyPty.cpp
+++ b/core/apps/embeddedkonsole/MyPty.cpp
@@ -80,5 +80,4 @@
#include <sys/wait.h>
-#undef HAVE_OPENPTY
#ifdef HAVE_OPENPTY
#include <pty.h>
@@ -261,10 +260,10 @@ void MyPty::send_bytes(const char* s, int len)
#endif
- ::write(fd, s, len);
+ ::write(fd, s, len);
}
/*! indicates that a block of data is received */
void MyPty::readPty()
-{
+{
char buf[4096];
@@ -278,5 +277,5 @@ void MyPty::readPty()
emit block_in(buf,len);
-
+
#ifdef VERBOSE_DEBUG
// verbose debug
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index b8f009d..1c613a9 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -22,5 +22,4 @@
// enhancements added by L.J. Potter <ljp@llornkcor.com>
// enhancements added by Phillip Kuhn
-//#define QT_QWS_OPIE
#include <stdlib.h>
@@ -370,6 +369,6 @@ void Konsole::init(const char* _pgm, QStrList & _args)
fullscreen = false;
- setCaption( "Konsole" );
- setIcon( Resource::loadPixmap( "qkonsole/qkonsole" ) );
+ setCaption( tr( "Konsole" ) );
+ setIcon( Resource::loadPixmap( "konsole/Terminal" ) );
Config cfg( "Konsole" );
@@ -578,5 +577,5 @@ void Konsole::init(const char* _pgm, QStrList & _args)
sessionList = new QPopupMenu(this);
- sessionList-> insertItem ( Resource::loadPixmap ( "qkonsole/qkonsole" ), tr( "new session" ), this,
+ sessionList-> insertItem ( Resource::loadPixmap ( "konsole/Terminal" ), tr( "new session" ), this,
SLOT(newSession()) );
@@ -880,5 +879,5 @@ void Konsole::changeFontSize(int delta)
}
-int Konsole::findFont(QString name, int size, bool exactMatch)
+int Konsole::findFont(const QString& name, int size, bool exactMatch)
{
for(uint i = 0; i < fonts.count(); i++)
@@ -1160,9 +1159,9 @@ void Konsole::doneSession(TEWidget* te, int )
}
-void Konsole::changeTitle(TEWidget* te, QString newTitle )
+void Konsole::changeTitle(TEWidget* te, const QString& newTitle )
{
if (te == getTe())
{
- setCaption(newTitle + " - QKonsole");
+ setCaption( newTitle + " - " + tr( "Konsole " ) );
}
}
@@ -1201,6 +1200,6 @@ void Konsole::newSession()
te->currentSession = se;
connect( se, SIGNAL(done(TEWidget*,int)), this, SLOT(doneSession(TEWidget*,int)) );
- connect( se, SIGNAL(changeTitle(TEWidget*,QString)), this,
- SLOT(changeTitle(TEWidget*,QString)) );
+ connect( se, SIGNAL(changeTitle(TEWidget*,const QString&)), this,
+ SLOT(changeTitle(TEWidget*,const QString&)) );
connect(te, SIGNAL(changeFontSize(int)), this, SLOT(changeFontSize(int)));
connect(te, SIGNAL(changeSession(int)), this, SLOT(changeSession(int)));
@@ -1310,9 +1309,9 @@ void Konsole::switchSession(QWidget* w)
if (! te->currentSession->Title().isEmpty() )
{
- setCaption(te->currentSession->Title() + " - QKonsole");
+ setCaption( te->currentSession->Title() + " - " + tr( "Konsole" ) );
}
else
{
- setCaption( "Konsole" );
+ setCaption( tr( "Konsole" ) );
}
// colorMenuSelected(te->color_menu_item);
diff --git a/core/apps/embeddedkonsole/konsole.h b/core/apps/embeddedkonsole/konsole.h
index 37babbb..e163cb8 100644
--- a/core/apps/embeddedkonsole/konsole.h
+++ b/core/apps/embeddedkonsole/konsole.h
@@ -74,5 +74,5 @@ private slots:
void setDocument(const QString &);
void doneSession(TEWidget*,int);
- void changeTitle(TEWidget*,QString);
+ void changeTitle(TEWidget*, const QString&);
void changeColumns(int);
void setFont(int);
@@ -111,5 +111,5 @@ private:
void setHistory(bool);
void setColors(QColor foreground, QColor background);
- int findFont(QString name, int size, bool exact = false);
+ int findFont(const QString& name, int size, bool exact = false);
QSize calcSize(int columns, int lines);
TEWidget* getTe();
@@ -125,5 +125,5 @@ private:
{
public:
- VTFont(QString name, QFont& font, QString family, int familyNum, int size)
+ VTFont(const QString& name, QFont& font, const QString& family, int familyNum, int size)
{
this->name = name;
diff --git a/core/apps/embeddedkonsole/session.h b/core/apps/embeddedkonsole/session.h
index f399e96..a4b33e2 100644
--- a/core/apps/embeddedkonsole/session.h
+++ b/core/apps/embeddedkonsole/session.h
@@ -69,5 +69,5 @@ signals:
void done(TEWidget*, int);
- void changeTitle(TEWidget*, QString);
+ void changeTitle(TEWidget*, const QString&);
private: