Merge ubiquity:no-going-back-from-timezone into ubiquity:master

Proposed by Iain Lane
Status: Merged
Merged at revision: c1cb3268170c57eb88ebb48de14634491ebd8b58
Proposed branch: ubiquity:no-going-back-from-timezone
Merge into: ubiquity:master
Diff against target: 79 lines (+30/-2)
3 files modified
ubiquity/frontend/gtk_ui.py (+26/-1)
ubiquity/frontend/kde_ui.py (+2/-1)
ubiquity/gsettings.py (+2/-0)
Reviewer Review Type Date Requested Status
Ubuntu Installer Team Pending
Review via email: mp+357618@code.launchpad.net

Description of the change

Turn off the back button forever once we are past the partman step

See the commit message for the full rationale.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1799097

Only merge one of this and https://code.launchpad.net/~ubuntu-installer/ubiquity/+git/ubiquity/+merge/357619

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/ubiquity/frontend/gtk_ui.py b/ubiquity/frontend/gtk_ui.py
index e63046c..ee8b462 100644
--- a/ubiquity/frontend/gtk_ui.py
+++ b/ubiquity/frontend/gtk_ui.py
@@ -587,6 +587,29 @@ class Wizard(BaseFrontend):
587587
588 gsettings.set(gs_schema, gs_key, gs_value)588 gsettings.set(gs_schema, gs_key, gs_value)
589589
590 def disable_screen_blanking(self):
591 gs_schema = 'org.gnome.desktop.session'
592 gs_key = 'idle-delay'
593 gs_previous = '%s/%s' % (gs_schema, gs_key)
594 if gs_previous in self.gsettings_previous:
595 return
596
597 gs_value = gsettings.get(gs_schema, gs_key)
598 self.gsettings_previous[gs_previous] = gs_value
599
600 if gs_value:
601 gsettings.set(gs_schema, gs_key, 0)
602
603 atexit.register(self.enable_screen_blanking)
604
605 def enable_screen_blanking(self):
606 gs_schema = 'org.gnome.desktop.session'
607 gs_key = 'idle-delay'
608 gs_previous = '%s/%s' % (gs_schema, gs_key)
609 gs_value = self.gsettings_previous[gs_previous]
610
611 gsettings.set(gs_schema, gs_key, gs_value)
612
590 def disable_powermgr(self):613 def disable_powermgr(self):
591 gs_schema = 'org.gnome.settings-daemon.plugins.power'614 gs_schema = 'org.gnome.settings-daemon.plugins.power'
592 gs_key = 'active'615 gs_key = 'active'
@@ -738,6 +761,7 @@ class Wizard(BaseFrontend):
738761
739 self.disable_volume_manager()762 self.disable_volume_manager()
740 self.disable_screensaver()763 self.disable_screensaver()
764 self.disable_screen_blanking()
741 self.disable_powermgr()765 self.disable_powermgr()
742766
743 if 'UBIQUITY_ONLY' in os.environ:767 if 'UBIQUITY_ONLY' in os.environ:
@@ -1351,7 +1375,8 @@ class Wizard(BaseFrontend):
13511375
1352 if self.pagesindex == 0:1376 if self.pagesindex == 0:
1353 self.allow_go_backward(False)1377 self.allow_go_backward(False)
1354 elif self.pages[self.pagesindex - 1].module.NAME == 'partman':1378 elif 'partman' in [page.module.NAME for page in
1379 self.pages[:self.pagesindex - 1]]:
1355 # We're past partitioning. Unless the install fails, there is no1380 # We're past partitioning. Unless the install fails, there is no
1356 # going back.1381 # going back.
1357 self.allow_go_backward(False)1382 self.allow_go_backward(False)
diff --git a/ubiquity/frontend/kde_ui.py b/ubiquity/frontend/kde_ui.py
index 9a285a5..d1a363d 100644
--- a/ubiquity/frontend/kde_ui.py
+++ b/ubiquity/frontend/kde_ui.py
@@ -950,7 +950,8 @@ class Wizard(BaseFrontend):
950950
951 if self.pagesindex == 0:951 if self.pagesindex == 0:
952 self.allow_go_backward(False)952 self.allow_go_backward(False)
953 elif self.pages[self.pagesindex - 1].module.NAME == 'partman':953 elif 'partman' in [page.module.NAME for page in
954 self.pages[:self.pagesindex - 1]]:
954 # We're past partitioning. Unless the install fails, there is no955 # We're past partitioning. Unless the install fails, there is no
955 # going back.956 # going back.
956 self.allow_go_backward(False)957 self.allow_go_backward(False)
diff --git a/ubiquity/gsettings.py b/ubiquity/gsettings.py
index 7f06f6e..7b1cced 100644
--- a/ubiquity/gsettings.py
+++ b/ubiquity/gsettings.py
@@ -68,6 +68,8 @@ def get(schema, key, user=None):
68 # Parse ints68 # Parse ints
69 if value.isdigit():69 if value.isdigit():
70 return int(value)70 return int(value)
71 if value.startswith('uint32'): # uint32 100
72 return int(value.split()[1])
7173
72 # Parse booleans74 # Parse booleans
73 if value == 'false':75 if value == 'false':

Subscribers

People subscribed via source and target branches