Merge ~jawn-smith/software-properties:outdated_cache_error_dialog into software-properties:ubuntu/master

Proposed by William Wilson
Status: Merged
Merged at revision: 354bbd08bd3a0a99d357b5b54b27a2df68db46ed
Proposed branch: ~jawn-smith/software-properties:outdated_cache_error_dialog
Merge into: software-properties:ubuntu/master
Diff against target: 28 lines (+8/-1)
2 files modified
debian/changelog (+7/-0)
softwareproperties/gtk/DialogCacheOutdated.py (+1/-1)
Reviewer Review Type Date Requested Status
Brian Murray Pending
Review via email: mp+396874@code.launchpad.net

Commit message

Changing the variable passed to the Error dialog to the correct variable type"

Description of the change

In the DialogCacheOutdated class, certain error scenarios were attempting to create a dialog message window. The first variable was passing the class rather than the class's parent window, as should happen.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

This looks great but I didn't understand the commit before yours so have not uploaded this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 1fd8844..b151b89 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+software-properties (0.99.5) hirsute; urgency=medium
7+
8+ * Fixing an incorrect variable being passed to GTK message dialog creation
9+ function (LP: #1829401)
10+
11+ -- William 'jawn-smith' Wilson <william.wilson@canonical.com> Mon, 25 Jan 2021 15:38:26 -0600
12+
13 software-properties (0.99.4) hirsute; urgency=medium
14
15 * cloudarchive: Enable support for the Wallaby Ubuntu Cloud Archive on
16diff --git a/softwareproperties/gtk/DialogCacheOutdated.py b/softwareproperties/gtk/DialogCacheOutdated.py
17index 9ee671e..aa5c8a5 100644
18--- a/softwareproperties/gtk/DialogCacheOutdated.py
19+++ b/softwareproperties/gtk/DialogCacheOutdated.py
20@@ -84,7 +84,7 @@ class DialogCacheOutdated:
21 try:
22 self._pktask.generic_finish(result)
23 except Exception as e:
24- dialog = Gtk.MessageDialog(self, 0, Gtk.MessageType.ERROR,
25+ dialog = Gtk.MessageDialog(self.parent, 0, Gtk.MessageType.ERROR,
26 Gtk.ButtonsType.CANCEL, _("Error while refreshing cache"))
27 dialog.format_secondary_text(str(e))
28 dialog.run()

Subscribers

People subscribed via source and target branches