Commits

Steve Borho committed ef5ab6b

thgconfig: do not set active row of empty combo

prevents a GTK warning on Windows

  • Participants
  • Parent commits d43e8eb
  • Tags 0.7.4

Comments (0)

Files changed (1)

File hggtk/thgconfig.py

                         if v == curvalue:
                             currow = len(vlist) - 1
 
-                if curvalue is None:
+                if curvalue is None and len(vlist):
                     combo.set_active(0)
-                elif currow is None:
+                elif currow is None and curvalue:
                     combo.child.set_text(toutf(curvalue))
-                else:
+                elif currow:
                     combo.set_active(currow)
 
     def add_page(self, notebook, tab):