summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2008-12-30 16:52:23 +0100
committerAndrea Diamantini <adjam7@gmail.com>2008-12-30 16:52:23 +0100
commit9cbf281f4df98feec4325dac050cc633e3bbfe2f (patch)
tree0627ff26b4899e5c0757bfea8fbd1248f63ef691 /src
parentSolved history && bookmarks menu problems.. (diff)
downloadrekonq-9cbf281f4df98feec4325dac050cc633e3bbfe2f.tar.xz
Fixed FindBar crash && refactored to look like kate searchbar
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.cpp2
-rw-r--r--src/findbar.cpp15
-rw-r--r--src/findbar.h4
-rw-r--r--src/main.cpp28
-rw-r--r--src/mainwindow.cpp7
5 files changed, 31 insertions, 25 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index 63d15f7b..3cb65e38 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -55,7 +55,7 @@ QString OwnBookMarks::currentTitle() const
}
-// -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------------------------
BookmarksMenu::BookmarksMenu(KMainWindow *parent)
diff --git a/src/findbar.cpp b/src/findbar.cpp
index 73f6c784..382f9b09 100644
--- a/src/findbar.cpp
+++ b/src/findbar.cpp
@@ -24,12 +24,12 @@
#include <KAction>
#include <KIcon>
#include <KToolBar>
-#include <KStandardAction>
#include <KDialog>
+#include <KPushButton>
#include <QtGui>
-FindBar::FindBar(KMainWindow *parent)
+FindBar::FindBar(KXmlGuiWindow *parent)
: KToolBar( "FindBar" , parent, Qt::BottomToolBarArea, true, false, false)
, m_lineEdit(0)
{
@@ -47,8 +47,15 @@ FindBar::FindBar(KMainWindow *parent)
connect( m_lineEdit, SIGNAL( textEdited(const QString &) ), parent, SLOT( slotFindNext() ) );
addWidget( m_lineEdit );
- addAction( KStandardAction::findNext(parent, SLOT( slotFindNext() ) , this ) );
- addAction( KStandardAction::findPrev(parent, SLOT( slotFindPrevious() ) , this ) );
+ KPushButton *findNext = new KPushButton( KIcon("go-down"), "&Next", this );
+ KPushButton *findPrev = new KPushButton( KIcon("go-up"), "&Previous", this );
+ // perhaps we don't need working on style..
+// findNext->setStyle();
+// findPrev->setStyle();
+ connect( findNext, SIGNAL( clicked() ), parent, SLOT( slotFindNext() ) );
+ connect( findPrev, SIGNAL( clicked() ), parent, SLOT( slotFindPrevious() ) );
+ addWidget( findNext );
+ addWidget( findPrev );
// we start off hidden
hide();
diff --git a/src/findbar.h b/src/findbar.h
index f8ef183e..4c73767c 100644
--- a/src/findbar.h
+++ b/src/findbar.h
@@ -23,14 +23,14 @@
#include <KLineEdit>
#include <KToolBar>
-#include <KMainWindow>
+#include <KXmlGuiWindow>
class FindBar : public KToolBar
{
Q_OBJECT
public:
- FindBar(KMainWindow *parent);
+ FindBar(KXmlGuiWindow *parent);
~FindBar();
KLineEdit *lineEdit();
diff --git a/src/main.cpp b/src/main.cpp
index fb9bf3de..0988b367 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,21 +32,21 @@ static const char version[] = "0.0.2";
int main(int argc, char **argv)
{
KAboutData about( "rekonq",
- 0,
- ki18n("rekonq"),
- version,
- ki18n(description),
- KAboutData::License_GPL,
- ki18n("(C) 2008 Andrea Diamantini"),
- KLocalizedString(),
- "http://www.adjam.org",
- "adjam7@gmail.com"
- );
+ 0,
+ ki18n("rekonq"),
+ version,
+ ki18n(description),
+ KAboutData::License_GPL,
+ ki18n("(C) 2008 Andrea Diamantini"),
+ KLocalizedString(),
+ "http://www.adjam.org",
+ "adjam7@gmail.com"
+ );
- about.addAuthor( ki18n("Andrea Diamantini"),
- KLocalizedString(),
- "adjam7@gmail.com"
- );
+ about.addAuthor( ki18n("Andrea Diamantini"),
+ KLocalizedString(),
+ "adjam7@gmail.com"
+ );
KCmdLineArgs::init(argc, argv, &about);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index d3509e60..7bf44d06 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -67,10 +67,6 @@ MainWindow::MainWindow()
// tell the KXmlGuiWindow that this is indeed the main widget
setCentralWidget(m_tabWidget);
- // Find Bar
- m_findBar = new FindBar(this);
- connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) );
-
connect(m_tabWidget, SIGNAL( loadPage(const QString &) ), this, SLOT( loadPage(const QString &) ) );
connect(m_tabWidget, SIGNAL( setCurrentTitle(const QString &)), this, SLOT( slotUpdateWindowTitle(const QString &) ) );
connect(m_tabWidget, SIGNAL( showStatusBarMessage(const QString&)), statusBar(), SLOT( showMessage(const QString&) ) );
@@ -112,6 +108,9 @@ MainWindow::MainWindow()
connect(m_searchBar, SIGNAL(search(const KUrl&)), this, SLOT(loadUrl(const KUrl&)));
navigationBar->addWidget(m_searchBar);
+ // Find Bar
+ m_findBar = new FindBar(this);
+ connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) );
}