Make ArkViewer a KPart mainwindow
ClosedPublic

Authored by elvisangelaccio on Jun 3 2017, 3:35 PM.

Details

Summary

This allows us to call createGUI() on the KPart we are embedding. As a
side effect, we are now able to show the popup menu of the ArkPart,
which is a stand-alone popup menu created by kxmlgui, when previewing a
nested archive in the ArkViewer.

By using a KMainWindow (instead of a QDialog) we also gain some
features, for example we get size restoring for free (thanks to
setAutoSaveSettings()), without the need of manually using
KWindowConfig.

BUG: 380439
FIXED-IN: 17.07.80

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio created this revision.Jun 3 2017, 3:35 PM
Restricted Application added a project: Ark. · View Herald TranscriptJun 3 2017, 3:35 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
  • Fixup i18n in the ui file.
elvisangelaccio edited the summary of this revision. (Show Details)Jun 3 2017, 3:46 PM
fvogt edited edge metadata.Jun 3 2017, 6:39 PM

Tested, works! Very useful to have a more complete kpart as previewer.

I noticed one oddity though: The "Archive" menu (top left) does not do anything when previewing text files.

Yeah the Archive menu should not even be there.

  • Added a minimal .rc file, otherwise kxmlgui will default on arkui.rc which we don't want here.
  • Use default "Show Toolbar" button in the Settings menu.
fvogt accepted this revision.Jun 4 2017, 3:28 PM
This revision is now accepted and ready to land.Jun 4 2017, 3:28 PM
This revision was automatically updated to reflect the committed changes.