summaryrefslogtreecommitdiff
authortille <tille>2003-01-03 19:55:12 (UTC)
committer tille <tille>2003-01-03 19:55:12 (UTC)
commitb261b5539e99e32b0f3e8b03c3ccba22c3b765e3 (patch) (side-by-side diff)
tree8a22b19a75712a599237e5c26296c44c1edfe957
parentd9818c21de144d42e5626bf8b9545bc592ce8ea1 (diff)
downloadopie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.zip
opie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.tar.gz
opie-b261b5539e99e32b0f3e8b03c3ccba22c3b765e3.tar.bz2
path fix ;)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/dingwidget.cpp4
-rw-r--r--noncore/apps/odict/searchmethoddlg.cpp3
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
@@ -23,20 +23,22 @@
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qmainwindow.h>
#include <qstring.h>
#include <qtextstream.h>
#include <qstringlist.h>
#include <qregexp.h>
#include <qtextbrowser.h>
+#include <stdlib.h> // for getenv
DingWidget::DingWidget(QWidget *parent, QString word, QTextBrowser *browser_top, QTextBrowser *browser_bottom) : QWidget(parent)
{
- QFile file( "/home/carsten/opie/opie/noncore/apps/odict/eng_ita.dic" );
+ QString opie_dir = getenv("OPIEDIR");
+ QFile file( opie_dir+"/noncore/apps/odict/eng_ita.dic" );
QStringList lines;
if( file.open( IO_ReadOnly ) )
{
QTextStream stream( &file );
while ( !stream.eof() )
{
lines.append( stream.readLine() );
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
@@ -21,16 +21,17 @@
#include <qlayout.h>
#include <qhbox.h>
#include <qvbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qlineedit.h>
+#include <qdir.h>
#include <opie/ofileselector.h>
#include <opie/ofiledialog.h>
SearchMethodDlg::SearchMethodDlg(QWidget *parent, const char *name, bool modal, QString itemname) : QDialog(parent, name, modal)
{
QVBoxLayout *vbox_layout = new QVBoxLayout( this, 4,4,"vbox_layout" );
@@ -85,17 +86,17 @@ void SearchMethodDlg::setupEntries( QString item )
lang1->setText( cfg.readEntry( "Lang1" ) );
lang2->setText( cfg.readEntry( "Lang2" ) );
nameLE->setText( itemName );
dictFileLE->setText( cfg.readEntry( "file" ) );
}
void SearchMethodDlg::slotBrowse()
{
- itemName=OFileDialog::getOpenFileName( OFileSelector::EXTENDED,"/home/carsten" );
+ itemName=OFileDialog::getOpenFileName( OFileSelector::EXTENDED,QDir::homeDirPath());
dictFileLE->setText( itemName );
}
void SearchMethodDlg::saveItem()
{
QString name = nameLE->text();
Config cfg( "odict" );
cfg.setGroup( "Method_"+name );