-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.pro | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 4 |
4 files changed, 19 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index 23e94b1..655d649 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp @@ -67,6 +67,8 @@ void ConfigDialog::slotEdit() { Profile p; + if(!lstView->currentItem()) return; + // Load profile - // p = currentItem()->profile(); + p = ((ConfigListItem*)lstView->currentItem())->profile(); ProfileEditorDialog dlg(new MetaFactory(), p); diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro index 6d70dfd..768e453 100644 --- a/noncore/apps/opie-console/opie-console.pro +++ b/noncore/apps/opie-console/opie-console.pro @@ -23,5 +23,6 @@ HEADERS = io_layer.h io_serial.h \ screen.h \ keytrans.h \ - widget_layer.h + widget_layer.h \ + transferdialog.h SOURCES = io_layer.cpp io_serial.cpp \ @@ -44,5 +45,6 @@ SOURCES = io_layer.cpp io_serial.cpp \ screen.cpp \ keytrans.cpp \ - widget_layer.cpp + widget_layer.cpp \ + transferdialog.cpp INTERFACES = configurebase.ui editbase.ui diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index fbe0f23..fc95e56 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp @@ -30,5 +30,5 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) { // Default profile - m_prof = Profile("serial", QString::null, Profile::Black, Profile::White, Profile::VT102); + m_prof = Profile(QString::null, "serial", Profile::Black, Profile::White, Profile::VT102); initUI(); @@ -195,6 +195,11 @@ void ProfileEditorDialog::initUI() setCancelButton(QObject::tr("Cancel")); - connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); + // load profile values + + name_line->setText(m_prof.name()); + + // signals + connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); } @@ -232,4 +237,7 @@ void ProfileEditorDialog::accept() if(plugin_plugin) plugin_plugin->save(); + // Save general values + m_prof.setName(prof_name()); + QDialog::accept(); } diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index 3cdd6aa..07ec12a 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h @@ -44,5 +44,5 @@ public: * sets the image */ - virtual void setImage( const Character* const newimg, int lines, int colums ); + virtual void setImage( const Character* const newimg, int lines, int colums ) = 0; /** @@ -144,5 +144,5 @@ protected: * */ - virtual void calcGeometry(); + virtual void calcGeometry() = 0; /** |