Use custom icon border context menu, when no mark is present
AbandonedPublic

Authored by croick on Aug 6 2017, 8:51 AM.

Details

Reviewers
kfunk
Group Reviewers
KDevelop
Summary
  • sets selection of breakpoint to first position in menu
  • show icons for breakpoint and bookmark

before:

after:

Test Plan
  • setting and unsetting of (default) markers works like before

Diff Detail

Repository
R33 KDevPlatform
Branch
iconborder
Lint
No Linters Available
Unit
No Unit Test Coverage
croick created this revision.Aug 6 2017, 8:51 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptAug 6 2017, 8:51 AM
croick edited the summary of this revision. (Show Details)Aug 6 2017, 8:53 AM
kfunk requested changes to this revision.Aug 8 2017, 9:43 PM
kfunk added a subscriber: kfunk.
kfunk added inline comments.
debugger/breakpoint/breakpointmodel.cpp
168

That menu is already provided by KTextEditor, right? This adds half-duplicated code from KTextEditor (cf. KateIconBorder::showMarkMenu); I'm not sure this is something we'd like to maintain...

I don't fully understand how this adds the icons to the [ ] Breakpoint and [ ] Bookmark actios on the top-level menu though(?), could you elaborate?

I'd be happier if we could simplify this patch more.

This revision now requires changes to proceed.Aug 8 2017, 9:43 PM
croick added a comment.Aug 9 2017, 7:37 PM

One solution could be to provide the icons in KateIconBorder::showMarkMenu directly, which I think would be an improvement in any case. What do you think?

debugger/breakpoint/breakpointmodel.cpp
168

Yes, basically it's the same menu in KTextEditor but with icons.

The icons are displayed, because since 3b202d26f2ee clicks on no marks are also emitted and BreakpointModel::markContextMenuRequested now only returns unhandled when further mark types are editable. Before, BreakpointModel didn't even notice.

kfunk added a comment.Aug 9 2017, 8:39 PM

One solution could be to provide the icons in KateIconBorder::showMarkMenu directly, which I think would be an improvement in any case. What do you think?

Yes, I think that'd be the better solution.

In D7158#134195, @kfunk wrote:

One solution could be to provide the icons in KateIconBorder::showMarkMenu directly, which I think would be an improvement in any case. What do you think?

Yes, I think that'd be the better solution.

And much simpler, although bookmarks are in first position and there is no separating line... I will abandon this revision as soon as D7458 is accepted.

croick abandoned this revision.Aug 22 2017, 9:14 PM

5118d39bb24e replaces this patch