Diffstat (limited to 'noncore/apps/opie-console/configdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index b23f4d0..882cd3d 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp | |||
@@ -1,14 +1,16 @@ | |||
1 | #include <qlistview.h> | ||
2 | 1 | ||
2 | #include <qpe/qpeapplication.h> | ||
3 | |||
4 | #include <qlistview.h> | ||
3 | 5 | ||
4 | #include "configdialog.h" | 6 | #include "configdialog.h" |
5 | #include "profileeditordialog.h" | 7 | #include "profileeditordialog.h" |
6 | 8 | ||
7 | class ConfigListItem : public QListViewItem { | 9 | class ConfigListItem : public QListViewItem { |
8 | public: | 10 | public: |
9 | ConfigListItem( QListView* item, const Profile& ); | 11 | ConfigListItem( QListView* item, const Profile& ); |
10 | ~ConfigListItem(); | 12 | ~ConfigListItem(); |
11 | Profile profile()const; | 13 | Profile profile()const; |
12 | 14 | ||
13 | private: | 15 | private: |
14 | Profile m_prof; | 16 | Profile m_prof; |
@@ -64,45 +66,43 @@ void ConfigDialog::slotRemove() { | |||
64 | 66 | ||
65 | void ConfigDialog::slotEdit() { | 67 | void ConfigDialog::slotEdit() { |
66 | Profile p; | 68 | Profile p; |
67 | 69 | ||
68 | if(!lstView->currentItem()) return; | 70 | if(!lstView->currentItem()) return; |
69 | 71 | ||
70 | // Load profile | 72 | // Load profile |
71 | p = ((ConfigListItem*)lstView->currentItem())->profile(); | 73 | p = ((ConfigListItem*)lstView->currentItem())->profile(); |
72 | 74 | ||
73 | ProfileEditorDialog dlg(m_fact, p); | 75 | ProfileEditorDialog dlg(m_fact, p); |
74 | 76 | ||
75 | dlg.setCaption(tr("Edit Connection Profile")); | 77 | dlg.setCaption(tr("Edit Connection Profile")); |
76 | dlg.showMaximized(); | 78 | int ret = QPEApplication::execDialog( &dlg ); |
77 | int ret = dlg.exec(); | ||
78 | 79 | ||
79 | if(ret == QDialog::Accepted) | 80 | if(ret == QDialog::Accepted) |
80 | { | 81 | { |
81 | if(lstView->currentItem()) delete lstView->currentItem(); | 82 | if(lstView->currentItem()) delete lstView->currentItem(); |
82 | 83 | ||
83 | // use dlg.terminal()! | 84 | // use dlg.terminal()! |
84 | Profile p = dlg.profile(); | 85 | Profile p = dlg.profile(); |
85 | 86 | ||
86 | new ConfigListItem(lstView, p); | 87 | new ConfigListItem(lstView, p); |
87 | } | 88 | } |
88 | } | 89 | } |
89 | 90 | ||
90 | 91 | ||
91 | void ConfigDialog::slotAdd() { | 92 | void ConfigDialog::slotAdd() { |
92 | ProfileEditorDialog dlg(m_fact); | 93 | ProfileEditorDialog dlg(m_fact); |
93 | 94 | ||
94 | dlg.setCaption(tr("New Connection")); | 95 | dlg.setCaption(tr("New Connection")); |
95 | dlg.showMaximized(); | 96 | int ret = QPEApplication::execDialog( &dlg ); |
96 | int ret = dlg.exec(); | ||
97 | 97 | ||
98 | if(ret == QDialog::Accepted) | 98 | if(ret == QDialog::Accepted) |
99 | { | 99 | { |
100 | // TODO: Move into general profile save part | 100 | // TODO: Move into general profile save part |
101 | // assignments | 101 | // assignments |
102 | //QString type = dlg.term_type(); | 102 | //QString type = dlg.term_type(); |
103 | //if(type == "VT102") profile = Profile::VT102; | 103 | //if(type == "VT102") profile = Profile::VT102; |
104 | 104 | ||
105 | // get profile from editor | 105 | // get profile from editor |
106 | Profile p = dlg.profile(); | 106 | Profile p = dlg.profile(); |
107 | 107 | ||
108 | new ConfigListItem(lstView, p); | 108 | new ConfigListItem(lstView, p); |