author | tille <tille> | 2003-01-03 19:55:12 (UTC) |
---|---|---|
committer | tille <tille> | 2003-01-03 19:55:12 (UTC) |
commit | b261b5539e99e32b0f3e8b03c3ccba22c3b765e3 (patch) (unidiff) | |
tree | 8a22b19a75712a599237e5c26296c44c1edfe957 /noncore | |
parent | d9818c21de144d42e5626bf8b9545bc592ce8ea1 (diff) | |
download | opie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.zip opie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.tar.gz opie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.tar.bz2 |
path fix ;)
-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 | |||
@@ -25,16 +25,18 @@ | |||
25 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qtextstream.h> | 27 | #include <qtextstream.h> |
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 ) ) |
38 | { | 40 | { |
39 | QTextStream stream( &file ); | 41 | QTextStream stream( &file ); |
40 | while ( !stream.eof() ) | 42 | while ( !stream.eof() ) |
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 | |||
@@ -23,12 +23,13 @@ | |||
23 | #include <qhbox.h> | 23 | #include <qhbox.h> |
24 | #include <qvbox.h> | 24 | #include <qvbox.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
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> |
32 | 33 | ||
33 | SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal) | 34 | SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal) |
34 | { | 35 | { |
@@ -87,13 +88,13 @@ void SearchMethodDlg::setupEntries( QString item ) | |||
87 | nameLE->setText( itemName ); | 88 | nameLE->setText( itemName ); |
88 | dictFileLE->setText( cfg.readEntry( "file" ) ); | 89 | dictFileLE->setText( cfg.readEntry( "file" ) ); |
89 | } | 90 | } |
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 | ||
97 | void SearchMethodDlg::saveItem() | 98 | void SearchMethodDlg::saveItem() |
98 | { | 99 | { |
99 | QString name = nameLE->text(); | 100 | QString name = nameLE->text(); |