-rw-r--r-- | noncore/apps/odict/odict.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/noncore/apps/odict/odict.cpp b/noncore/apps/odict/odict.cpp index 2028701..010545e 100644 --- a/noncore/apps/odict/odict.cpp +++ b/noncore/apps/odict/odict.cpp @@ -32,25 +32,25 @@ #include <qaction.h> #include <qtextbrowser.h> #include <qcombobox.h> #include <qpe/resource.h> #include <qpe/config.h> ODict::ODict() : QMainWindow() { activated_name = QString::null; vbox = new QVBox( this ); - setCaption( tr( "OPIE-Dictionary" ) ); + 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 ); connect( query_co , SIGNAL( activated(const QString&) ), this, SLOT( slotMethodChanged(const QString&) ) ); ok_button = new QPushButton( tr( "&Ok" ), hbox ); connect( ok_button, SIGNAL( released() ), this, SLOT( slotStartQuery() ) ); top_name = new QLabel( vbox ); @@ -67,25 +67,24 @@ ODict::ODict() : QMainWindow() } void ODict::loadConfig() { /* * the name of the last used dictionary */ QString lastname; Config cfg ( "odict" ); cfg.setGroup( "generalsettings" ); casesens = cfg.readEntry( "casesens" ).toInt(); - regexp = cfg.readEntry( "regexp" ).toInt(); QString lastDict = cfg.readEntry( "lastdict" ); int i = 0, e = 0; QStringList groupListCfg = cfg.groupList().grep( "Method_" ); query_co->clear(); for ( QStringList::Iterator it = groupListCfg.begin() ; it != groupListCfg.end() ; ++it ) { QString name; cfg.setGroup( *it ); name = cfg.readEntry( "Name" ); query_co->insertItem( name ); @@ -118,25 +117,24 @@ void ODict::lookupLanguageNames( QString dictname ) { Config cfg ( "odict" ); cfg.setGroup( "Method_"+dictname ); top_name_content = cfg.readEntry( "Lang1" ); bottom_name_content = cfg.readEntry( "Lang2" ); } void ODict::saveConfig() { Config cfg ( "odict" ); cfg.setGroup( "generalsettings" ); cfg.writeEntry( "casesens" , casesens ); - cfg.writeEntry( "regexp" , regexp ); cfg.writeEntry( "lastdict" , query_co->currentText() ); } void ODict::slotStartQuery() { QString querystring = query_le->text(); if ( !querystring.isEmpty() ) { /* * if the user has not yet defined a dictionary */ if ( !query_co->currentText() ) @@ -176,31 +174,24 @@ void ODict::slotSettings() } void ODict::slotSetParameter( int count ) { if ( count == 0 ) { if ( casesens ) casesens = false; else casesens = true; } - if ( count == 1 ) - { - if ( regexp ) - regexp = false; - else - regexp = true; - } saveConfig(); } void ODict::slotMethodChanged( const QString& methodnumber ) { activated_name = methodnumber; if ( activated_name != ding->loadedDict() ) { ding->loadDict(activated_name); lookupLanguageNames( activated_name ); @@ -213,18 +204,17 @@ void ODict::setupMenus() { menu = new QMenuBar( this ); settings = new QPopupMenu( menu ); 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( "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 ); - parameter->insertItem( tr( "Allow ®. expressions" ), 2 ); parameter->insertSeparator(); menu->insertItem( tr( "Settings" ) , settings ); menu->insertItem( tr( "Parameter" ) , parameter ); } |