summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp9
-rw-r--r--noncore/apps/odict/odict.cpp8
2 files changed, 14 insertions, 3 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 33296e3..89bc6f6 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -92,5 +92,5 @@ void ConfigDlg::slotChangeMethod()
{
dlg.saveItem();
- QListViewItem *item = new QListViewItem( list );
+ QListViewItem *item = list->selectedItem();
item->setText( 0 , dlg.nameLE->text() );
}
@@ -103,5 +103,12 @@ void ConfigDlg::slotDeleteMethod()
{
if ( list->selectedItem() )
+ {
+ Config cfg ( "odict" );
+ cfg.setGroup( "Method_"+list->selectedItem()->text(0) );
+ cfg.clearGroup();
+ //FIXME: this only removes the entries but not the group itself
+
list->takeItem( list->selectedItem() );
+ }
else qDebug("no item selected");
}
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp
index 1fbdb85..e0104eb 100644
--- a/noncore/apps/odict/odict.cpp
+++ b/noncore/apps/odict/odict.cpp
@@ -70,4 +70,5 @@ void ODict::loadConfig()
QStringList groupListCfg = cfg.groupList().grep( "Method_" );
+ query_co->clear();
for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it )
{
@@ -90,5 +91,5 @@ void ODict::saveConfig()
void ODict::slotDisplayAbout()
{
- QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030103" ) );
+ QMessageBox::about( this, tr( "About ODict" ), tr( "OPIE-Dictionary ODict \n (c) 2002, 2003 Carsten Niehaus \n cniehaus@handhelds.org \n Version 20030104" ) );
}
@@ -98,5 +99,5 @@ void ODict::slotStartQuery()
qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1());
if (querystring.isEmpty()){
- qWarning("empty querysting");
+ qWarning("empty querystring");
return;
}
@@ -117,5 +118,8 @@ void ODict::slotSettings()
ConfigDlg dlg( this, "Config" , true);
if ( dlg.exec() == QDialog::Accepted )
+ {
dlg.writeEntries();
+ loadConfig();
+ }
else qDebug( "abgebrochen" );
}