From 96bd94c88f238fe06ddf5e772bcbe084405cc252 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 27 Jan 2009 01:41:30 +0100 Subject: 1st introduction of new bookmarks line --- src/bookmarks.cpp | 8 ++++++++ src/bookmarks.h | 10 ++++++++++ src/rekonqui.rc | 7 +++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 3cb65e38..a83fbdab 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -69,3 +69,11 @@ BookmarksMenu::BookmarksMenu(KMainWindow *parent) m_menu = new KBookmarkMenu( m_manager , m_owner, this, m_ac ); } + + +//--------------------------------------------------------------------------------------------------------------------- + + +BookmarksLine::BookmarksLine(QObject *parent, KToolBar *toolbar) +{ +} diff --git a/src/bookmarks.h b/src/bookmarks.h index e0e49c78..490f8ee2 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -50,6 +50,7 @@ private: MainWindow *m_parent; }; +// ------------------------------------------------------------------------------ class BookmarksMenu : public KMenu { @@ -64,5 +65,14 @@ private: KBookmarkMenu *m_menu; }; +// ------------------------------------------------------------------------------ + +class BookmarksLine : public QObject +{ +Q_OBJECT +public: + BookmarksLine(QObject *parent, KToolBar *toolbar); + +}; #endif diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 3a9ab682..4e2c766e 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@ - + &File @@ -71,7 +71,6 @@ - Main Toolbar @@ -79,4 +78,8 @@ + +Bookmarks Toolbar + + -- cgit v1.2.1 From feb5472021e697aa2722806a4a46ec56dfa1579f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 27 Jan 2009 12:21:11 +0100 Subject: We now have the FINAL search bar!! Yeah!!! --- TODO | 2 ++ src/findbar.cpp | 54 ++++++++++++++++++++++++++++++++++-------------------- src/findbar.h | 5 ++--- src/mainwindow.cpp | 25 +++++++++++++++++-------- 4 files changed, 55 insertions(+), 31 deletions(-) diff --git a/TODO b/TODO index d6556087..1f106dae 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ ROAD to 0.0.3 (third release) - dbus, kjob, kget support - new application class!! +---- REMOVE ALL FOCUS TO QStackedWidget in mainview!! + + ---------------------------------------------------- NEXT.. diff --git a/src/findbar.cpp b/src/findbar.cpp index 6ba310ca..e3f4b231 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -33,33 +33,47 @@ #include -FindBar::FindBar(KXmlGuiWindow *parent) - : KToolBar( "findBar" , parent, Qt::BottomToolBarArea, true, false, false) +FindBar::FindBar(KXmlGuiWindow *mainwindow) + : QWidget() , m_lineEdit(0) { - KAction *close = new KAction(KIcon("dialog-close") , "close" , this); - connect( close , SIGNAL( triggered() ), this, SLOT( hide() ) ); - addAction( close ); + QHBoxLayout *layout = new QHBoxLayout; - QLabel *label = new QLabel("Find: "); - addWidget( label ); + // cosmetic + layout->setMargin(2); + + // hide button + QToolButton *hideButton = new QToolButton(this); + hideButton->setAutoRaise(true); + hideButton->setIcon(KIcon("dialog-close")); + connect(hideButton, SIGNAL(clicked()), this, SLOT(hide())); + layout->addWidget(hideButton); + layout->setAlignment( hideButton, Qt::AlignLeft|Qt::AlignTop ); - m_lineEdit = new KLineEdit(); - m_lineEdit->setMaximumWidth( 200 ); + // label + QLabel *label = new QLabel("Find: "); + layout->addWidget(label); - connect( m_lineEdit, SIGNAL( returnPressed() ), parent, SLOT( slotFindNext() ) ); - connect( m_lineEdit, SIGNAL( textEdited(const QString &) ), parent, SLOT( slotFindNext() ) ); - addWidget( m_lineEdit ); + // lineEdit, focusProxy + m_lineEdit = new KLineEdit(this); + setFocusProxy(m_lineEdit); + m_lineEdit->setMaximumWidth( 250 ); + connect( m_lineEdit, SIGNAL( returnPressed() ), mainwindow, SLOT( slotFindNext() ) ); + connect( m_lineEdit, SIGNAL( textEdited(const QString &) ), mainwindow, SLOT( slotFindNext() ) ); + layout->addWidget( m_lineEdit ); + // buttons 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 ); + connect( findNext, SIGNAL( clicked() ), mainwindow, SLOT( slotFindNext() ) ); + connect( findPrev, SIGNAL( clicked() ), mainwindow, SLOT( slotFindPrevious() ) ); + layout->addWidget( findNext ); + layout->addWidget( findPrev ); + + // stretching widget on the left + layout->addStretch(); + + setLayout(layout); // we start off hidden hide(); @@ -102,7 +116,7 @@ void FindBar::keyPressEvent(QKeyEvent* event) hide(); return; } - if(event->key() == Qt::Key_Return && ! ( m_lineEdit->text().isEmpty() ) ) + if(event->key() == Qt::Key_Return && !m_lineEdit->text().isEmpty() ) { emit searchString( m_lineEdit->text() ); return; diff --git a/src/findbar.h b/src/findbar.h index d70a9de1..f2c59ce9 100644 --- a/src/findbar.h +++ b/src/findbar.h @@ -25,12 +25,12 @@ #include #include -class FindBar : public KToolBar +class FindBar : public QWidget // KateViewHelpers.h { Q_OBJECT public: - FindBar(KXmlGuiWindow *parent); + FindBar(KXmlGuiWindow *mainwindow); ~FindBar(); KLineEdit *lineEdit(); @@ -46,7 +46,6 @@ signals: private: KLineEdit *m_lineEdit; - QWidget *m_centralWidget; }; #endif diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7a7ec427..10d6f8ce 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -57,6 +57,7 @@ #include #include #include +#include MainWindow::MainWindow() @@ -73,8 +74,18 @@ MainWindow::MainWindow() // creating a new tab m_view->newTab(); - // tell the KXmlGuiWindow that this is indeed the main widget - setCentralWidget(m_view); + // creating a centralWidget containing m_view and the hidden findbar + QWidget *centralWidget = new QWidget; + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(m_view); + + // Find Bar + m_findBar = new FindBar(this); + connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) ); + layout->addWidget(m_findBar); + + centralWidget->setLayout(layout); + setCentralWidget(centralWidget); // connect signals and slots connect(m_view, SIGNAL( loadUrlPage(const KUrl &) ), this, SLOT( loadUrl(const KUrl &) ) ); @@ -116,10 +127,6 @@ MainWindow::MainWindow() m_searchBar = new SearchBar( this ); 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 &) ) ); } @@ -543,7 +550,9 @@ void MainWindow::slotFind(const QString & search) { m_lastSearch = search; if (!currentTab()->findText(m_lastSearch)) + { slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); + } } } @@ -556,7 +565,7 @@ void MainWindow::slotViewFindBar() void MainWindow::slotFindNext() { - if (!currentTab() && !m_lastSearch.isEmpty()) + if (!currentTab() && m_lastSearch.isEmpty()) return; currentTab()->findText(m_lastSearch); } @@ -564,7 +573,7 @@ void MainWindow::slotFindNext() void MainWindow::slotFindPrevious() { - if (!currentTab() && !m_lastSearch.isEmpty()) + if (!currentTab() && m_lastSearch.isEmpty()) return; currentTab()->findText(m_lastSearch, QWebPage::FindBackward); } -- cgit v1.2.1 From de1b2a26f7eaebd3fa1fa2eeb30f4e26afb534fe Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 27 Jan 2009 17:33:26 +0100 Subject: Fixed MenuBar. Fixed BookmarkLine in rekonqui.rc Now we need just the code to implement it.. --- src/bookmarks.cpp | 12 ++++++------ src/bookmarks.h | 8 +++++--- src/mainwindow.cpp | 24 ++++++++++++++---------- src/mainwindow.h | 5 ++++- src/rekonqui.rc | 18 ++++-------------- 5 files changed, 33 insertions(+), 34 deletions(-) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index a83fbdab..08ece82a 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -58,22 +58,22 @@ QString OwnBookMarks::currentTitle() const //--------------------------------------------------------------------------------------------------------------------- -BookmarksMenu::BookmarksMenu(KMainWindow *parent) +BookmarksMenu::BookmarksMenu(KMainWindow *parent, KBookmarkManager *manager) : KMenu(parent) - , m_owner( new OwnBookMarks( parent ) ) + , m_owner( new OwnBookMarks(parent) ) { - KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks - m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); +// KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks +// m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); m_ac = new KActionCollection( this ); - m_menu = new KBookmarkMenu( m_manager , m_owner, this, m_ac ); + m_menu = new KBookmarkMenu( manager , m_owner, this, m_ac ); } //--------------------------------------------------------------------------------------------------------------------- -BookmarksLine::BookmarksLine(QObject *parent, KToolBar *toolbar) +BookmarksLine::BookmarksLine(KBookmarkManager *manager, KToolBar *toolbar) { } diff --git a/src/bookmarks.h b/src/bookmarks.h index 490f8ee2..5aa384a1 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -56,10 +56,9 @@ class BookmarksMenu : public KMenu { Q_OBJECT public: - BookmarksMenu(KMainWindow * parent); + BookmarksMenu(KMainWindow*, KBookmarkManager *); private: - KBookmarkManager *m_manager; OwnBookMarks *m_owner; KActionCollection *m_ac; KBookmarkMenu *m_menu; @@ -71,8 +70,11 @@ class BookmarksLine : public QObject { Q_OBJECT public: - BookmarksLine(QObject *parent, KToolBar *toolbar); + BookmarksLine(KBookmarkManager *, KToolBar *toolbar); +private: + OwnBookMarks *m_owner; + KActionCollection *m_ac; }; #endif diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 10d6f8ce..0d93ea60 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -63,6 +63,7 @@ MainWindow::MainWindow() : KXmlGuiWindow() , m_view( new MainView(this) ) + , m_manager(0) { // accept dnd setAcceptDrops(true); @@ -107,6 +108,16 @@ MainWindow::MainWindow() // add a status bar statusBar()->show(); + // ----- BOOKMARKS MENU: this has to be done BEFORE setupGUI!! + KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks + m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); + + KAction *a = new KActionMenu( i18n("B&ookmarks"), this ); + actionCollection()->addAction( QLatin1String("bookmarks"), a ); + BookmarksMenu *bookmarksMenu = new BookmarksMenu( this, m_manager ); + a->setMenu( bookmarksMenu ); + + // a call to KXmlGuiWindow::setupGUI() populates the GUI // with actions, using KXMLGUI. // It also applies the saved mainwindow settings, if any, and ask the @@ -114,8 +125,8 @@ MainWindow::MainWindow() // toolbar position, icon size, etc. setupGUI(); - // setup history & bookmarks menus - setupCustomMenu(); + // setup history menu + setupHistoryMenu(); // setup Tab Bar setupTabBar(); @@ -207,12 +218,6 @@ void MainWindow::setupActions() actionCollection()->addAction( QLatin1String("web inspector"), a ); connect( a, SIGNAL( triggered(bool) ), this, SLOT( slotToggleInspector(bool) ) ); - // ================== BOOKMARKS MENU - a = new KActionMenu( i18n("B&ookmarks"), this ); - actionCollection()->addAction( QLatin1String("bookmarks"), a ); - BookmarksMenu *bookmarksMenu = new BookmarksMenu( this ); - a->setMenu( bookmarksMenu ); - // ================ history related actions KAction *historyBack = new KAction( KIcon("go-previous"), i18n("Back"), this); m_historyBackMenu = new KMenu(this); @@ -267,9 +272,8 @@ void MainWindow::setupTabBar() } -void MainWindow::setupCustomMenu() +void MainWindow::setupHistoryMenu() { - // -------------------------------- HISTORY MENU ----------------------------------------------------------------------- HistoryMenu *historyMenu = new HistoryMenu(this); connect(historyMenu, SIGNAL(openUrl(const KUrl&)), m_view, SLOT(loadUrlInCurrentTab(const KUrl&))); connect(historyMenu, SIGNAL(hovered(const QString&)), this, SLOT(slotUpdateStatusbar(const QString&))); diff --git a/src/mainwindow.h b/src/mainwindow.h index 8b8f1cbe..476a6fe6 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -26,6 +26,7 @@ #include "findbar.h" #include "searchbar.h" #include "mainview.h" +#include "bookmarks.h" // KDE Includes #include @@ -61,7 +62,7 @@ public: private: void setupActions(); - void setupCustomMenu(); + void setupHistoryMenu(); void setupTabBar(); public slots: @@ -121,6 +122,8 @@ private: KMenu *m_historyBackMenu; KMenu *m_windowMenu; + KBookmarkManager *m_manager; + QAction *m_stopReload; QString m_lastSearch; diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 4e2c766e..256d59b2 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@ - + &File @@ -44,7 +44,6 @@ - @@ -57,17 +56,8 @@ - - &Settings - - - - - - + + @@ -79,7 +69,7 @@ -Bookmarks Toolbar +Bookmarks Toolbar -- cgit v1.2.1 From 1024f77ad03ef3d30d8be6aa61542a057a100868 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 00:59:08 +0100 Subject: Removed unuseful "Select All" action. If someone needs it, I can try to implement it one day.. --- src/mainview.cpp | 8 -------- src/mainview.h | 1 - src/mainwindow.cpp | 3 ++- src/mainwindow.h | 5 ++--- src/rekonqui.rc | 4 +--- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/mainview.cpp b/src/mainview.cpp index 328d3dd1..acef1998 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -171,14 +171,6 @@ void MainView::slotWebPaste() } -void MainView::slotWebSelectAll() -{ - WebView *webView = currentWebView(); - QWebPage *currentParent = webView->webPage(); - // TODO -} - - void MainView::clear() { // clear the recently closed tabs diff --git a/src/mainview.h b/src/mainview.h index 1bb0bf6e..1f443a37 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -112,7 +112,6 @@ public slots: void slotWebCut(); void slotWebCopy(); void slotWebPaste(); - void slotWebSelectAll(); private slots: void currentChanged(int index); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0d93ea60..d956642b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -34,6 +34,8 @@ #include "networkaccessmanager.h" #include "bookmarks.h" #include "webview.h" +#include "mainview.h" +#include "bookmarks.h" // UI Includes #include "ui_passworddialog.h" @@ -173,7 +175,6 @@ void MainWindow::setupActions() KStandardAction::cut( m_view, SLOT( slotWebCut() ), actionCollection() ); KStandardAction::copy( m_view, SLOT( slotWebCopy() ), actionCollection() ); KStandardAction::paste( m_view, SLOT( slotWebPaste() ), actionCollection() ); - KStandardAction::selectAll( m_view, SLOT( slotWebSelectAll() ), actionCollection() ); a = new KAction ( KIcon( "process-stop" ), i18n("&Stop"), this ); a->setShortcut( QKeySequence(Qt::CTRL | Qt::Key_Period) ); diff --git a/src/mainwindow.h b/src/mainwindow.h index 476a6fe6..d1eba1a4 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -25,8 +25,6 @@ // Local Includes #include "findbar.h" #include "searchbar.h" -#include "mainview.h" -#include "bookmarks.h" // KDE Includes #include @@ -37,7 +35,8 @@ #include #include - +class KBookmarkManager; +class MainView; class QWebFrame; class WebView; diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 256d59b2..11897e03 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@ - + &File @@ -28,8 +28,6 @@ - - -- cgit v1.2.1 From dc7cc2d262903aac402b7b1841b61d111ce797e8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 01:00:15 +0100 Subject: SOme more bits on bookmarkline.. --- src/bookmarks.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 08ece82a..a736e378 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -62,11 +62,7 @@ BookmarksMenu::BookmarksMenu(KMainWindow *parent, KBookmarkManager *manager) : KMenu(parent) , m_owner( new OwnBookMarks(parent) ) { -// KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks -// m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); - m_ac = new KActionCollection( this ); - m_menu = new KBookmarkMenu( manager , m_owner, this, m_ac ); } @@ -76,4 +72,11 @@ BookmarksMenu::BookmarksMenu(KMainWindow *parent, KBookmarkManager *manager) BookmarksLine::BookmarksLine(KBookmarkManager *manager, KToolBar *toolbar) { + KBookmarkGroup toolbarGroup = manager->toolbar(); + KBookmark bm = toolbarGroup.first(); + while(!bm.isNull()) + { + // TODO append bm to toolbar + bm = toolbarGroup.next(bm); + } } -- cgit v1.2.1 From b18c3e2085ef29874ea77141c293902be67ca114 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 14:24:15 +0100 Subject: updated Changelog && TODO --- ChangeLog | 8 ++++++++ TODO | 13 +++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1e858a26..49e7930f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +0.0.3 +- ~80% ported to KDE4 +- KConfigXT support +- improved text search bar +- fixed all "web actions" +- adopted KDE download system +- new bookmark toolbar + 0.0.2 - 70% ported to KDE4 - new urlbar diff --git a/TODO b/TODO index 1f106dae..787aca3e 100644 --- a/TODO +++ b/TODO @@ -13,19 +13,20 @@ ROAD to 0.0.2 (second release) ROAD to 0.0.3 (third release) + mainview + KConfigXT -- documentation -- improve slackbuild ++ downloadSystem-- +- documentation++ - autosave-- -- downloadSystem-- -- dbus, kjob, kget support +- dbus support - new application class!! ----- REMOVE ALL FOCUS TO QStackedWidget in mainview!! +--- REMOVE ALL FOCUS TO QStackedWidget in mainview!! +--- improve searchbar features +--- bookmarks line + ---------------------------------------------------- NEXT.. -- system SELECT ALL ++ system SELECT ALL - better FULL SCREEN - color progress - contextMenu in searchbar to set different search engines -- cgit v1.2.1 From 8d95276b0e734a06836806fe84ab3f2ea4f5b252 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 15:57:59 +0100 Subject: updated TODO --- TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index 787aca3e..3e3cecf7 100644 --- a/TODO +++ b/TODO @@ -22,6 +22,7 @@ ROAD to 0.0.3 (third release) --- REMOVE ALL FOCUS TO QStackedWidget in mainview!! --- improve searchbar features --- bookmarks line +--- fix sessions && ui dimension + ---------------------------------------------------- -- cgit v1.2.1 From d467ccf90fb3e8c851db97c44f551aeaa9fa289f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 28 Jan 2009 15:58:37 +0100 Subject: New BookmarkBar!! 1st version, Yeah!! --- src/bookmarks.cpp | 47 ++++++++++++++++++++++++++++++++++++----------- src/bookmarks.h | 25 ++++++++----------------- src/mainwindow.cpp | 14 +++++++------- src/mainwindow.h | 4 ++-- src/rekonqui.rc | 6 +++--- 5 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index a736e378..584b2689 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -26,6 +26,7 @@ // KDE Includes #include +#include OwnBookMarks::OwnBookMarks(KMainWindow *parent) : QObject(parent) @@ -55,28 +56,52 @@ QString OwnBookMarks::currentTitle() const } -//--------------------------------------------------------------------------------------------------------------------- +// ------------------------------------------------------------------------------------------------------ -BookmarksMenu::BookmarksMenu(KMainWindow *parent, KBookmarkManager *manager) - : KMenu(parent) - , m_owner( new OwnBookMarks(parent) ) +BookmarksProvider::BookmarksProvider(KMainWindow* parent) + : m_parent(parent) + , m_owner(new OwnBookMarks(parent)) { + KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks + m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); m_ac = new KActionCollection( this ); - m_menu = new KBookmarkMenu( manager , m_owner, this, m_ac ); } -//--------------------------------------------------------------------------------------------------------------------- - - -BookmarksLine::BookmarksLine(KBookmarkManager *manager, KToolBar *toolbar) +void BookmarksProvider::provideBmToolbar(KToolBar* toolbar) { - KBookmarkGroup toolbarGroup = manager->toolbar(); + toolbar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon ); + KBookmarkGroup toolbarGroup = m_manager->toolbar(); KBookmark bm = toolbarGroup.first(); while(!bm.isNull()) { - // TODO append bm to toolbar + if(bm.isGroup()) + { + // do nothing! + } + else + { + if(bm.isSeparator()) + { + toolbar->addSeparator(); + } + else + { + KAction *a = new KBookmarkAction(bm, m_owner, m_ac); + toolbar->addAction(a); + } + } + // go ahead! bm = toolbarGroup.next(bm); } } + + +KMenu *BookmarksProvider::bookmarksMenu() +{ + KMenu *bmMenu = new KMenu(m_parent); + new KBookmarkMenu( m_manager, m_owner, bmMenu, m_ac ); + return bmMenu; +} + diff --git a/src/bookmarks.h b/src/bookmarks.h index 5aa384a1..2bdfab0a 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -35,7 +36,7 @@ class OwnBookMarks : public QObject , public KBookmarkOwner { Q_OBJECT public: - OwnBookMarks(KMainWindow * ); + OwnBookMarks(KMainWindow *); virtual void openBookmark (const KBookmark & , Qt::MouseButtons , Qt::KeyboardModifiers ); @@ -52,29 +53,19 @@ private: // ------------------------------------------------------------------------------ -class BookmarksMenu : public KMenu +class BookmarksProvider : public QObject { Q_OBJECT public: - BookmarksMenu(KMainWindow*, KBookmarkManager *); + BookmarksProvider(KMainWindow*); -private: - OwnBookMarks *m_owner; - KActionCollection *m_ac; - KBookmarkMenu *m_menu; -}; - -// ------------------------------------------------------------------------------ - -class BookmarksLine : public QObject -{ -Q_OBJECT -public: - BookmarksLine(KBookmarkManager *, KToolBar *toolbar); + void provideBmToolbar(KToolBar*); + KMenu *bookmarksMenu(); private: + KMainWindow *m_parent; OwnBookMarks *m_owner; + KBookmarkManager *m_manager; KActionCollection *m_ac; }; - #endif diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d956642b..87ae0ac0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -50,6 +50,7 @@ #include #include #include +#include // Qt Includes #include @@ -65,7 +66,7 @@ MainWindow::MainWindow() : KXmlGuiWindow() , m_view( new MainView(this) ) - , m_manager(0) + , m_bookmarksProvider( new BookmarksProvider(this) ) { // accept dnd setAcceptDrops(true); @@ -111,14 +112,10 @@ MainWindow::MainWindow() statusBar()->show(); // ----- BOOKMARKS MENU: this has to be done BEFORE setupGUI!! - KUrl bookfile = KUrl( "~/.kde/share/apps/konqueror/bookmarks.xml" ); // share konqueror bookmarks - m_manager = KBookmarkManager::managerForExternalFile( bookfile.path() ); - KAction *a = new KActionMenu( i18n("B&ookmarks"), this ); actionCollection()->addAction( QLatin1String("bookmarks"), a ); - BookmarksMenu *bookmarksMenu = new BookmarksMenu( this, m_manager ); - a->setMenu( bookmarksMenu ); - + KMenu *bmMenu = m_bookmarksProvider->bookmarksMenu(); + a->setMenu( bmMenu ); // a call to KXmlGuiWindow::setupGUI() populates the GUI // with actions, using KXMLGUI. @@ -137,6 +134,9 @@ MainWindow::MainWindow() KToolBar *navigationBar = toolBar( "mainToolBar" ); navigationBar->addWidget( m_view->lineEditStack() ); + KToolBar *bmToolbar = toolBar("bookmarksToolBar"); + m_bookmarksProvider->provideBmToolbar( bmToolbar ); + m_searchBar = new SearchBar( this ); connect(m_searchBar, SIGNAL(search(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); navigationBar->addWidget(m_searchBar); diff --git a/src/mainwindow.h b/src/mainwindow.h index d1eba1a4..2ec5c1bd 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -35,7 +35,7 @@ #include #include -class KBookmarkManager; +class BookmarksProvider; class MainView; class QWebFrame; class WebView; @@ -121,7 +121,7 @@ private: KMenu *m_historyBackMenu; KMenu *m_windowMenu; - KBookmarkManager *m_manager; + BookmarksProvider *m_bookmarksProvider; QAction *m_stopReload; diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 11897e03..5016192f 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@ - + &File @@ -59,7 +59,7 @@ -Main Toolbar +Main Toolbar @@ -67,7 +67,7 @@ -Bookmarks Toolbar +Bookmarks Toolbar -- cgit v1.2.1 From 2649aba801efdbf57f10b55a5e6c46dbd13cdbb4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 29 Jan 2009 10:52:28 +0100 Subject: Fixed Find bar use. --- TODO | 3 ++- src/findbar.cpp | 4 ++-- src/mainwindow.cpp | 20 ++++++++++---------- src/rekonqui.rc | 2 +- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/TODO b/TODO index 3e3cecf7..e8fa7215 100644 --- a/TODO +++ b/TODO @@ -21,8 +21,9 @@ ROAD to 0.0.3 (third release) --- REMOVE ALL FOCUS TO QStackedWidget in mainview!! --- improve searchbar features ---- bookmarks line +++- bookmarks line --- fix sessions && ui dimension +--- fix KConfigXT use + ---------------------------------------------------- diff --git a/src/findbar.cpp b/src/findbar.cpp index e3f4b231..449e24fa 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -58,8 +58,8 @@ FindBar::FindBar(KXmlGuiWindow *mainwindow) m_lineEdit = new KLineEdit(this); setFocusProxy(m_lineEdit); m_lineEdit->setMaximumWidth( 250 ); - connect( m_lineEdit, SIGNAL( returnPressed() ), mainwindow, SLOT( slotFindNext() ) ); - connect( m_lineEdit, SIGNAL( textEdited(const QString &) ), mainwindow, SLOT( slotFindNext() ) ); +// connect( m_lineEdit, SIGNAL( returnPressed() ), mainwindow, SLOT( slotFind() ) ); + connect( m_lineEdit, SIGNAL( textChanged(const QString &) ), mainwindow, SLOT( slotFind(const QString &) ) ); layout->addWidget( m_lineEdit ); // buttons diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 87ae0ac0..c7c1a47e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -551,14 +551,8 @@ void MainWindow::slotFind(const QString & search) { if (!currentTab()) return; - if (!search.isEmpty()) - { - m_lastSearch = search; - if (!currentTab()->findText(m_lastSearch)) - { - slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); - } - } + m_lastSearch = search; + slotFindNext(); } @@ -572,7 +566,10 @@ void MainWindow::slotFindNext() { if (!currentTab() && m_lastSearch.isEmpty()) return; - currentTab()->findText(m_lastSearch); + if (!currentTab()->findText(m_lastSearch, QWebPage::FindWrapsAroundDocument)) + { + slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); + } } @@ -580,7 +577,10 @@ void MainWindow::slotFindPrevious() { if (!currentTab() && m_lastSearch.isEmpty()) return; - currentTab()->findText(m_lastSearch, QWebPage::FindBackward); + if (!currentTab()->findText(m_lastSearch, QWebPage::FindBackward)) + { + slotUpdateStatusbar( QString(m_lastSearch) + i18n(" not found.") ); + } } diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 5016192f..861f8538 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -67,7 +67,7 @@ -Bookmarks Toolbar +Bookmarks Toolbar -- cgit v1.2.1 From dd0c4480eec6e12665aef9991c92cb80cc9e6a12 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 29 Jan 2009 11:59:07 +0100 Subject: 1st lines of docs --- doc/index.docbook | 63 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/doc/index.docbook b/doc/index.docbook index e9b64bd5..6eb4cd25 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -3,7 +3,7 @@ rekonq"> - -The &kmyapplication; Handbook +The &rekonq; Handbook @@ -63,11 +63,10 @@ as Authors, publish date, the abstract, and Keywords --> and use `&George.N.Ugnacious; &George.N.Ugnacious.mail;' in the author element. --> -George -N. -Ugnacious +Andrea +Diamantini -gnu@kde.org +adjam7@gmail.com @@ -75,7 +74,7 @@ and use `&George.N.Ugnacious; &George.N.Ugnacious.mail;' in the author element. 2008 -George N. Ugnacious +Andrea Diamantini -2008-01-10 -1.01.00 +2008-12-01 +0.00.03 -&kmyapplication; is an application specially designed to do nothing you would +&rekonq; is an application specially designed to do nothing you would ever want. @@ -107,10 +106,10 @@ Please at least include KDE, the KDE package it is in, the name KDE -kdeutils -Kapp -nothing -nothing else +kdenetwork +rekonq +webkit +browser @@ -133,13 +132,13 @@ problems. Basically a long version of the abstract. Don't include a revision history. (see installation appendix comment) --> -&kmyapplication; is a program that lets you do absolutely nothing. Please report +&rekonq; is a program that lets you do absolutely nothing. Please report any problems or feature requests to the &kde; mailing lists. -Using &kmyapplication; +Using &rekonq; patent issues. --> -Here's a screenshot of &kmyapplication; +Here's a screenshot of &rekonq; @@ -168,7 +167,7 @@ patent issues. --> -More &kmyapplication; features +More &rekonq; features It slices! It dices! and it comes with a free toaster! @@ -183,7 +182,7 @@ The Squiggle Tool Squiggle is used to draw squiggly lines all over -the &kmyapplication; main window. It's not a bug, it's a feature! +the &rekonq; main window. It's not a bug, it's a feature! @@ -199,7 +198,7 @@ menus or toolbars. This may not be necessary for small apps or apps with no tool or menu bars. --> -The main &kmyapplication; window +The main &rekonq; window The File Menu @@ -233,7 +232,7 @@ or menu bars. --> File Quit -Quits &kmyapplication; +Quits &rekonq; @@ -244,7 +243,7 @@ or menu bars. --> The <guimenu>Help</guimenu> Menu - + @@ -256,14 +255,14 @@ or menu bars. --> -Developer's Guide to &kmyapplication; +Developer's Guide to &rekonq; -Programming &kmyapplication; plugins is a joy to behold. Just read through the next +Programming &rekonq; plugins is a joy to behold. Just read through the next 66 pages of API's to learn how! @@ -418,7 +417,7 @@ application work. --> -My Mouse doesn't work. How do I quit &kmyapplication;? +My Mouse doesn't work. How do I quit &rekonq;? You silly goose! Check out the Commands @@ -447,7 +446,7 @@ distribution. --> Credits and License -&kmyapplication; +&rekonq; Program copyright 2008 John Q. Hacker jqh@kde.org @@ -487,7 +486,7 @@ Documentation Copyright © 2008 George N. Ugnacious gnu@kde.orgInstallation -How to obtain &kmyapplication; +How to obtain &rekonq; -In order to successfully use &kmyapplication;, you need &kde; 1.1. Foobar.lib is -required in order to support the advanced &kmyapplication; features. &kmyapplication; uses +In order to successfully use &rekonq;, you need &kde; 1.1. Foobar.lib is +required in order to support the advanced &rekonq; features. &rekonq; uses about 5 megs of memory to run, but this may vary depending on your platform and configuration. -All required libraries as well as &kmyapplication; itself can be found -on The &kmyapplication; home page. +All required libraries as well as &rekonq; itself can be found +on The &rekonq; home page. - rekonq"> - - + + + Andrea + Diamantini + + "> + adjam7@gmail.com"> - - - + ]> - - - - - - - - - - - + The &rekonq; Handbook - - - -Andrea -Diamantini - -adjam7@gmail.com - +&Andrea.Diamantini; &Andrea.Diamantini.mail; - - 2008 -Andrea Diamantini +2009 +&Andrea.Diamantini; - - -&FDLNotice; - - -2008-12-01 -0.00.03 +&FDLNotice; - +2008-11-16 +0.0.3 -&rekonq; is an application specially designed to do nothing you would -ever want. +&rekonq; is a lightweight KDE browser based on WebKit. - - KDE -kdenetwork +browser rekonq webkit -browser - + -Introduction - +Introduction -&rekonq; is a program that lets you do absolutely nothing. Please report -any problems or feature requests to the &kde; mailing lists. +&rekonq; is a lightweight KDE browser based on WebKit. - - -Using &rekonq; + - +Launching &rekonq; +The Find Files tool is a useful method of searching for specific files on your +computer, or for searching for files that match a pattern. An example of +this could include searching for files of a particular type or with certain +letters in the filename. - - - -Here's a screenshot of &rekonq; - - - - - - - - - Screenshot - - - - - - - -More &rekonq; features - -It slices! It dices! and it comes with a free toaster! - -The Squiggle Tool - - - - - - - - Squiggle - - is used to draw squiggly lines all over -the &rekonq; main window. It's not a bug, it's a feature! +You can load this utility by clicking on Find Files. This will +launch &rekonq;. + - -Command Reference + - + +Finding Files - -The main &rekonq; window + +The Name/Location Tab - -The File Menu +When starting &rekonq;, you will see a quite simple window. Type in the +name of the file you are searching in the text box labeled +Named:. Choose a folder where you want to search +by typing it in the field Look in: +or by clicking Browse... and press +Enter or click Find. If +Include subfolders is checked all +subfolders starting from your chosen folder will be searched +too. The results will be displayed in the box below. + + + +You can use the following wildcards: + + - - -&Ctrl;N - -File -New - -Creates a new document - - - - -&Ctrl;S - -File -Save - -Saves the document +The Asterisk * + + +The asterisk stands for any number of missing characters (even zero), +that means ⪚ searching for marc* may find the +files marc, marc.png and + marc_must_not_read_this.kwd. +mar*.kwd may find +marketplace.kwd and +marc_must_not_read_this.kwd. + + + - - -&Ctrl;Q - -File -Quit - -Quits &rekonq; - - +The Question Mark ? + + +In contrast to the asterisk, the question mark stands for exactly one +character, so mar? will find +marc, but marc? will not find +anything, as our files are called marc and +marc.png. You can put as many question marks in the +term as you want, it will find exactly that number of characters. + + - - - -The <guimenu>Help</guimenu> Menu - - - - - - -&help.menu.documentation; + - + +Of course you can combine those two wildcard symbols in a search term. + - - - -Developer's Guide to &rekonq; - + +The Contents Tab + + +File type + -Programming &rekonq; plugins is a joy to behold. Just read through the next -66 pages of API's to learn how! +Here you can specify the type of file you are searching for. + + - - - - -XtUnmanageChildren -Xt - Geometry Management - - -XtUnmanageChildren - -remove a list of children from a parent widget's managed -list. -widgetsremoving -XtUnmanageChildren - - - - - -4 March 1996 - - -void XtUnmanageChildren(children, num_children) - WidgetList children; - Cardinal num_children; - - - -Inputs - -children - +Containing text -Specifies an array of child widgets. Each child must be of -class RectObj or any subclass thereof. + +Type in the word or phrase the files you are searching for must +contain. Note: If you do this in a large folder or checked +Include subfolders in the +Name/Location tab, this may take a long time. + + +This option will not work for all files listed +under File type. Only the following file types +are supported: + + +Text files, ⪚ source code and README files +&kword; >= 1.2 +&kpresenter; >= 1.2 +&kspread; >= 1.2 +OpenOffice.org Writer +OpenOffice.org Impress +OpenOffice.org Calc + + + + + + -num_children - +Case sensitive -Specifies the number of elements in children. + +If you enable this option, &rekonq; will +only find files with the exact case matching, ⪚ +MARC will only match +MARC, not Marc. + + +Regular expression +If you have installed the &kregexpeditor; tool from +the kdeutils package, you will have this additional option. Enabling +it will allow you to search for a regexp or +regular expression. A regexp is a way to specify conditions for your +search, and they can be very complex, and equally they can be very +powerful. If you are unfamiliar with regular expressions, you can +choose Edit Regular Expression to open +&kregexpeditor;. This tool allows you to construct your set of +conditions graphically, and then generates the expression for +you. + +&kregexpeditor; is a very useful tool, and can be used from within +many &kde; applications other than &rekonq;. You can find more +information from within its own help file. + + + + + - - - -Description - -XtUnmanageChildren() unmaps the specified widgets -and removes them from their parent's geometry management. -The widgets will disappear from the screen, and (depending -on its parent) may no longer have screen space allocated for -them. - -Each of the widgets in the children array must have -the same parent. - -See the “Algorithm” section below for full details of the -widget unmanagement procedure. - - - -Usage -Unmanaging widgets is the usual method for temporarily -making them invisible. They can be re-managed with -XtManageChildren(). - -You can unmap a widget, but leave it under geometry -management by calling XtUnmapWidget(). You can -destroy a widget's window without destroying the widget by -calling XtUnrealizeWidget(). You can destroy a -widget completely with XtDestroyWidget(). - -If you are only going to unmanage a single widget, it is -more convenient to call XtUnmanageChild(). It is -often more convenient to call XtUnmanageChild() -several times than it is to declare and initialize an array -of widgets to pass to XtUnmanageChildren(). Calling -XtUnmanageChildren() is more efficient, however, -because it only calls the parent's change_managed() -method once. - - + - -Algorithm - -XtUnmanageChildren() performs the following: + +The Properties Tab + + +Here you can refine your search. These are the special refinements +you can choose: + + -- - +Find all files created or modified -Ignores the child if it already is unmanaged or is being -destroyed. + +Here you can either enter two dates, between which the +files were created or modified, or specify a time period. + -- - +File size is -Otherwise, if the child is realized, it makes it nonvisible -by unmapping it. +Here you can specify if the file has to be at least or as most as +big as the size you entered in the following box. - - - - - -Structures -The WidgetList type is simply an array of widgets: + +Files owned by user, Files owned by group + +Here you can specify user and group names. -typedef Widget *WidgetList; - - - + + - + + + - -Questions and Answers - - - -&reporting.bugs; -&updating.documentation; - - - - -My Mouse doesn't work. How do I quit &rekonq;? - - -You silly goose! Check out the Commands -Section for the answer. - - - - -Why can't I twiddle my documents? - - -You can only twiddle your documents if you have the foobar.lib -installed. - - - - + - + Credits and License -&rekonq; +&rekonq; + -Program copyright 2008 John Q. Hacker jqh@kde.org +Program copyright: - -Contributors: + -Konqui the KDE Dragon konqui@kde.org - -Tux the Linux Penguin tux@linux.org +Developers + +&Andrea.Diamantini; &Andrea.Diamantini.mail; + - -Documentation Copyright © 2008 George N. Ugnacious gnu@kde.org - +Documentation copyright 2008 &Andrea.Diamantini; &Andrea.Diamantini.mail; + &underFDL; - - - -&underGPL; &underBSDLicense; -&underArtisticLicense; -&underX11License; Installation - + How to obtain &rekonq; - - &install.intro.documentation; @@ -499,70 +307,21 @@ application --> Requirements - - -In order to successfully use &rekonq;, you need &kde; 1.1. Foobar.lib is -required in order to support the advanced &rekonq; features. &rekonq; uses -about 5 megs of memory to run, but this may vary depending on your -platform and configuration. +In order to successfully use &rekonq;, you need at least Qt 4.4.x and &kde; 4.1.x. - -All required libraries as well as &rekonq; itself can be found -on The &rekonq; home page. - - - - -You can find a list of changes at http://apps.kde.org/kapp. - Compilation and Installation - - - - &install.compile.documentation; - -Configuration - -Don't forget to tell your system to start the dtd -dicer-toaster daemon first, or &rekonq; won't work ! - - - &documentation.index; - - + -- cgit v1.2.1 From ab64a769b0cd6fd392b26b5ab6520f31c28a30e0 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 01:14:05 +0100 Subject: Fixed notfound.html --- htmls/notfound.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htmls/notfound.html b/htmls/notfound.html index 77994119..6ffbc9f3 100644 --- a/htmls/notfound.html +++ b/htmls/notfound.html @@ -54,8 +54,10 @@ ul {
  • If the address is correct, try to check the network connection.
  • If your computer or network is protected by a firewall or - proxy, make sure that the browser demo is permitted to access + proxy, make sure that rekonq is permitted to access the network.
  • +
  • Of course, if rekonq doesn't work properly, you can always + say it's a programmer error ;)


  • -- cgit v1.2.1 From e095ed8b62c56745367fe79186431fe4f175d777 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 01:14:46 +0100 Subject: Fixed download problems rewamp proxy ui fixing settings --- src/download.cpp | 19 +++++++++---------- src/download.h | 4 ---- src/networkaccessmanager.cpp | 2 +- src/rekonq.kcfg | 2 +- src/settings.cpp | 11 +++++++++-- src/settings_proxy.ui | 41 ++++++++++++++++++++++++----------------- src/webview.cpp | 10 ++++++++++ 7 files changed, 54 insertions(+), 35 deletions(-) diff --git a/src/download.cpp b/src/download.cpp index aedd0a63..d1ed296a 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -33,7 +33,7 @@ Download::Download(const KUrl &srcUrl, const KUrl &destUrl) : m_srcUrl(srcUrl), m_destUrl(destUrl) { - kDebug(5001) << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); + kWarning() << "DownloadFile: " << m_srcUrl.url() << " to dest: " << m_destUrl.url(); m_copyJob = KIO::get(m_srcUrl); connect(m_copyJob, SIGNAL(data(KIO::Job*,const QByteArray &)), SLOT(slotData(KIO::Job*, const QByteArray&))); connect(m_copyJob, SIGNAL(result(KJob *)), SLOT(slotResult(KJob *))); @@ -56,27 +56,26 @@ void Download::slotResult(KJob * job) { case 0://The download has finished { - kDebug(5001) << "Downloading successfully finished" << m_destUrl.url(); - QFile torrentFile(m_destUrl.path()); - if (!torrentFile.open(QIODevice::WriteOnly | QIODevice::Text)) {} - torrentFile.write(m_data); - torrentFile.close(); - emit finishedSuccessfully(m_destUrl, m_data); + kDebug(5001) << "Downloading successfully finished: " << m_destUrl.url(); + QFile destFile(m_destUrl.path()); + if ( destFile.open(QIODevice::WriteOnly | QIODevice::Text) ) + { + destFile.write(m_data); + destFile.close(); + } m_data = 0; break; } case KIO::ERR_FILE_ALREADY_EXIST: { kDebug(5001) << "ERROR - File already exists"; - QFile file(m_destUrl.path()); - emit finishedSuccessfully(m_destUrl, file.readAll()); + // QFile file(m_destUrl.path()); m_data = 0; break; } default: kDebug(5001) << "We are sorry to say you, that there were errors while downloading :("; m_data = 0; - emit finishedWithError(); break; } } diff --git a/src/download.h b/src/download.h index 7986341d..65f36d3b 100644 --- a/src/download.h +++ b/src/download.h @@ -37,10 +37,6 @@ class Download : public QObject Download(const KUrl &srcUrl, const KUrl &destUrl); ~Download(); - Q_SIGNALS: - void finishedSuccessfully(KUrl dest, QByteArray data); - void finishedWithError(); - private slots: void slotResult(KJob * job); void slotData(KIO::Job *job, const QByteArray& data); diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp index 1d601440..82947c3b 100644 --- a/src/networkaccessmanager.cpp +++ b/src/networkaccessmanager.cpp @@ -64,7 +64,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) void NetworkAccessManager::loadSettings() { QNetworkProxy proxy; - if ( ReKonfig::enableProxy() ) + if ( ReKonfig::isProxyEnabled() ) { if ( ReKonfig::proxyType() == 0 ) { diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index c20134be..a1b6ca4c 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -50,7 +50,7 @@ - + false diff --git a/src/settings.cpp b/src/settings.cpp index 462874f9..2181d0fd 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -131,10 +131,17 @@ void SettingsDialog::readConfig() connect(d->generalUi.downloadDirUrlRequester, SIGNAL(textChanged(QString)),this, SLOT(saveSettings())); // ======= Fonts - d->fontsUi.standardFontChooser->setFont(ReKonfig::standardFont(), false); + QFont stdFont = ReKonfig::standardFont(); + d->fontsUi.standardFontChooser->setFont(stdFont, false); connect(d->fontsUi.standardFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); - d->fontsUi.fixedFontChooser->setFont(ReKonfig::fixedFont(), true); + QFont fxFont = ReKonfig::fixedFont(); + d->fontsUi.fixedFontChooser->setFont(fxFont, true); connect(d->fontsUi.fixedFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); + + // ======= Proxy + bool proxyEnabled = ReKonfig::isProxyEnabled(); + d->proxyUi.groupBox->setEnabled(proxyEnabled); + connect(d->proxyUi.kcfg_isProxyEnabled, SIGNAL(clicked(bool)), d->proxyUi.groupBox, SLOT(setEnabled(bool))); } diff --git a/src/settings_proxy.ui b/src/settings_proxy.ui index a7dd6073..bcee0a7e 100644 --- a/src/settings_proxy.ui +++ b/src/settings_proxy.ui @@ -5,21 +5,28 @@ 0 0 - 472 - 221 + 440 + 223 Proxy - + - + + + enable proxy + + + + + - Enable proxy + Proxy Settings - + Type: @@ -29,7 +36,7 @@ - + @@ -43,7 +50,7 @@ - + Host: @@ -53,10 +60,10 @@ - + - + Port: @@ -66,7 +73,7 @@ - + 10000 @@ -76,7 +83,7 @@ - + Qt::Horizontal @@ -89,7 +96,7 @@ - + User Name: @@ -99,10 +106,10 @@ - + - + Password: @@ -112,10 +119,10 @@ - + - + Qt::Vertical diff --git a/src/webview.cpp b/src/webview.cpp index a4ca8211..95fcdf83 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -126,6 +126,11 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) { KUrl srcUrl = reply->url(); QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); + QFile file(path); + if (file.exists()) + { + path = KFileDialog::getOpenFileName(); + } KUrl destUrl = KUrl(path); BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); return; @@ -312,6 +317,11 @@ void WebView::downloadRequested(const QNetworkRequest &request) { KUrl srcUrl = request.url(); QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); + QFile file(path); + if (file.exists()) + { + path = KFileDialog::getOpenFileName(); + } KUrl destUrl = KUrl(path); BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); } -- cgit v1.2.1 From 641b34b0c2de8ccdf250bc8a8d95cfb0ea4a1f45 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 01:56:58 +0100 Subject: rekonq 0.0.3 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e53eef3c..5fc3d30e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@ static const char description[] = I18N_NOOP("KDE Browser Webkit Based"); -static const char version[] = "0.0.2"; +static const char version[] = "0.0.3"; int main(int argc, char **argv) { -- cgit v1.2.1 From 3afb0217d09a012c4a65740155b232c67fef4990 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 01:57:19 +0100 Subject: Fixed download system about downloading files with the same name. --- src/download.cpp | 8 +++++++- src/webview.cpp | 10 ---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/download.cpp b/src/download.cpp index d1ed296a..e4ee556d 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -58,6 +58,13 @@ void Download::slotResult(KJob * job) { kDebug(5001) << "Downloading successfully finished: " << m_destUrl.url(); QFile destFile(m_destUrl.path()); + int n = 1; + while( destFile.exists() ) + { + QString fn = QFile(m_destUrl.path()).fileName(); + destFile.setFileName( fn + "." + QString::number(n) ); + n++; + } if ( destFile.open(QIODevice::WriteOnly | QIODevice::Text) ) { destFile.write(m_data); @@ -69,7 +76,6 @@ void Download::slotResult(KJob * job) case KIO::ERR_FILE_ALREADY_EXIST: { kDebug(5001) << "ERROR - File already exists"; - // QFile file(m_destUrl.path()); m_data = 0; break; } diff --git a/src/webview.cpp b/src/webview.cpp index 95fcdf83..a4ca8211 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -126,11 +126,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) { KUrl srcUrl = reply->url(); QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); - QFile file(path); - if (file.exists()) - { - path = KFileDialog::getOpenFileName(); - } KUrl destUrl = KUrl(path); BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); return; @@ -317,11 +312,6 @@ void WebView::downloadRequested(const QNetworkRequest &request) { KUrl srcUrl = request.url(); QString path = ReKonfig::downloadDir() + QString("/") + srcUrl.fileName(); - QFile file(path); - if (file.exists()) - { - path = KFileDialog::getOpenFileName(); - } KUrl destUrl = KUrl(path); BrowserApplication::instance()->downloadUrl( srcUrl, destUrl ); } -- cgit v1.2.1 From 75abb0c0190b991b0766f56e4823666f9c7326c4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 09:34:13 +0100 Subject: Code Optimization --- src/download.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/download.cpp b/src/download.cpp index e4ee556d..627b11b2 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -51,7 +51,6 @@ void Download::slotData(KIO::Job *job, const QByteArray& data) void Download::slotResult(KJob * job) { - kDebug(5001); switch (job->error()) { case 0://The download has finished @@ -59,9 +58,9 @@ void Download::slotResult(KJob * job) kDebug(5001) << "Downloading successfully finished: " << m_destUrl.url(); QFile destFile(m_destUrl.path()); int n = 1; + QString fn = destFile.fileName(); while( destFile.exists() ) { - QString fn = QFile(m_destUrl.path()).fileName(); destFile.setFileName( fn + "." + QString::number(n) ); n++; } @@ -75,12 +74,12 @@ void Download::slotResult(KJob * job) } case KIO::ERR_FILE_ALREADY_EXIST: { - kDebug(5001) << "ERROR - File already exists"; + kWarning() << "ERROR - File already exists"; m_data = 0; break; } default: - kDebug(5001) << "We are sorry to say you, that there were errors while downloading :("; + kWarning() << "We are sorry to say you, that there were errors while downloading :("; m_data = 0; break; } -- cgit v1.2.1 From 1dacbee9f2982947664559f3f7d998a89e768b73 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 09:50:23 +0100 Subject: Removed unuseful squeezelabel class --- src/CMakeLists.txt | 3 +-- src/squeezelabel.cpp | 39 --------------------------------------- src/squeezelabel.h | 39 --------------------------------------- 3 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 src/squeezelabel.cpp delete mode 100644 src/squeezelabel.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b18f6275..19355e7b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,8 +15,7 @@ SET( rekonq_SRCS urlbar.cpp findbar.cpp searchbar.cpp - settings.cpp - squeezelabel.cpp + settings.cpp webview.cpp main.cpp ) diff --git a/src/squeezelabel.cpp b/src/squeezelabel.cpp deleted file mode 100644 index 7aa9e177..00000000 --- a/src/squeezelabel.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* ============================================================ - * - * This file is a part of the rekonq project - * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved - * Copyright (C) 2008 by Andrea Diamantini - * - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General - * Public License as published by the Free Software Foundation; - * either version 2, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * ============================================================ */ - -#include "squeezelabel.h" - -SqueezeLabel::SqueezeLabel(QWidget *parent) : QLabel(parent) -{ -} - -void SqueezeLabel::paintEvent(QPaintEvent *event) -{ - QFontMetrics fm = fontMetrics(); - if (fm.width(text()) > contentsRect().width()) { - QString elided = fm.elidedText(text(), Qt::ElideMiddle, width()); - QString oldText = text(); - setText(elided); - QLabel::paintEvent(event); - setText(oldText); - } else { - QLabel::paintEvent(event); - } -} diff --git a/src/squeezelabel.h b/src/squeezelabel.h deleted file mode 100644 index a7906270..00000000 --- a/src/squeezelabel.h +++ /dev/null @@ -1,39 +0,0 @@ -/* ============================================================ - * - * This file is a part of the rekonq project - * - * Copyright (C) 2007-2008 Trolltech ASA. All rights reserved - * Copyright (C) 2008 by Andrea Diamantini - * - * - * This program is free software; you can redistribute it - * and/or modify it under the terms of the GNU General - * Public License as published by the Free Software Foundation; - * either version 2, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the - * GNU General Public License for more details. - * - * ============================================================ */ - -#ifndef SQUEEZELABEL_H -#define SQUEEZELABEL_H - -#include - -class SqueezeLabel : public QLabel -{ - Q_OBJECT - -public: - SqueezeLabel(QWidget *parent = 0); - -protected: - void paintEvent(QPaintEvent *event); - -}; - -#endif // SQUEEZELABEL_H - -- cgit v1.2.1 From a58e32712e675fd746317c3a72118d3351a4d3bb Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 2 Feb 2009 09:50:58 +0100 Subject: updated version info --- CMakeLists.txt | 2 +- rekonq.SlackBuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d9ef464d..9578c73d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ PROJECT( rekonq ) # rekonq version SET(REKONQ_MAJOR_VERSION "0") SET(REKONQ_MINOR_VERSION "0") -SET(REKONQ_PATCH_VERSION "2") +SET(REKONQ_PATCH_VERSION "3") SET(REKONQ_VERSION_STRING "${REKONQ_MAJOR_VERSION}.${REKONQ_MINOR_VERSION}.${REKONQ_PATCH_VERSION}" diff --git a/rekonq.SlackBuild b/rekonq.SlackBuild index eefdc684..000314ee 100644 --- a/rekonq.SlackBuild +++ b/rekonq.SlackBuild @@ -4,7 +4,7 @@ # Written by Andrea Diamantini - adjam7_AT_gmail_DOT_com NAME=rekonq -VERSION=0.0.2 +VERSION=0.0.3 ARCH=${ARCH:-i486} BUILD=1ad -- cgit v1.2.1 From 0ee5dac23e4b687755c18dd68bcc47625bc59532 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 8 Feb 2009 18:53:48 +0100 Subject: Ready for 0.0.3 release. Last fixes.. --- CMakeLists.txt | 2 +- src/mainwindow.cpp | 7 +++++-- src/rekonqui.rc | 6 +++--- src/settings.cpp | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9578c73d..56d8f9b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,7 @@ IF(REKONQ_CAN_BE_COMPILED) ADD_SUBDIRECTORY( icons ) ADD_SUBDIRECTORY( data ) ADD_SUBDIRECTORY( htmls ) - ADD_SUBDIRECTORY( doc ) +# ADD_SUBDIRECTORY( doc ) ENDIF(REKONQ_CAN_BE_COMPILED) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 294bf589..ecd5e452 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -73,8 +73,7 @@ MainWindow::MainWindow() // updating rekonq configuration slotUpdateConf(); -// QTimer::singleShot(0, this, SLOT( postLaunch() ) ); - + // creating a new tab m_view->newTab(); @@ -137,6 +136,10 @@ MainWindow::MainWindow() KToolBar *bmToolbar = toolBar("bookmarksToolBar"); m_bookmarksProvider->provideBmToolbar( bmToolbar ); + // setting up toolbars to NOT have context menu enabled + setContextMenuPolicy( Qt::ActionsContextMenu ); + + // search bar m_searchBar = new SearchBar( this ); connect(m_searchBar, SIGNAL(search(const KUrl&)), this, SLOT(loadUrl(const KUrl&))); navigationBar->addWidget(m_searchBar); diff --git a/src/rekonqui.rc b/src/rekonqui.rc index 861f8538..0e372e82 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,5 +1,5 @@ - + &File @@ -59,7 +59,7 @@ -Main Toolbar +Main Toolbar @@ -67,7 +67,7 @@ -Bookmarks Toolbar + diff --git a/src/settings.cpp b/src/settings.cpp index 2181d0fd..7ab6e3dc 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -133,9 +133,11 @@ void SettingsDialog::readConfig() // ======= Fonts QFont stdFont = ReKonfig::standardFont(); d->fontsUi.standardFontChooser->setFont(stdFont, false); + d->fontsUi.standardFontChooser->setSampleText( stdFont.family() + " " + QString::number(stdFont.pointSize()) ); connect(d->fontsUi.standardFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); QFont fxFont = ReKonfig::fixedFont(); d->fontsUi.fixedFontChooser->setFont(fxFont, true); + d->fontsUi.fixedFontChooser->setSampleText( fxFont.family() + " " + QString::number(fxFont.pointSize()) ); connect(d->fontsUi.fixedFontChooser, SIGNAL(fontSelected(QFont)),this, SLOT(saveSettings())); // ======= Proxy -- cgit v1.2.1 From c41a1e2fce817725adfa4e6c45073103965f52c4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 8 Feb 2009 18:57:45 +0100 Subject: Updating --- ChangeLog | 6 +++--- TODO | 46 ++++++---------------------------------------- 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49e7930f..473a1d76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,10 @@ 0.0.3 - ~80% ported to KDE4 -- KConfigXT support +- use KConfigXT - improved text search bar - fixed all "web actions" -- adopted KDE download system -- new bookmark toolbar +- KDE download system +- new bookmark toolbar (1st implementation) 0.0.2 - 70% ported to KDE4 diff --git a/TODO b/TODO index 2726e1b7..ce205bcd 100644 --- a/TODO +++ b/TODO @@ -1,49 +1,15 @@ -Road to 0.0.1 (first release) -+ ESC event findbar -+ let findbar work -+ bookmarks (share konqueror's) -+ some porting - -ROAD to 0.0.2 (second release) -+ setting rekonq with KConfigDialog ("rekonfig") -- configure shortcuts -- better find toolbar -- fixed search bar width - -ROAD to 0.0.3 (third release) -+ mainview -+ KConfigXT -+ downloadSystem-- -- documentation++ +To 0.0.4 +- improve DOCUMENTATION +- fix docs - autosave-- - dbus support - new application class!! - -+ REMOVE ALL FOCUS TO QStackedWidget in mainview!! -+ improve searchbar features -+ bookmarks line ---- fix sessions && ui dimension ---- fix KConfigXT use (proxy, fonts and so on..) - -+ ---------------------------------------------------- - -NEXT.. -+ system SELECT ALL -- better FULL SCREEN -- color progress +- improve bookmarks toolbar +- fix KConfigXT (fonts) +- color url_line_edit progress - contextMenu in searchbar to set different search engines - KDE proxy support -- KcookieJar - - QWebPluginFactory subclass to load KParts into QtWebKit. - -- dbus support - - kget support - - kwallet support - - kwrite support ( optional, to view HTML code ) - -- Kpart ?? - + ------------------------ -- cgit v1.2.1 From 8213829a830cabc2d9b44a43bba00f1dae77adc5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 14 Feb 2009 12:06:54 +0100 Subject: Preliminary flash support --- src/CMakeLists.txt | 1 + src/webview.cpp | 13 ++++++++++++- src/webview.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19355e7b..6fa9bd1c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,7 @@ TARGET_LINK_LIBRARIES( rekonq ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${QT_QTWEBKIT_LIBRARY} + ${QT_QTUITOOLS_LIBRARY} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ) diff --git a/src/webview.cpp b/src/webview.cpp index a4ca8211..5d317597 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -42,7 +42,8 @@ #include #include #include - +// --- +#include WebPage::WebPage(QObject *parent) : QWebPage(parent) @@ -120,6 +121,16 @@ QWebPage *WebPage::createWindow(QWebPage::WebWindowType type) } +QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues) +{ + Q_UNUSED(url); + Q_UNUSED(paramNames); + Q_UNUSED(paramValues); + QUiLoader loader; + return loader.createWidget(classId, view()); +} + + void WebPage::handleUnsupportedContent(QNetworkReply *reply) { if (reply->error() == QNetworkReply::NoError) diff --git a/src/webview.h b/src/webview.h index 6710aac4..6892fbd4 100644 --- a/src/webview.h +++ b/src/webview.h @@ -50,6 +50,7 @@ public: protected: bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); QWebPage *createWindow(QWebPage::WebWindowType type); + QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); private slots: void handleUnsupportedContent(QNetworkReply *reply); -- cgit v1.2.1