-rw-r--r-- | noncore/apps/odict/configdlg.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/odict/dingwidget.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/odict/odict.cpp | 40 |
3 files changed, 18 insertions, 30 deletions
diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp index 89bc6f6..eba7dec 100644 --- a/noncore/apps/odict/configdlg.cpp +++ b/noncore/apps/odict/configdlg.cpp @@ -77,4 +77,5 @@ void ConfigDlg::slotNewMethod() if ( dlg.exec() == QDialog::Accepted ) { + //if ( !dlg.nameLE->text() ) return; //XXX dlg.saveItem(); QListViewItem *item = new QListViewItem( list ); @@ -91,4 +92,5 @@ void ConfigDlg::slotChangeMethod() if ( dlg.exec() == QDialog::Accepted ) { + //if ( !dlg.nameLE->text() ) return; //XXX geht vielleich nicht dlg.saveItem(); QListViewItem *item = list->selectedItem(); diff --git a/noncore/apps/odict/dingwidget.cpp b/noncore/apps/odict/dingwidget.cpp index 5c4b13b..abb5e75 100644 --- a/noncore/apps/odict/dingwidget.cpp +++ b/noncore/apps/odict/dingwidget.cpp @@ -29,5 +29,5 @@ #include <qregexp.h> #include <qtextbrowser.h> -#include <stdlib.h> // for getenv +//#include <stdlib.h> // for getenv DingWidget::DingWidget( ) @@ -41,7 +41,6 @@ void DingWidget::loadDict( QString name ) { dictName = name; - QString opie_dir = getenv("OPIEDIR"); - Config cfg( "odict" ); + if ( !methodname ) return; cfg.setGroup( "Method_" + methodname ); QFile file( cfg.readEntry( "file" ) ); @@ -87,4 +86,5 @@ void DingWidget::setQueryWord( QString qword ) void DingWidget::loadValues() { + if ( !methodname ) return; Config cfg( "odict" ); cfg.setGroup( "Method_" + methodname ); diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index a404e89..cc3148a 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -45,5 +45,4 @@ ODict::ODict() : QMainWindow() setCaption( tr( "OPIE-Dictionary" ) ); setupMenus(); - QHBox *hbox = new QHBox( vbox ); @@ -97,28 +96,15 @@ void ODict::slotStartQuery() { QString querystring = query_le->text(); -//X qDebug("opening dict >%s< for >%s<", activated_name.latin1(),querystring.latin1()); -//X if (querystring.isEmpty()){ -//X qWarning("empty querystring"); -//X return; -//X } -//X if (!activated_name || activated_name.isEmpty()) -//X QMessageBox::warning(this,tr("No Dictionary"),tr("Please choose a dictonary") ); -//X else -//X { - - ding->setCaseSensitive( casesens ); - ding->setCompleteWord( completewords ); - ding->setDict( activated_name ); - - if ( activated_name != ding->loadedDict() ) - ding->loadDict(activated_name); - - BroswerContent test = ding->setText( querystring ); - - browser_top->setText( test.top ); - browser_bottom->setText( test.bottom ); - - qDebug( "Text sollte gesetzt sein..." ); -//X } + ding->setCaseSensitive( casesens ); + ding->setCompleteWord( completewords ); + ding->setDict( activated_name ); + + if ( activated_name != ding->loadedDict() ) + ding->loadDict(activated_name); + + BroswerContent test = ding->setText( querystring ); + + browser_top->setText( test.top ); + browser_bottom->setText( test.bottom ); } @@ -177,8 +163,8 @@ void ODict::setupMenus() settings = new QPopupMenu( menu ); - setting_a = new QAction(tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); + setting_a = new QAction(tr( "Configuration" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); connect( setting_a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); setting_a->addTo( settings ); - setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "today/config" ), QString::null, 0, this, 0 ); + setting_b = new QAction(tr( "Searchmethods" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); parameter = new QPopupMenu( menu ); |