summaryrefslogtreecommitdiff
path: root/noncore/apps/odict
Side-by-side diff
Diffstat (limited to 'noncore/apps/odict') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp9
-rw-r--r--noncore/apps/odict/configdlg.h2
-rw-r--r--noncore/apps/odict/searchmethoddlg.cpp4
3 files changed, 13 insertions, 2 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp
index 2056457..0f33ee8 100644
--- a/noncore/apps/odict/configdlg.cpp
+++ b/noncore/apps/odict/configdlg.cpp
@@ -42,6 +42,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, bool modal) : QDialog(pa
/*searchmethods*/
search_tab = new QWidget( tab , "search_tab" );
+ loadSearchMethodNames();
QVBoxLayout *vbox_layout_searchtab = new QVBoxLayout( search_tab, 4 , 4 ,"blah" );
QHBox *hbox = new QHBox( search_tab );
@@ -103,3 +104,11 @@ void ConfigDlg::slotDeleteMethod()
list->takeItem( list->selectedItem() );
else qDebug("no item selected");
}
+
+void ConfigDlg::loadSearchMethodNames()
+{
+ QListViewItem *item = new QListViewItem( list);
+ Config cfg( "odict" );
+//X cfg.setGroup( itemName );
+//X QString temp = cfg.readEntry( "Seperator" );
+}
diff --git a/noncore/apps/odict/configdlg.h b/noncore/apps/odict/configdlg.h
index e59b875..2b7d0a1 100644
--- a/noncore/apps/odict/configdlg.h
+++ b/noncore/apps/odict/configdlg.h
@@ -30,6 +30,8 @@ class ConfigDlg : public QDialog
QListView *list;
QPushButton *new_button, *change_button, *delete_button;
+ void loadSearchMethodNames();
+
private slots:
void slotNewMethod();
void slotChangeMethod();
diff --git a/noncore/apps/odict/searchmethoddlg.cpp b/noncore/apps/odict/searchmethoddlg.cpp
index fcbdb8a..203c663 100644
--- a/noncore/apps/odict/searchmethoddlg.cpp
+++ b/noncore/apps/odict/searchmethoddlg.cpp
@@ -80,7 +80,7 @@ SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal,
void SearchMethodDlg::setupEntries( QString item )
{
Config cfg( "odict" );
- cfg.setGroup( itemName );
+ cfg.setGroup( "Method_"+itemName );
trenner->setText( cfg.readEntry( "Seperator" ) );
lang1->setText( cfg.readEntry( "Lang1" ) );
lang2->setText( cfg.readEntry( "Lang2" ) );
@@ -98,7 +98,7 @@ void SearchMethodDlg::saveItem()
{
QString name = nameLE->text();
Config cfg( "odict" );
- cfg.setGroup( name );
+ cfg.setGroup( "Method_"+name );
cfg.writeEntry( "Name", name );
cfg.writeEntry( "Seperator", trenner->text() );
cfg.writeEntry( "Lang1", lang1->text() );