Updated: [rhinstaller/anaconda/pulls/220 master] act on the right objects when stripping URL protocols (#1243962)

AdamWill installerbot-noreply at redhat.com
Fri Jul 17 00:22:56 UTC 2015


efa549ef introduced a _removeUrlPrefix() method which expected
its 'editable' parameter to be a GtkEntry (either the base repo
URL entry box, or an additional repo's URL entry box). However,
it had the on_repoUrl_changed() handler call _removeUrlPrefix()
with its own 'editable' parameter, and then had the protocol
combo box call the on_repoUrl_changed() handler when it was
changed, as well as the URL entry box. The intent is that if,
say, you paste in 'https://www.repo.com' while the protocol is
set to http://, then change the protocol to https://, the
protocol will get stripped - but because 'editable' in this
case is the GtkComboBoxText, not the GtkEntry, it all goes
wrong and crashes. The crash is reproducible by adding a
supplementary repo, entering a URL, then changing the
protocol.

This adjusts things so the handler functions that call
_removeUrlPrefix() don't pass in their own 'editable' params
but always pass in the appropriate GtkEntry. It also makes
the protocol combo box for the base repo call the appropriate
handler function as well as the text entry box - matching the
behaviour the original commit introduced for the additional
repo widgets (I guess this was simply overlooked at the time).

I've tested this and all four widgets now behave as expected,
and there are no crashes.
-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/220


More information about the anaconda-patches mailing list