summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-03-11 00:07:49 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-03-11 00:07:49 +0100
commit963fc785301e378096fc53648e972c57a962c0dd (patch)
treee190b311da41f6b2c1c0e3e95f3d1be7511c63d7
parentSome fixes (diff)
downloadrekonq-963fc785301e378096fc53648e972c57a962c0dd.tar.xz
Some fixes on MainWindow
-rw-r--r--src/mainwindow.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 98ce7d99..f28450fe 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -67,18 +67,15 @@
MainWindow::MainWindow()
: KXmlGuiWindow()
- , m_view(0)
- , m_bookmarksProvider(0)
+ , m_view( new MainView(this) )
+ , m_bookmarksProvider( new BookmarksProvider(this) )
{
- m_view = new MainView(this);
- m_bookmarksProvider = new BookmarksProvider(this);
-
// accept dnd
setAcceptDrops(true);
// updating rekonq configuration
slotUpdateConf();
-
+
// creating a centralWidget containing m_view and the hidden findbar
QWidget *centralWidget = new QWidget;
QVBoxLayout *layout = new QVBoxLayout;
@@ -92,6 +89,13 @@ MainWindow::MainWindow()
centralWidget->setLayout(layout);
setCentralWidget(centralWidget);
+ // setting size policies
+ QRect desktopRect = QApplication::desktop()->screenGeometry();
+ QSize size = desktopRect.size() * 0.8;
+ setMinimumSize( size );
+
+ setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+
// connect signals and slots
connect(m_view, SIGNAL( loadUrlPage(const KUrl &) ), this, SLOT( loadUrl(const KUrl &) ) );
connect(m_view, SIGNAL( setCurrentTitle(const QString &)), this, SLOT( slotUpdateWindowTitle(const QString &) ) );
@@ -139,7 +143,7 @@ MainWindow::MainWindow()
m_bookmarksProvider->provideBmToolbar( bmToolbar );
// setting up toolbars to NOT have context menu enabled
- setContextMenuPolicy( Qt::ActionsContextMenu );
+ setContextMenuPolicy( Qt::DefaultContextMenu );
// search bar
m_searchBar = new SearchBar( this );
@@ -296,7 +300,6 @@ void MainWindow::setupHistoryMenu()
}
-// TODO FIXME
void MainWindow::slotUpdateConf()
{
// ============== General ==================