summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2003-01-04 14:08:38 (UTC)
committer cniehaus <cniehaus>2003-01-04 14:08:38 (UTC)
commit851c182383c34fd4925677713bb5f6fd603c86a0 (patch) (side-by-side diff)
tree1f1ed41aa225cff23eb64bd0b1631d3f307975aa
parent69f08fb67ec7e92c4b3c573d6a1ce374aaa97cee (diff)
downloadopie-851c182383c34fd4925677713bb5f6fd603c86a0.zip
opie-851c182383c34fd4925677713bb5f6fd603c86a0.tar.gz
opie-851c182383c34fd4925677713bb5f6fd603c86a0.tar.bz2
one typo ;)
several bugfixes
Diffstat (more/less context) (ignore 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
@@ -90,9 +90,9 @@ void ConfigDlg::slotChangeMethod()
SearchMethodDlg dlg( this, "SearchMethodDlg", true, list->selectedItem()->text( 0 ) );
if ( dlg.exec() == QDialog::Accepted )
{
dlg.saveItem();
- QListViewItem *item = new QListViewItem( list );
+ QListViewItem *item = list->selectedItem();
item->setText( 0 , dlg.nameLE->text() );
}
else qDebug( "SearchMethodDlg abgebrochen" );
}
@@ -101,9 +101,16 @@ void ConfigDlg::slotChangeMethod()
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");
}
void ConfigDlg::loadSearchMethodNames()
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
@@ -68,8 +68,9 @@ void ODict::loadConfig()
regexp = cfg.readEntry( "regexp" ).toInt();
completewords = cfg.readEntry( "completewords" ).toInt();
QStringList groupListCfg = cfg.groupList().grep( "Method_" );
+ query_co->clear();
for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it )
{
cfg.setGroup( *it );
query_co->insertItem( cfg.readEntry( "Name" ) );
@@ -88,17 +89,17 @@ 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" ) );
}
void ODict::slotStartQuery()
{
QString querystring = query_le->text();
qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1());
if (querystring.isEmpty()){
- qWarning("empty querysting");
+ qWarning("empty querystring");
return;
}
if (!activated_name || activated_name.isEmpty())
QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") );
@@ -115,9 +116,12 @@ void ODict::slotSetErrorcount( int count )
void ODict::slotSettings()
{
ConfigDlg dlg( this, "Config" , true);
if ( dlg.exec() == QDialog::Accepted )
+ {
dlg.writeEntries();
+ loadConfig();
+ }
else qDebug( "abgebrochen" );
}
void ODict::slotSetParameter( int count )