]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Finally! Dock widgets can be hidden from the view menu since
authorKevin Ottens <ervin@kde.org>
Wed, 6 Dec 2006 15:37:51 +0000 (15:37 +0000)
committerKevin Ottens <ervin@kde.org>
Wed, 6 Dec 2006 15:37:51 +0000 (15:37 +0000)
KActionCollection now can take QAction*.

svn path=/trunk/playground/utils/dolphin/; revision=611064

src/dolphinmainwindow.cpp
src/dolphinui.rc

index e2696847286890aa709605988b5e481250641196..fdda8d9e69155dbaeb1678a8b1f0ee6be4a3e505 100644 (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);
 }
 
index 5db6ff9a9d7914624a7a3f9175519cb6e5b964c7..3a15a6d6667afb5d89d7608893e5b3ae82c44319 100644 (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">