-rw-r--r-- | noncore/apps/odict/dingwidget.cpp | 4 | ||||
-rw-r--r-- | noncore/apps/odict/searchmethoddlg.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp index ac7c321..5939000 100644 --- a/noncore/apps/odict/dingwidget.cpp +++ b/noncore/apps/odict/dingwidget.cpp | |||
@@ -28,10 +28,12 @@ | |||
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | #include <qregexp.h> | 29 | #include <qregexp.h> |
30 | #include <qtextbrowser.h> | 30 | #include <qtextbrowser.h> |
31 | #include <stdlib.h> // for getenv | ||
31 | 32 | ||
32 | DingWidget::DingWidget(QWidget *parent, QString word, QTextBrowser *browser_top, QTextBrowser *browser_bottom) : QWidget(parent) | 33 | DingWidget::DingWidget(QWidget *parent, QString word, QTextBrowser *browser_top, QTextBrowser *browser_bottom) : QWidget(parent) |
33 | { | 34 | { |
34 | QFile file( "/home/carsten/opie/opie/noncore/apps/odict/eng_ita.dic" ); | 35 | QString opie_dir = getenv("OPIEDIR"); |
36 | QFile file( opie_dir+"/noncore/apps/odict/eng_ita.dic" ); | ||
35 | QStringList lines; | 37 | QStringList lines; |
36 | 38 | ||
37 | if( file.open( IO_ReadOnly ) ) | 39 | if( file.open( IO_ReadOnly ) ) |
diff --git a/noncore/apps/odict/searchmethoddlg.cpp b/noncore/apps/odict/searchmethoddlg.cpp index 203c663..8a14703 100644 --- a/noncore/apps/odict/searchmethoddlg.cpp +++ b/noncore/apps/odict/searchmethoddlg.cpp | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qdir.h> | ||
29 | 30 | ||
30 | #include <opie/ofileselector.h> | 31 | #include <opie/ofileselector.h> |
31 | #include <opie/ofiledialog.h> | 32 | #include <opie/ofiledialog.h> |
@@ -90,7 +91,7 @@ void SearchMethodDlg::setupEntries( QString item ) | |||
90 | 91 | ||
91 | void SearchMethodDlg::slotBrowse() | 92 | void SearchMethodDlg::slotBrowse() |
92 | { | 93 | { |
93 | itemName=OFileDialog::getOpenFileName( OFileSelector::EXTENDED,"/home/carsten" ); | 94 | itemName=OFileDialog::getOpenFileName( OFileSelector::EXTENDED,QDir::homeDirPath()); |
94 | dictFileLE->setText( itemName ); | 95 | dictFileLE->setText( itemName ); |
95 | } | 96 | } |
96 | 97 | ||