- Show the "filelist saved to X file" message in the statusbar instead of a new messagebox

- Fixed Statusbar to be able to show long messages

Can't be backported as it needs to modify a string

BUG: 195687

svn path=/trunk/KDE/kdebase/apps/; revision=1092380
This commit is contained in:
Darío Andrés Rodríguez 2010-02-18 20:39:44 +00:00
parent 140d0d05c8
commit 91547acbaa
3 changed files with 12 additions and 8 deletions

View file

@ -64,10 +64,10 @@ KfindDlg::KfindDlg(const KUrl & url, QWidget *parent)
tabWidget->setURL( url );
// prepare window for find results
win = new KFindTreeView(frame );
win = new KFindTreeView(frame, this);
mStatusBar = new KStatusBar(frame);
mStatusBar->insertFixedItem("AMiddleLengthText...", 0);
mStatusBar->insertItem("AMiddleLengthText...", 0);
setStatusMsg( i18nc("the application is currently idle, there is no active search", "Idle.") );
mStatusBar->setItemAlignment(0, Qt::AlignLeft | Qt::AlignVCenter);
mStatusBar->insertPermanentItem(QString(), 1, 1);

View file

@ -19,6 +19,8 @@
#include "kfindtreeview.h"
#include "kfinddlg.h"
#include <QtCore/QTextStream>
#include <QtCore/QTextCodec>
#include <QtCore/QFileInfo>
@ -309,9 +311,10 @@ bool KFindSortFilterProxyModel::lessThan(const QModelIndex &left, const QModelIn
//BEGIN KFindTreeView
KFindTreeView::KFindTreeView( QWidget *parent )
KFindTreeView::KFindTreeView( QWidget *parent, KfindDlg * findDialog )
: QTreeView( parent ) ,
m_contextMenu(0)
m_contextMenu(0),
m_kfindDialog(findDialog)
{
//Configure model and proxy model
m_model = new KFindItemModel( this );
@ -495,9 +498,7 @@ void KFindTreeView::saveResults()
}
file.close();
KMessageBox::information(parentWidget(),
i18n("Results were saved to file\n")+
filename);
m_kfindDialog->setStatusMsg(i18nc("%1=filename", "Results were saved to: %1", filename));
}
}

View file

@ -33,6 +33,7 @@
class KFindTreeView;
class KActionCollection;
class KfindDlg;
class KFindItem
{
@ -100,7 +101,7 @@ class KFindTreeView: public QTreeView
{
Q_OBJECT
public:
KFindTreeView( QWidget * parent = 0 );
KFindTreeView( QWidget * parent, KfindDlg * findDialog);
~KFindTreeView();
void beginSearch(const KUrl& baseUrl);
@ -151,6 +152,8 @@ class KFindTreeView: public QTreeView
KonqPopupMenu * m_contextMenu;
Qt::MouseButtons m_mouseButtons;
KfindDlg * m_kfindDialog;
};
#endif