-rw-r--r-- | noncore/apps/odict/searchmethoddlg.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/noncore/apps/odict/searchmethoddlg.cpp b/noncore/apps/odict/searchmethoddlg.cpp index 0572f11..fcbdb8a 100644 --- a/noncore/apps/odict/searchmethoddlg.cpp +++ b/noncore/apps/odict/searchmethoddlg.cpp | |||
@@ -32,14 +32,6 @@ | |||
32 | 32 | ||
33 | SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal) | 33 | SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal) |
34 | { | 34 | { |
35 | if( !itemname ) | ||
36 | setCaption( tr( "New Searchmethod" ) ); | ||
37 | else | ||
38 | { | ||
39 | setCaption( tr( "Change Searchmethod" ) ); | ||
40 | itemName = itemname; | ||
41 | setupEntries(itemname); | ||
42 | } | ||
43 | 35 | ||
44 | QVBoxLayout *vbox_layout = new QVBoxLayout( this, 4,4,"vbox_layout" ); | 36 | QVBoxLayout *vbox_layout = new QVBoxLayout( this, 4,4,"vbox_layout" ); |
45 | QVBox *vbox = new QVBox( this ); | 37 | QVBox *vbox = new QVBox( this ); |
@@ -74,18 +66,26 @@ SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, | |||
74 | vbox_layout->addWidget( vbox ); | 66 | vbox_layout->addWidget( vbox ); |
75 | 67 | ||
76 | showMaximized(); | 68 | showMaximized(); |
69 | |||
70 | if( !itemname ) | ||
71 | setCaption( tr( "New Searchmethod" ) ); | ||
72 | else | ||
73 | { | ||
74 | setCaption( tr( "Change Searchmethod" ) ); | ||
75 | itemName = itemname; | ||
76 | setupEntries(itemname); | ||
77 | } | ||
77 | } | 78 | } |
78 | 79 | ||
79 | void SearchMethodDlg::setupEntries( QString item ) | 80 | void SearchMethodDlg::setupEntries( QString item ) |
80 | { | 81 | { |
81 | Config cfg( "odict" ); | 82 | Config cfg( "odict" ); |
82 | cfg.setGroup( itemName ); | 83 | cfg.setGroup( itemName ); |
83 | trenner->setText( "foooof" ); | 84 | trenner->setText( cfg.readEntry( "Seperator" ) ); |
84 | //X trenner->setText( cfg.readEntry( "Seperator" ) ); | 85 | lang1->setText( cfg.readEntry( "Lang1" ) ); |
85 | //X lang1->setText( cfg.readEntry( "Lang1" ) ); | 86 | lang2->setText( cfg.readEntry( "Lang2" ) ); |
86 | //X lang2->setText( cfg.readEntry( "Lang2" ) ); | 87 | nameLE->setText( itemName ); |
87 | //X nameLE->setText( itemName ); | 88 | dictFileLE->setText( cfg.readEntry( "file" ) ); |
88 | //X dictFileLE->setText( cfg.readEntry( "file" ) ); | ||
89 | } | 89 | } |
90 | 90 | ||
91 | void SearchMethodDlg::slotBrowse() | 91 | void SearchMethodDlg::slotBrowse() |