summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/doclnkitem.cpp6
-rw-r--r--core/pim/osearch/mainwindow.cpp7
2 files changed, 3 insertions, 10 deletions
diff --git a/core/pim/osearch/doclnkitem.cpp b/core/pim/osearch/doclnkitem.cpp
index a1d0384..56eb26a 100644
--- a/core/pim/osearch/doclnkitem.cpp
+++ b/core/pim/osearch/doclnkitem.cpp
@@ -32,15 +32,15 @@ DocLnkItem::~DocLnkItem()
QString DocLnkItem::toRichText()
{
QString text;
text += "<b><h3>" + _doc->name() + "</b></h3><br>";
text += _doc->comment() + "<br>";
- text += "File: " + _doc->file() + "<br>";
- text += "Link: " + _doc->linkFile() + "<br>";
- text += "Mimetype: " + _doc->type() + "<br>";
+ text += QObject::tr("File: ") + _doc->file() + "<br>";
+ text += QObject::tr("Link: ") + _doc->linkFile() + "<br>";
+ text += QObject::tr("Mimetype: ") + _doc->type() + "<br>";
if ( _doc->type().contains( "text" ) ){
text += "<br><br><hr><br>";
QFile f(_doc->file());
if ( f.open(IO_ReadOnly) ) {
QTextStream t( &f );
while ( !t.eof() )
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index adce926..2936b17 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -123,26 +123,23 @@ void MainWindow::makeMenu()
//SETTINGS MENU
cfgMenu->insertItem( tr( "Search" ), searchOptions );
QPopupMenu *pop;
for (SearchGroup *s = searches.first(); s != 0; s = searches.next() ){
pop = s->popupMenu();
if (pop){
- qDebug("inserting settings menu for %s",s->text(0).latin1());
cfgMenu->insertItem( s->text(0), pop );
- //connect( pop, SIGNAL( activated(int) ), SLOT( optionChanged(int) ) );
}
}
//SEARCH
SearchAllAction = new QAction( tr("Search all"),QString::null, 0, this, 0 );
SearchAllAction->setIconSet( Resource::loadIconSet( "find" ) );
connect( SearchAllAction, SIGNAL(activated()), this, SLOT(searchAll()) );
SearchAllAction->addTo( searchMenu );
searchMenu->insertItem( tr( "Options" ), searchOptions );
- //connect( searchOptions, SIGNAL( activated(int) ), SLOT( optionChanged(int) ) );
//SEARCH OPTIONS
//actionWholeWordsOnly = new QAction( tr("Whole words only"),QString::null, 0, this, 0, true );
//actionWholeWordsOnly->addTo( searchOptions );
actionCaseSensitiv = new QAction( tr("Case sensitiv"),QString::null, 0, this, 0, true );
actionCaseSensitiv->addTo( searchOptions );
@@ -180,24 +177,21 @@ void MainWindow::setCurrent(QListViewItem *item)
// ResultItem *res = dynamic_cast<ResultItem*>(item);
richEdit->setText( res->toRichText() );
QIntDict<QString> acts = res->actions();
QButton *button;
for (uint i = 0; i < acts.count(); i++){
button = buttonGroupActions->find( i );
- qDebug("action %i >%s<",i,acts[i]->latin1());
if (!button) {
- qDebug("BUTTON");
button = new QPushButton( detailsFrame );
buttonLayout->addWidget( button, 0 );
buttonGroupActions->insert( button, i);
}
button->setText( *acts[i] );
button->show();
}
for (uint i = acts.count(); i < _buttonCount; i++){
- qDebug("remove button %i of %i",i, _buttonCount);
button = buttonGroupActions->find( i );
if (button) button->hide();
}
_buttonCount = acts.count();
detailsFrame->show();
}else detailsFrame->hide();
@@ -261,9 +255,8 @@ void MainWindow::slotAction( int act )
res->action(act);
}
}
void MainWindow::optionChanged(int i)
{
- qDebug("optionChanged(%i)",i);
searchStringChanged();
}