author | josef <josef> | 2002-10-07 10:02:58 (UTC) |
---|---|---|
committer | josef <josef> | 2002-10-07 10:02:58 (UTC) |
commit | 46171dcd991e8c3bfff8e662b3913f454714560a (patch) (unidiff) | |
tree | c596e53f6b308ffef0f2da1ccf538c79693bd5e5 | |
parent | d4c3a54affe5497b84e48f52d411391818790cba (diff) | |
download | opie-46171dcd991e8c3bfff8e662b3913f454714560a.zip opie-46171dcd991e8c3bfff8e662b3913f454714560a.tar.gz opie-46171dcd991e8c3bfff8e662b3913f454714560a.tar.bz2 |
- load profiles correctly when editing them
- save their general values after editing them
- fix compilation of widget_layer (temporary workaround?)
-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 | |||
@@ -65,10 +65,12 @@ void ConfigDialog::slotRemove() { | |||
65 | 65 | ||
66 | void ConfigDialog::slotEdit() { | 66 | void ConfigDialog::slotEdit() { |
67 | Profile p; | 67 | Profile p; |
68 | 68 | ||
69 | if(!lstView->currentItem()) return; | ||
70 | |||
69 | // Load profile | 71 | // Load profile |
70 | // p = currentItem()->profile(); | 72 | p = ((ConfigListItem*)lstView->currentItem())->profile(); |
71 | 73 | ||
72 | ProfileEditorDialog dlg(new MetaFactory(), p); | 74 | ProfileEditorDialog dlg(new MetaFactory(), p); |
73 | 75 | ||
74 | dlg.setCaption("Edit Connection Profile"); | 76 | dlg.setCaption("Edit Connection Profile"); |
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 | |||
@@ -21,9 +21,10 @@ HEADERS = io_layer.h io_serial.h \ | |||
21 | common.h \ | 21 | common.h \ |
22 | history.h \ | 22 | history.h \ |
23 | screen.h \ | 23 | screen.h \ |
24 | keytrans.h \ | 24 | keytrans.h \ |
25 | widget_layer.h | 25 | widget_layer.h \ |
26 | transferdialog.h | ||
26 | 27 | ||
27 | SOURCES = io_layer.cpp io_serial.cpp \ | 28 | SOURCES = io_layer.cpp io_serial.cpp \ |
28 | file_layer.cpp sz_transfer.cpp \ | 29 | file_layer.cpp sz_transfer.cpp \ |
29 | main.cpp \ | 30 | main.cpp \ |
@@ -42,9 +43,10 @@ SOURCES = io_layer.cpp io_serial.cpp \ | |||
42 | vt102emulation.cpp \ | 43 | vt102emulation.cpp \ |
43 | history.cpp \ | 44 | history.cpp \ |
44 | screen.cpp \ | 45 | screen.cpp \ |
45 | keytrans.cpp \ | 46 | keytrans.cpp \ |
46 | widget_layer.cpp | 47 | widget_layer.cpp \ |
48 | transferdialog.cpp | ||
47 | 49 | ||
48 | INTERFACES = configurebase.ui editbase.ui | 50 | INTERFACES = configurebase.ui editbase.ui |
49 | INCLUDEPATH += $(OPIEDIR)/include | 51 | INCLUDEPATH += $(OPIEDIR)/include |
50 | DEPENDPATH += $(OPIEDIR)/include | 52 | DEPENDPATH += $(OPIEDIR)/include |
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 | |||
@@ -28,9 +28,9 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, | |||
28 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) | 28 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) |
29 | : QTabDialog(0, 0, TRUE), m_fact( fact ) | 29 | : QTabDialog(0, 0, TRUE), m_fact( fact ) |
30 | { | 30 | { |
31 | // Default profile | 31 | // Default profile |
32 | m_prof = Profile("serial", QString::null, Profile::Black, Profile::White, Profile::VT102); | 32 | m_prof = Profile(QString::null, "serial", Profile::Black, Profile::White, Profile::VT102); |
33 | 33 | ||
34 | initUI(); | 34 | initUI(); |
35 | 35 | ||
36 | // Apply current profile | 36 | // Apply current profile |
@@ -193,10 +193,15 @@ void ProfileEditorDialog::initUI() | |||
193 | 193 | ||
194 | setOkButton(QObject::tr("OK")); | 194 | setOkButton(QObject::tr("OK")); |
195 | setCancelButton(QObject::tr("Cancel")); | 195 | setCancelButton(QObject::tr("Cancel")); |
196 | 196 | ||
197 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); | 197 | // load profile values |
198 | |||
199 | name_line->setText(m_prof.name()); | ||
200 | |||
201 | // signals | ||
198 | 202 | ||
203 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); | ||
199 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); | 204 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); |
200 | } | 205 | } |
201 | 206 | ||
202 | ProfileEditorDialog::~ProfileEditorDialog() { | 207 | ProfileEditorDialog::~ProfileEditorDialog() { |
@@ -230,8 +235,11 @@ void ProfileEditorDialog::accept() | |||
230 | 235 | ||
231 | // Save profile and plugin profile | 236 | // Save profile and plugin profile |
232 | if(plugin_plugin) plugin_plugin->save(); | 237 | if(plugin_plugin) plugin_plugin->save(); |
233 | 238 | ||
239 | // Save general values | ||
240 | m_prof.setName(prof_name()); | ||
241 | |||
234 | QDialog::accept(); | 242 | QDialog::accept(); |
235 | } | 243 | } |
236 | 244 | ||
237 | void ProfileEditorDialog::slotCancel() | 245 | void ProfileEditorDialog::slotCancel() |
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 | |||
@@ -42,9 +42,9 @@ public: | |||
42 | public: | 42 | public: |
43 | /** | 43 | /** |
44 | * sets the image | 44 | * sets the image |
45 | */ | 45 | */ |
46 | virtual void setImage( const Character* const newimg, int lines, int colums ); | 46 | virtual void setImage( const Character* const newimg, int lines, int colums ) = 0; |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * annoy the user | 49 | * annoy the user |
50 | */ | 50 | */ |
@@ -142,9 +142,9 @@ protected: | |||
142 | 142 | ||
143 | /** | 143 | /** |
144 | * | 144 | * |
145 | */ | 145 | */ |
146 | virtual void calcGeometry(); | 146 | virtual void calcGeometry() = 0; |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * makes an empty image | 149 | * makes an empty image |
150 | */ | 150 | */ |