preferences: Add methods to reload settings pages and remove a section
ClosedPublic

Authored by cfoch on Aug 18 2017, 9:26 PM.

Diff Detail

Repository
rPTV Pitivi
Branch
T3193-pluginmanager
aleb requested changes to this revision.Aug 19 2017, 1:00 AM
aleb added inline comments.
pitivi/dialogs/prefs.py
823

Why is this done by the PluginPreferencesPage and not by the PreferencesDialog? I think it would be much better without this "preference-added" signal. Give it a try.

This revision now requires changes to proceed.Aug 19 2017, 1:00 AM
aleb requested changes to this revision.Aug 22 2017, 8:32 AM
aleb added inline comments.
pitivi/dialogs/prefs.py
67

Maybe move this in the run() method, since there you unset it? It would be more symmetric..

132

This if-else can be replaced by cls._instance._remove_page

209

If there is nothing to remove, it's all fine? I would remove this raise.

This revision now requires changes to proceed.Aug 22 2017, 8:32 AM
cfoch added inline comments.Aug 22 2017, 2:37 PM
pitivi/dialogs/prefs.py
67

what about putting this on del method ?

cfoch added inline comments.Aug 22 2017, 2:42 PM
pitivi/dialogs/prefs.py
67

Sorry, I meant. What about keeping " PreferencesDialog._instance = self" as it is and setting "PreferencesDialog._instance = None" in the del method instead of the run() method. It makes more sense to me, since you create an instance in init and delete it on del

aleb requested changes to this revision.Aug 24 2017, 7:29 PM
aleb added inline comments.
pitivi/dialogs/prefs.py
126

Remove this, and check at the top if cls._instance:

This revision now requires changes to proceed.Aug 24 2017, 7:29 PM
cfoch updated this revision to Diff 6371.Aug 24 2017, 7:49 PM
cfoch marked an inline comment as done.
aleb accepted this revision.Aug 24 2017, 7:52 PM
This revision is now accepted and ready to land.Aug 24 2017, 7:52 PM
This revision was automatically updated to reflect the committed changes.