summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console
authorzecke <zecke>2002-10-24 12:13:09 (UTC)
committer zecke <zecke>2002-10-24 12:13:09 (UTC)
commitacf708cee945b8b843b0132672d79f5c4571c22b (patch) (unidiff)
tree96b6bee6e6df3c6a252ff5680275f7080ad93729 /noncore/apps/opie-console
parent41c59e994e023f5c236502538f54d0f3fce8435a (diff)
downloadopie-acf708cee945b8b843b0132672d79f5c4571c22b.zip
opie-acf708cee945b8b843b0132672d79f5c4571c22b.tar.gz
opie-acf708cee945b8b843b0132672d79f5c4571c22b.tar.bz2
Fixed warnings
Now we're down to two warning with number conversions Enable Saving Sessions Enable Copy and Paste
Diffstat (limited to 'noncore/apps/opie-console') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/MyPty.cpp2
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp27
-rw-r--r--noncore/apps/opie-console/TEWidget.h20
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp6
-rw-r--r--noncore/apps/opie-console/emulation_handler.h4
-rw-r--r--noncore/apps/opie-console/file_layer.cpp4
-rw-r--r--noncore/apps/opie-console/io_bt.cpp7
-rw-r--r--noncore/apps/opie-console/io_irda.cpp5
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp49
-rw-r--r--noncore/apps/opie-console/mainwindow.h7
-rw-r--r--noncore/apps/opie-console/opie-console.control2
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp4
-rw-r--r--noncore/apps/opie-console/receive_layer.cpp3
-rw-r--r--noncore/apps/opie-console/session.cpp7
-rw-r--r--noncore/apps/opie-console/session.h7
15 files changed, 123 insertions, 31 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp
index 16bb5ff..984e347 100644
--- a/noncore/apps/opie-console/MyPty.cpp
+++ b/noncore/apps/opie-console/MyPty.cpp
@@ -112,3 +112,2 @@ void MyPty::donePty()
112 // This is code from the Qt DumbTerminal example 112 // This is code from the Qt DumbTerminal example
113 int status = 0;
114 113
@@ -259,2 +258,3 @@ MyPty::MyPty(const Profile& prof) : m_cpid(0)
259 ProcCtl* ctl = ProcCtl::self(); 258 ProcCtl* ctl = ProcCtl::self();
259 Q_UNUSED(ctl);
260} 260}
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index f3f462f..e4415dc 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -97,2 +97,27 @@
97 97
98/* Button XPM */
99namespace {
100static char * menu_xpm[] = {
101"12 12 5 1",
102 " c None",
103 ".c #000000",
104 "+c #FFFDAD",
105 "@c #FFFF00",
106 "#c #E5E100",
107" ",
108" ",
109" ......... ",
110" .+++++++. ",
111" .+@@@@#. ",
112" .+@@@#. ",
113" .+@@#. ",
114" .+@#. ",
115" .+#. ",
116" .+. ",
117" .. ",
118" "};
119
120}
121
122
98/* ------------------------------------------------------------------------- */ 123/* ------------------------------------------------------------------------- */
@@ -1243,3 +1268,3 @@ void TEWidget::dropEvent(QDropEvent* event)
1243 1268
1244void TEWidget::drop_menu_activated(int item) 1269void TEWidget::drop_menu_activated(int)
1245{ 1270{
diff --git a/noncore/apps/opie-console/TEWidget.h b/noncore/apps/opie-console/TEWidget.h
index 1b5300f..f03a16e 100644
--- a/noncore/apps/opie-console/TEWidget.h
+++ b/noncore/apps/opie-console/TEWidget.h
@@ -36,21 +36,3 @@ extern unsigned short vt100_graphics[32];
36 36
37static char * menu_xpm[] = { 37
38"12 12 5 1",
39 " c None",
40 ".c #000000",
41 "+c #FFFDAD",
42 "@c #FFFF00",
43 "#c #E5E100",
44" ",
45" ",
46" ......... ",
47" .+++++++. ",
48" .+@@@@#. ",
49" .+@@@#. ",
50" .+@@#. ",
51" .+@#. ",
52" .+#. ",
53" .+. ",
54" .. ",
55" "};
56 38
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index bdc8b43..bb3dd28 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -194 +194,7 @@ void EmulationHandler::runScript(const Script *script) {
194 194
195void EmulationHandler::copy() {
196 m_teWid->emitSelection();
197}
198void EmulationHandler::paste() {
199 m_teWid->pasteClipboard();
200}
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 7ca2cf3..12abbc5 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -51,3 +51,3 @@ public:
51 QPushButton* cornerButton(); 51 QPushButton* cornerButton();
52 52
53 /* Scripts */ 53 /* Scripts */
@@ -75,2 +75,4 @@ public slots:
75 void recv( const QByteArray& ); 75 void recv( const QByteArray& );
76 void paste();
77 void copy();
76 78
diff --git a/noncore/apps/opie-console/file_layer.cpp b/noncore/apps/opie-console/file_layer.cpp
index 43e9c8f..0c83700 100644
--- a/noncore/apps/opie-console/file_layer.cpp
+++ b/noncore/apps/opie-console/file_layer.cpp
@@ -13,3 +13,3 @@ FileTransferLayer::~FileTransferLayer() {
13 13
14void FileTransferLayer::sendFile(const QFile& file) { 14void FileTransferLayer::sendFile(const QFile&) {
15 15
@@ -17,3 +17,3 @@ void FileTransferLayer::sendFile(const QFile& file) {
17 17
18void FileTransferLayer::sendFile(const QString& file) { 18void FileTransferLayer::sendFile(const QString&) {
19} 19}
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 4486eea..8dd8151 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -26,2 +26,3 @@ void IOBt::close() {
26bool IOBt::open() { 26bool IOBt::open() {
27 bool ret = false;
27 28
@@ -41,3 +42,3 @@ bool IOBt::open() {
41 if ( m_attach->start() ) { 42 if ( m_attach->start() ) {
42 IOSerial::open(); 43 ret = IOSerial::open();
43 } else { 44 } else {
@@ -51,4 +52,5 @@ bool IOBt::open() {
51 52
52 IOSerial::open(); 53 ret =IOSerial::open();
53 } 54 }
55 return ret;
54} 56}
@@ -76,2 +78,3 @@ void IOBt::slotExited( OProcess* proc ){
76 close(); 78 close();
79 delete proc;
77} 80}
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index 56a373c..b3b693f 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -23,2 +23,3 @@ void IOIrda::close() {
23bool IOIrda::open() { 23bool IOIrda::open() {
24 bool ret;
24 25
@@ -32,3 +33,3 @@ bool IOIrda::open() {
32 if ( m_attach->start() ) { 33 if ( m_attach->start() ) {
33 IOSerial::open(); 34 ret= IOSerial::open();
34 } else { 35 } else {
@@ -39,2 +40,3 @@ bool IOIrda::open() {
39 } 40 }
41 return ret;
40} 42}
@@ -61,2 +63,3 @@ void IOIrda::slotExited(OProcess* proc ){
61 close(); 63 close();
64 delete proc;
62} 65}
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index e2f4d12..02a3fa9 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -91,2 +91,12 @@ void MainWindow::initUI() {
91 91
92 m_console->insertSeparator();
93 /* save icon is not available */
94 a = new QAction(tr("Save Connection"),
95 Resource::loadPixmap("save"), QString::null,
96 0, this, 0 );
97 a->addTo( m_console );
98 connect(a, SIGNAL(activated() ),
99 this, SLOT(slotSaveSession() ) );
100 m_console->insertSeparator();
101
92 /* 102 /*
@@ -178,3 +188,3 @@ void MainWindow::initUI() {
178 * action that open/closes the keyboard 188 * action that open/closes the keyboard
179 189
180 m_openButtons = new QAction ( tr( "Open Buttons..." ), 190 m_openButtons = new QAction ( tr( "Open Buttons..." ),
@@ -224,2 +234,16 @@ void MainWindow::initUI() {
224 */ 234 */
235 /* now add the copy and paste actions */
236 a = new QAction(tr("Copy"),
237 Resource::loadPixmap("copy"), QString::null,
238 0, this, 0 );
239 //a->addTo( m_icons );
240 connect( a, SIGNAL(activated() ),
241 this, SLOT(slotCopy() ) );
242
243 a = new QAction(tr("Paste"),
244 Resource::loadPixmap("paste"), QString::null,
245 0, this, 0 );
246 a->addTo( m_icons );
247 connect( a, SIGNAL(activated() ),
248 this, SLOT(slotPaste() ) );
225 249
@@ -541 +565,24 @@ void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
541} 565}
566void MainWindow::slotCopy() {
567 if (!currentSession() ) return;
568 currentSession()->emulationHandler()->copy();
569}
570void MainWindow::slotPaste() {
571 if (!currentSession() ) return;
572 currentSession()->emulationHandler()->paste();
573}
574
575/*
576 * Save the session
577 */
578
579void MainWindow::slotSaveSession() {
580 if (!currentSession() ) {
581 QMessageBox::information(this, tr("Save Connection"),
582 tr("<qt>There is no Connection.</qt>"), 1 );
583 return;
584 }
585 manager()->add( currentSession()->profile() );
586 manager()->save();
587 populateProfiles();
588}
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index 0f52e76..16b6252 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -72,2 +72,9 @@ private slots:
72 72
73 /* what could these both slot do? */
74 void slotCopy();
75 void slotPaste();
76
77 /* save the currentSession() to Profiles */
78 void slotSaveSession();
79
73private: 80private:
diff --git a/noncore/apps/opie-console/opie-console.control b/noncore/apps/opie-console/opie-console.control
index d41ef58..8541d22 100644
--- a/noncore/apps/opie-console/opie-console.control
+++ b/noncore/apps/opie-console/opie-console.control
@@ -1,2 +1,2 @@
1Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/* etc/keytabs/default.Keytab 1Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/* etc/keytabs/default.Keytab bin/sz bin/rz
2Priority: optional 2Priority: optional
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index 5d39d96..cad2567 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -95,2 +95,3 @@ Session* ProfileManager::fromProfile( const Profile& prof, QWidget* parent) {
95 session->connect(); 95 session->connect();
96 session->setProfile( prof );
96 97
@@ -123,2 +124,5 @@ void ProfileManager::save( ) {
123} 124}
125void ProfileManager::add( const Profile& prof) {
126 m_list.append( prof );
127}
124void ProfileManager::setProfiles( const Profile::ValueList& list ) { 128void ProfileManager::setProfiles( const Profile::ValueList& list ) {
diff --git a/noncore/apps/opie-console/receive_layer.cpp b/noncore/apps/opie-console/receive_layer.cpp
index 05e2c67..bbde339 100644
--- a/noncore/apps/opie-console/receive_layer.cpp
+++ b/noncore/apps/opie-console/receive_layer.cpp
@@ -2,2 +2,3 @@
2 2
3#include <qdir.h>
3#include <qstring.h> 4#include <qstring.h>
@@ -21,3 +22,3 @@ QString ReceiveLayer::currentDir()const{
21 if (m_curDir.isEmpty() ) 22 if (m_curDir.isEmpty() )
22 return QString::fromLocal8Bit( ::getwd(NULL) ); 23 return QDir::currentDirPath();
23 return m_curDir; 24 return m_curDir;
diff --git a/noncore/apps/opie-console/session.cpp b/noncore/apps/opie-console/session.cpp
index 03d0fcd..c166d95 100644
--- a/noncore/apps/opie-console/session.cpp
+++ b/noncore/apps/opie-console/session.cpp
@@ -2,2 +2,3 @@
2 2
3#include "profile.h"
3#include "io_layer.h" 4#include "io_layer.h"
@@ -44,2 +45,5 @@ QWidget* Session::widget() {
44} 45}
46Profile Session::profile()const {
47 return m_prof;
48}
45/* 49/*
@@ -93,2 +97,5 @@ void Session::setEmulationHandler( EmulationHandler* lay ) {
93} 97}
98void Session::setProfile( const Profile& prof ) {
99 m_prof = prof;
100}
94/* 101/*
diff --git a/noncore/apps/opie-console/session.h b/noncore/apps/opie-console/session.h
index 83b2046..f60a6c0 100644
--- a/noncore/apps/opie-console/session.h
+++ b/noncore/apps/opie-console/session.h
@@ -5,2 +5,4 @@
5 5
6#include "profile.h"
7
6class IOLayer; 8class IOLayer;
@@ -44,2 +46,3 @@ public:
44 EmulationHandler* emulationHandler(); 46 EmulationHandler* emulationHandler();
47 Profile profile()const;
45 48
@@ -61,2 +64,3 @@ public:
61 void setName( const QString& ); 64 void setName( const QString& );
65 void setProfile( const Profile& );
62 66
@@ -67,3 +71,4 @@ private:
67 EmulationHandler* m_emu; 71 EmulationHandler* m_emu;
68 bool m_connected; 72 bool m_connected : 1;
73 Profile m_prof;
69 74