summaryrefslogtreecommitdiff
path: root/noncore/apps/confedit
Unidiff
Diffstat (limited to 'noncore/apps/confedit') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/confedit/mainwindow.cpp6
-rw-r--r--noncore/apps/confedit/opie-confedit.control10
2 files changed, 14 insertions, 2 deletions
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp
index 17a5058..fc403d2 100644
--- a/noncore/apps/confedit/mainwindow.cpp
+++ b/noncore/apps/confedit/mainwindow.cpp
@@ -65,24 +65,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
65 65
66 connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ), 66 connect( editor->LineEditGroup, SIGNAL( textChanged(const QString&) ),
67 SLOT( groupChanged(const QString&) ) ); 67 SLOT( groupChanged(const QString&) ) );
68 connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ), 68 connect( editor->LineEditKey, SIGNAL( textChanged(const QString&) ),
69 SLOT( keyChanged(const QString&) ) ); 69 SLOT( keyChanged(const QString&) ) );
70 connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ), 70 connect( editor->LineEditValue, SIGNAL( textChanged(const QString&) ),
71 SLOT( valueChanged(const QString&) ) ); 71 SLOT( valueChanged(const QString&) ) );
72// qDebug("editor->hide()"); 72// qDebug("editor->hide()");
73 // editor->hide(); 73 // editor->hide();
74 qDebug("connect"); 74 qDebug("connect");
75 connect( settingList, SIGNAL( clicked( QListViewItem* ) ), 75 connect( settingList, SIGNAL( clicked( QListViewItem* ) ),
76 this, SLOT( stopTimer( QListViewItem* ) ) ); 76 this, SLOT( stopTimer( QListViewItem* ) ) );
77 setCurrent(0);
77} 78}
78 79
79void MainWindow::makeMenu() 80void MainWindow::makeMenu()
80{ 81{
81 qDebug("MainWindow::makeMenu()"); 82 qDebug("MainWindow::makeMenu()");
82 83
83 popupTimer = new QTimer(this); 84 popupTimer = new QTimer(this);
84 popupMenuFile = new QPopupMenu(this); 85 popupMenuFile = new QPopupMenu(this);
85 popupMenuEntry = new QPopupMenu(this); 86 popupMenuEntry = new QPopupMenu(this);
86 87
87 qDebug("Save"); 88 qDebug("Save");
88 popupActionSave = new QAction( tr("Save"),QString::null, 0, this, 0 ); 89 popupActionSave = new QAction( tr("Save"),QString::null, 0, this, 0 );
@@ -110,36 +111,37 @@ void MainWindow::makeMenu()
110 this, SLOT(showPopup()) ); 111 this, SLOT(showPopup()) );
111 qDebug("connect"); 112 qDebug("connect");
112} 113}
113 114
114MainWindow::~MainWindow() 115MainWindow::~MainWindow()
115{ 116{
116} 117}
117 118
118 119
119 120
120void MainWindow::setCurrent(QListViewItem *item) 121void MainWindow::setCurrent(QListViewItem *item)
121{ 122{
123 editor->hide();
122 if (!item) return; 124 if (!item) return;
123 _item = (ListViewItemConf*) item; 125 _item = (ListViewItemConf*) item;
124 if (!_item) return; 126 if (!_item) return;
125 popupTimer->start( 750, true ); 127 popupTimer->start( 750, true );
126 if (_item->getType() == ListViewItemConf::File) 128 if (_item->getType() == ListViewItemConf::File)
127 { 129 {
128 editor->hide();
129 updateGeometry(); 130 updateGeometry();
130 _currentItem=0; 131 _currentItem=0;
131 _fileItem = (ListViewItemConfFile*)item; 132 _fileItem = (ListViewItemConfFile*)item;
132 return; 133 return;
133 }else editor->show(); 134 }
135 editor->show();
134 _fileItem = 0; 136 _fileItem = 0;
135 _currentItem = (ListViewItemConfigEntry*)item; 137 _currentItem = (ListViewItemConfigEntry*)item;
136 if (!_currentItem) return; 138 if (!_currentItem) return;
137 QString file = _currentItem->getFile(); 139 QString file = _currentItem->getFile();
138 QString group = _currentItem->getGroup(); 140 QString group = _currentItem->getGroup();
139 QString key = _currentItem->getKey(); 141 QString key = _currentItem->getKey();
140 QString val = _currentItem->getValue(); 142 QString val = _currentItem->getValue();
141 editor->TextFileName->setText(file); 143 editor->TextFileName->setText(file);
142 editor->LineEditGroup->setText(group); 144 editor->LineEditGroup->setText(group);
143 if (!key.isEmpty()) 145 if (!key.isEmpty())
144 { 146 {
145 editor->isKey(true); 147 editor->isKey(true);
diff --git a/noncore/apps/confedit/opie-confedit.control b/noncore/apps/confedit/opie-confedit.control
new file mode 100644
index 0000000..a5491f8
--- a/dev/null
+++ b/noncore/apps/confedit/opie-confedit.control
@@ -0,0 +1,10 @@
1Packagename: opie-confeditor
2Files: bin/confedit apps/Settings/confedit.desktop pics/confedit/confedit.png
3Priority: optional
4Section: opie/
5Maintainer: Patrick S. Vogt <tille@handhelds.org>
6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: opie-base ($QPE_VERSION)
9Description: An enditor for the ~/Settings/*.conf files
10