Add "Create New" menu to "Control" button
ClosedPublic

Authored by ngraham on Sep 19 2018, 11:06 PM.

Details

Summary

Right now, the "Create New" menu's functionality is not visible with Dolphin's default layout that has a Control button instead of a menubar. This patch adds that functionality to the Control button's menu so that it's actually discoverable for regular users.

Test Plan

All menu items work.

Diff Detail

Repository
R318 Dolphin
Branch
create-new-menu-in-control-button (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3511
Build 3529: arc lint + arc unit
ngraham created this revision.Sep 19 2018, 11:06 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptSep 19 2018, 11:06 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
ngraham requested review of this revision.Sep 19 2018, 11:06 PM
ngraham edited the summary of this revision. (Show Details)Sep 19 2018, 11:07 PM
ngraham edited the test plan for this revision. (Show Details)

Btw we broke the "Create New" button on read-only folders. Time to write an unit test for that...

src/dolphinmainwindow.cpp
934

Why here though? "Create New" belongs to the File menu, so it should probably be the very first thing in the Control menu.

My thinking was that it's sort of a tool so it could go next to the tools menu, but I can move it higher up.

ngraham updated this revision to Diff 42906.Oct 5 2018, 4:12 AM

Move the Create New submenu to the top

ngraham edited the test plan for this revision. (Show Details)Oct 5 2018, 4:13 AM
anthonyfieroni added inline comments.
src/dolphinmainwindow.cpp
867

Why this?

I like the idea, it makes it more easily discoverable if you're using touch. Not that I'm advocating cluttering this menu with a million things, but something to think about are the other functions in the right-click menu. Just thinking out loud.

ngraham updated this revision to Diff 43037.Oct 7 2018, 1:37 PM
ngraham marked 2 inline comments as done.

No need to set setDelayed->(false) on this since it's not in a toolbar

elvisangelaccio requested changes to this revision.Oct 7 2018, 7:57 PM
elvisangelaccio added inline comments.
src/dolphinmainwindow.cpp
863–870

Why duplicate the menu initialization? It's enough to use this one-liner:

menu->addMenu(m_newFileMenu->menu());
This revision now requires changes to proceed.Oct 7 2018, 7:57 PM
ngraham updated this revision to Diff 43094.Oct 7 2018, 11:27 PM

"Simplify, simplify"

ngraham marked an inline comment as done.Oct 7 2018, 11:28 PM
elvisangelaccio accepted this revision.Oct 8 2018, 7:10 PM
This revision is now accepted and ready to land.Oct 8 2018, 7:10 PM
ngraham closed this revision.Oct 9 2018, 9:12 PM