Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable gdialog: catch pixmap load failures

Refs #679

Changeset 038d56979aae

Parent d1761c32bf48

by Steve Borho

Changes to one file · Browse files at 038d56979aae Showing diff from parent d1761c32bf48 Diff from another changeset...

 
517
518
519
520
521
522
523
524
 
 
 
 
 
 
 
 
 
525
526
527
 
517
518
519
 
 
 
 
 
520
521
522
523
524
525
526
527
528
529
530
531
@@ -517,11 +517,15 @@
  img = gtk.Image()   ico = paths.get_tortoise_icon(icon)   if ico: - width, height = gtk.icon_size_lookup( - gtk.ICON_SIZE_MENU) - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( - ico, width, height) - img.set_from_pixbuf(pixbuf) + try: + width, height = gtk.icon_size_lookup( + gtk.ICON_SIZE_MENU) + pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( + ico, width, height) + img.set_from_pixbuf(pixbuf) + except: + # don't let broken gtk+ to break dialogs + pass   item.set_image(img)   else:   item = gtk.MenuItem(text)