Merge lp:~seb128/software-properties/dialog-enable-proposed into lp:software-properties

Proposed by Sebastien Bacher
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~seb128/software-properties/dialog-enable-proposed
Merge into: lp:software-properties
Diff against target: 43 lines (+24/-1)
1 file modified
softwareproperties/gtk/SoftwarePropertiesGtk.py (+24/-1)
To merge this branch: bzr merge lp:~seb128/software-properties/dialog-enable-proposed
Reviewer Review Type Date Requested Status
Iain Lane Pending
Ubuntu Core Development Team Pending
Review via email: mp+286213@code.launchpad.net

Commit message

Display a warning dialog and request a confirmation when
enabling a proposed repository. Since those updates can create issues
they shouldn't be too easy to enable without knowing what you are doing.

Description of the change

Display a warning dialog and request a confirmation when
enabling a proposed repository. Since those updates can create issues
they shouldn't be too easy to enable without knowing what you are doing.

To post a comment you must log in.
Revision history for this message
Will Cooke (willcooke) wrote :

Please hold, pending input from Design on the copy.

Revision history for this message
Brian Murray (brian-murray) wrote :

I didn't look too closely to see if this is possible, but I wonder if the confirmation dialog should be different if the release is still in development. Ideally, enabling -proposed wouldn't be an option for the development release in the GUI so maybe this is moot.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> I didn't look too closely to see if this is possible, but I wonder if the confirmation dialog
> should be different if the release is still in development.

Yeah, we might not display that control in that case

> Ideally, enabling -proposed wouldn't be an option for the development release in the GUI so maybe
> this is moot.

The warning is intended for stable series as far as I understand it, proposed SRUs are less likely to be an issue than devel-proposed but still cause confusion and problems for users, so I think the change is still relevant

Revision history for this message
Will Cooke (willcooke) wrote :

From Design on the text:

<title> Warning: Enabling updates from proposed can be dangerous </title>

<body> This repository is only for testing updates and providing development feedback. Enabling may introduce instability. </body>

953. By Sebastien Bacher

Display a warning dialog and request a confirmation when
enabling a proposed repository. Since those updates can create issues
they shouldn't be too easy to enable without knowing what you are doing.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Unmerged revisions

953. By Sebastien Bacher

Display a warning dialog and request a confirmation when
enabling a proposed repository. Since those updates can create issues
they shouldn't be too easy to enable without knowing what you are doing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'softwareproperties/gtk/SoftwarePropertiesGtk.py'
--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2015-11-01 12:39:02 +0000
+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2016-02-17 10:48:44 +0000
@@ -338,8 +338,9 @@
338 checkbox = Gtk.CheckButton(label="%s (%s)" % (template.description,338 checkbox = Gtk.CheckButton(label="%s (%s)" % (template.description,
339 template.name))339 template.name))
340 checkbox.template = template340 checkbox.template = template
341 handler = self.on_proposed_toggled if ("proposed" in template.name) else self.on_checkbutton_child_toggled
341 self.handlers[checkbox] = checkbox.connect("toggled",342 self.handlers[checkbox] = checkbox.connect("toggled",
342 self.on_checkbutton_child_toggled,343 handler,
343 template)344 template)
344 self.vbox_updates.add(checkbox)345 self.vbox_updates.add(checkbox)
345 checkbox.show()346 checkbox.show()
@@ -570,6 +571,28 @@
570 if e._dbus_error_name == 'com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy':571 if e._dbus_error_name == 'com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy':
571 logging.error("Authentication canceled, changes have not been saved")572 logging.error("Authentication canceled, changes have not been saved")
572573
574 def on_proposed_toggled(self, checkbutton, template):
575 """
576 Enabling a proposed source requires confirmation
577 """
578 # don't require confirmation to disable
579 if checkbutton.get_active() == False:
580 self.on_checkbutton_child_toggled(checkbutton, template)
581 return
582
583 dialog = Gtk.MessageDialog(self.window_main, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.NONE, _("Enabling updates from proposed can be dangerous"))
584 dialog.format_secondary_text(_("This repository is only for testing updates and providing development feedback. Enabling may introduce instability.") )
585 dialog.add_buttons (Gtk.STOCK_CANCEL, Gtk.ResponseType.NO,
586 _("Enable"), Gtk.ResponseType.YES)
587 res = dialog.run()
588 if res == Gtk.ResponseType.YES:
589 self.on_checkbutton_child_toggled(checkbutton, template)
590 else:
591 self.block_handlers()
592 checkbutton.set_active(not checkbutton.get_active())
593 self.unblock_handlers()
594 dialog.destroy ()
595
573 def on_checkbutton_source_code_toggled(self, checkbutton):596 def on_checkbutton_source_code_toggled(self, checkbutton):
574 """ Disable or enable the source code for all sources """597 """ Disable or enable the source code for all sources """
575 try:598 try:

Subscribers

People subscribed via source and target branches

to status/vote changes: