author | cniehaus <cniehaus> | 2003-05-02 13:41:37 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2003-05-02 13:41:37 (UTC) |
commit | b40991b25dd22c55cc80a9a9c4ae0adec103d575 (patch) (side-by-side diff) | |
tree | a5d0ba564cf7809bdb603e0fcefac899f301c16c | |
parent | 6ba2bb2dde0c69ffeba860a9375bab82521e9304 (diff) | |
download | opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.zip opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.tar.gz opie-b40991b25dd22c55cc80a9a9c4ae0adec103d575.tar.bz2 |
bugfix
-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 | 18 |
3 files changed, 7 insertions, 19 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 @@ -75,8 +75,9 @@ void ConfigDlg::slotNewMethod() { SearchMethodDlg dlg( this, "SearchMethodDlg", true ); if ( dlg.exec() == QDialog::Accepted ) { + //if ( !dlg.nameLE->text() ) return; //XXX dlg.saveItem(); QListViewItem *item = new QListViewItem( list ); item->setText( 0 , dlg.nameLE->text() ); } @@ -89,8 +90,9 @@ void ConfigDlg::slotChangeMethod() { SearchMethodDlg dlg( this, "SearchMethodDlg", true, list->selectedItem()->text( 0 ) ); if ( dlg.exec() == QDialog::Accepted ) { + //if ( !dlg.nameLE->text() ) return; //XXX geht vielleich nicht dlg.saveItem(); QListViewItem *item = list->selectedItem(); item->setText( 0 , dlg.nameLE->text() ); } 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 @@ -27,9 +27,9 @@ #include <qtextstream.h> #include <qstringlist.h> #include <qregexp.h> #include <qtextbrowser.h> -#include <stdlib.h> // for getenv +//#include <stdlib.h> // for getenv DingWidget::DingWidget( ) { methodname = QString::null; @@ -39,11 +39,10 @@ DingWidget::DingWidget( ) 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" ) ); if( file.open( IO_ReadOnly ) ) @@ -85,8 +84,9 @@ void DingWidget::setQueryWord( QString qword ) void DingWidget::loadValues() { + if ( !methodname ) return; Config cfg( "odict" ); cfg.setGroup( "Method_" + methodname ); trenner = cfg.readEntry( "Seperator" ); } 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 @@ -44,9 +44,8 @@ ODict::ODict() : QMainWindow() vbox = new QVBox( this ); setCaption( tr( "OPIE-Dictionary" ) ); setupMenus(); - QHBox *hbox = new QHBox( vbox ); QLabel* query_label = new QLabel( tr( "Query:" ) , hbox ); query_label->show(); query_le = new QLineEdit( hbox ); query_co = new QComboBox( hbox ); @@ -95,18 +94,8 @@ void ODict::saveConfig() 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 ); @@ -116,11 +105,8 @@ void ODict::slotStartQuery() BroswerContent test = ding->setText( querystring ); browser_top->setText( test.top ); browser_bottom->setText( test.bottom ); - - qDebug( "Text sollte gesetzt sein..." ); -//X } } void ODict::slotSetErrorcount( int count ) @@ -175,12 +161,12 @@ void ODict::setupMenus() { menu = new QMenuBar( this ); 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 ); connect( parameter, SIGNAL( activated( int ) ), this, SLOT( slotSetParameter( int ) ) ); parameter->insertItem( tr( "C&ase sensitive" ), 0 ,0 ); |