[chirp_devel] FYI, new instruction dialog break with old version of GTK
Just an FYI, because I don't think it's worthy of a bug report:
The new download/upload instruction dialogs seems to break things with the old version of GTK+ 2.0 (2.18.9) on the old linux box I've been using for radio programming.
The problematic code is for forcing the input focus to the OK button. The work around is to either comment out the 3 lines that set the focus or to enable the "No Confirm" feature, which needs to be done by manually editing your ~/.chirp/chirp.config file to add the following lines.
[noconfirm] clone_instructions = True
Alternatively, comment out the following 3 lines. The dialog box will work still work the same but the default input focus will unfortunately be on the "don't show" check box since it appears before the OK button.
diff -r 1c8ef954a71b chirpui/mainapp.py --- a/chirpui/mainapp.py Wed Oct 30 08:22:46 2013 -0500 +++ b/chirpui/mainapp.py Sat Nov 02 10:28:01 2013 -0400 @@ -592,9 +592,9 @@ again.show() d.vbox.pack_start(again, 0, 0, 0) h_button_box=d.vbox.get_children()[2] - ok_button=h_button_box.get_children()[0] - ok_button.grab_default() - ok_button.grab_focus() +# ok_button=h_button_box.get_children()[0] +# ok_button.grab_default() +# ok_button.grab_focus() d.run() d.destroy() CONF.set_bool("clone_instructions", again.get_active(), "noconfirm")
Here's the error message:
Traceback (most recent call last): File "/home/rct/tmp/chirp.hg/chirpui/mainapp.py", line 1338, in mh self.do_download(*args) File "/home/rct/tmp/chirp.hg/chirpui/mainapp.py", line 615, in do_download self._show_instructions(rclass, rclass.get_prompts().pre_download) File "/home/rct/tmp/chirp.hg/chirpui/mainapp.py", line 595, in _show_instructions ok_button=h_button_box.get_children()[0] AttributeError: 'gtk.HSeparator' object has no attribute 'get_children'
Hope this helps, --Rob
On Sat, Nov 2, 2013 at 7:37 AM, Robert Terzi rct@r-t.org wrote:
Alternatively, comment out the following 3 lines. The dialog box will work still work the same but the default input focus will unfortunately be on the "don't show" check box since it appears before the OK button.
I just submitted a patch that should have the same effect as commenting out those 3 lines, but still work for people with newer GTK. Please test this.
The patch won't be able to be committed until there's an associated bug report.
Tom KD7LXL
On 11/2/2013 11:05 AM, Tom Hayward wrote:
I just submitted a patch that should have the same effect as commenting out those 3 lines, but still work for people with newer GTK. Please test this.
Thanks Tom, I should have thought of just going ahead and wrapping that in a try block. I've tested your patch, it works.
The patch won't be able to be committed until there's an associated bug report.
Issue: 1219 -- http://chirp.danplanet.com/issues/1219
Thanks, --Rob
On Sat, Nov 2, 2013 at 7:37 AM, Robert Terzi rct@r-t.org wrote:
Alternatively, comment out the following 3 lines. The dialog box will work still work the same but the default input focus will unfortunately be on the "don't show" check box since it appears before the OK button.
On Tue, Nov 5, 2013 at 10:56 AM, Robert Terzi rct@r-t.org wrote:
I've tested your patch, it works.
The patch won't be able to be committed until there's an associated bug report.
Issue: 1219 -- http://chirp.danplanet.com/issues/1219
I've just sent an updated patch with the issue number.
Tom
participants (2)
-
Robert Terzi
-
Tom Hayward