Make 'configure generators' dialog open with current generator selected
AbandonedPublic

Authored by sander on Aug 13 2018, 8:58 PM.

Details

Reviewers
None
Group Reviewers
Okular
Summary

The 'current generators' dialog has a page for each generator. The choice of which of these pages is visible when the dialog is first opened seems to be random (or at least I don't see the pattern). This patch makes sure that the currently running generator determines which page is opened, because in most cases people will want to set preferences for the generator they are currently using.

Unfortunately, I had to change the interface of Okular::ConfigInterface for this. Speak up if you know a better way.

Test Plan
  1. Open Okular with a pdf file
  2. Open Settings -> Configure Backends
  3. Notice how the dialog opens with the pdf settings right away
  4. Open (e.g.) a markdown file
  5. Open Settings -> Configure Backends
  6. Notice how the dialog opens with the markdown settings right away

Diff Detail

Repository
R223 Okular
Lint
Lint Skipped
Unit
Unit Tests Skipped
sander created this revision.Aug 13 2018, 8:58 PM
Restricted Application added a project: Okular. · View Herald TranscriptAug 13 2018, 8:58 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
sander requested review of this revision.Aug 13 2018, 8:58 PM
aacid added a subscriber: aacid.Aug 14 2018, 8:58 AM

I made https://phabricator.kde.org/D14820 (you need latest branch since i did a change to make the sorting at least stable in the config dialog) which doesn't need changing the API, which i think it's better since it won't break plugins that may exist outside the okular repository.

Can you give it a look/try?

I tested https://phabricator.kde.org/D14820 and it works nicely. Thanks for your effort! I also like the fact that the entries get sorted now.

sander abandoned this revision.Aug 14 2018, 9:54 AM