[chirp_devel] FYI, new instruction dialog break with old version of GTK

Robert Terzi
Sat Nov 2 07:37:06 PDT 2013


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




More information about the chirp_devel mailing list