Diffstat (limited to 'noncore/apps/opie-console/configdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index d09cec3..23e94b1 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp @@ -66,3 +66,8 @@ void ConfigDialog::slotRemove() { void ConfigDialog::slotEdit() { - ProfileEditorDialog dlg(new MetaFactory()); + Profile p; + + // Load profile + // p = currentItem()->profile(); + + ProfileEditorDialog dlg(new MetaFactory(), p); @@ -82,4 +87,2 @@ void ConfigDialog::slotEdit() { void ConfigDialog::slotAdd() { - qWarning("ConfigDialog::slotAdd"); - ProfileEditorDialog dlg(new MetaFactory()); @@ -92,19 +95,9 @@ void ConfigDialog::slotAdd() { { - // defaults - int profile = Profile::VT102; - + // TODO: Move into general profile save part // assignments - QString type = dlg.term_type(); - if(type == "VT102") profile = Profile::VT102; - - // new profile - Profile p(dlg.prof_name(), dlg.prof_type(), Profile::White, Profile::Black, profile); - - // special settings - p.writeEntry("Device", dlg.conn_device()); - p.writeEntry("Baud", dlg.conn_baud()); - p.writeEntry("Parity", dlg.conn_parity()); - p.writeEntry("DataBits", dlg.conn_databits()); - p.writeEntry("StopBits", dlg.conn_stopbits()); - p.writeEntry("Flow", dlg.conn_flow()); + //QString type = dlg.term_type(); + //if(type == "VT102") profile = Profile::VT102; + + // get profile from editor + Profile p = dlg.profile(); |