mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
allow to turn on/off the places panel by the menu
svn path=/trunk/KDE/kdebase/apps/; revision=653936
This commit is contained in:
parent
93a1a2c8b0
commit
b72bd12276
2 changed files with 6 additions and 3 deletions
|
@ -1265,7 +1265,6 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
SidebarPage* infoWidget = new InfoSidebarPage(infoDock);
|
SidebarPage* infoWidget = new InfoSidebarPage(infoDock);
|
||||||
infoDock->setWidget(infoWidget);
|
infoDock->setWidget(infoWidget);
|
||||||
|
|
||||||
|
|
||||||
infoDock->toggleViewAction()->setText(i18n("Show Information Panel"));
|
infoDock->toggleViewAction()->setText(i18n("Show Information Panel"));
|
||||||
actionCollection()->addAction("show_info_panel", infoDock->toggleViewAction());
|
actionCollection()->addAction("show_info_panel", infoDock->toggleViewAction());
|
||||||
|
|
||||||
|
@ -1273,7 +1272,7 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
connectSidebarPage(infoWidget);
|
connectSidebarPage(infoWidget);
|
||||||
|
|
||||||
// setup "Tree View"
|
// setup "Tree View"
|
||||||
QDockWidget* treeViewDock = new QDockWidget(i18n("Folders")); // TODO: naming?
|
QDockWidget* treeViewDock = new QDockWidget(i18n("Folders"));
|
||||||
treeViewDock->setObjectName("treeViewDock");
|
treeViewDock->setObjectName("treeViewDock");
|
||||||
treeViewDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
treeViewDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||||
TreeViewSidebarPage* treeWidget = new TreeViewSidebarPage(treeViewDock);
|
TreeViewSidebarPage* treeWidget = new TreeViewSidebarPage(treeViewDock);
|
||||||
|
@ -1297,6 +1296,10 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
KFilePlacesView *listView = new KFilePlacesView(placesDock);
|
KFilePlacesView *listView = new KFilePlacesView(placesDock);
|
||||||
placesDock->setWidget(listView);
|
placesDock->setWidget(listView);
|
||||||
listView->setModel(DolphinSettings::instance().placesModel());
|
listView->setModel(DolphinSettings::instance().placesModel());
|
||||||
|
|
||||||
|
placesDock->toggleViewAction()->setText(i18n("Show Places Panel"));
|
||||||
|
actionCollection()->addAction("show_places_panel", placesDock->toggleViewAction());
|
||||||
|
|
||||||
addDockWidget(Qt::LeftDockWidgetArea, placesDock);
|
addDockWidget(Qt::LeftDockWidgetArea, placesDock);
|
||||||
connect(listView, SIGNAL(urlChanged(KUrl)),
|
connect(listView, SIGNAL(urlChanged(KUrl)),
|
||||||
this, SLOT(changeUrl(KUrl)));
|
this, SLOT(changeUrl(KUrl)));
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<Menu name="panels">
|
<Menu name="panels">
|
||||||
<text>Panels</text>
|
<text>Panels</text>
|
||||||
<Action name="show_bookmarks_panel" />
|
<Action name="show_places_panel" />
|
||||||
<Action name="show_info_panel" />
|
<Action name="show_info_panel" />
|
||||||
<Action name="show_folders_panel" />
|
<Action name="show_folders_panel" />
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
Loading…
Reference in a new issue