1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +00:00

Finally! Dock widgets can be hidden from the view menu since

KActionCollection now can take QAction*.

svn path=/trunk/playground/utils/dolphin/; revision=611064
This commit is contained in:
Kevin Ottens 2006-12-06 15:37:51 +00:00
parent 8c7e12b1f7
commit 197f9a4280
2 changed files with 15 additions and 2 deletions

View File

@ -1593,15 +1593,25 @@ void DolphinMainWindow::clearStatusBar()
void DolphinMainWindow::setupDockWidgets()
{
QDockWidget *shortcutsDock = new QDockWidget(i18n("Shortcuts"));
shortcutsDock->setObjectName("shortcutsDock");
shortcutsDock->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
shortcutsDock->setWidget(new BookmarksSidebarPage(this));
shortcutsDock->toggleViewAction()->setObjectName("show_shortcuts_pane");
shortcutsDock->toggleViewAction()->setText(i18n("Show Shortcuts Panel"));
actionCollection()->insert(shortcutsDock->toggleViewAction());
addDockWidget(Qt::LeftDockWidgetArea, shortcutsDock);
QDockWidget *infoDock = new QDockWidget(i18n("Information"));
infoDock->setObjectName("infoDock");
infoDock->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
infoDock->setWidget(new InfoSidebarPage(this));
infoDock->toggleViewAction()->setObjectName("show_info_pane");
infoDock->toggleViewAction()->setText(i18n("Show Information Panel"));
actionCollection()->insert(infoDock->toggleViewAction());
addDockWidget(Qt::RightDockWidgetArea, infoDock);
}

View File

@ -46,6 +46,9 @@
<Action name="editable_location" />
<Action name="edit_location" />
</Menu>
<Action name="show_shortcuts_pane" />
<Action name="show_info_pane" />
<Separator/>
<Action name="view_properties" />
</Menu>
<Menu name="tools">