Merge lp:~asc/spud/diamond_interface_error_handle into lp:spud

Proposed by Adam Candy
Status: Merged
Merged at revision: 533
Proposed branch: lp:~asc/spud/diamond_interface_error_handle
Merge into: lp:spud
Diff against target: 15 lines (+4/-0)
1 file modified
diamond/bin/diamond (+4/-0)
To merge this branch: bzr merge lp:~asc/spud/diamond_interface_error_handle
Reviewer Review Type Date Requested Status
Patrick Farrell Approve
Review via email: mp+125854@code.launchpad.net

Description of the change

Handle errors due to reading the Diamond icon image.
It's helpful if Diamond still opens - the icon isn't critical to its function.

To post a comment you must log in.
Revision history for this message
Patrick Farrell (pefarrell) wrote :

Makes sense!

review: Approve
533. By Patrick Farrell

Merge Adam's logofile fix (although we should always find the damn logo).

Revision history for this message
Simon Mouradian (mouradian) wrote :

This is interesting, diamond always opens for me, even without the logo...

Revision history for this message
Adam Candy (asc) wrote :

Diamond does a great job at finding its logo, and yes, opens fine even without it.

The issue is when it has problems understanding the logo - when the Python wrappers for librsvg are not present for example. The change here handles this, and importantly, allows you to carry on and use Diamond.

Another option would be to provide a fallback png image icon - as has been implemented in Jon's now merged branch ~jon-hill/spud/mac_port. This should fix the SVG read error. It is still useful to have Diamond open irrespective of any further icon issues!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'diamond/bin/diamond'
--- diamond/bin/diamond 2012-07-30 14:17:38 +0000
+++ diamond/bin/diamond 2012-09-22 15:08:22 +0000
@@ -273,7 +273,11 @@
273 else:273 else:
274 plugins.configure_plugins(suffix)274 plugins.configure_plugins(suffix)
275275
276 try:
276 i = interface.Diamond(gladefile = gladefile, logofile = logofile, suffix = suffix)277 i = interface.Diamond(gladefile = gladefile, logofile = logofile, suffix = suffix)
278 except Exception, e:
279 debug.deprint('Error: ' + str(e), 0)
280 i = interface.Diamond(gladefile = gladefile, suffix = suffix)
277281
278 i.main_window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))282 i.main_window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
279 i.open_file(schemafile = input_schemafile, filename = input_filename)283 i.open_file(schemafile = input_schemafile, filename = input_filename)

Subscribers

People subscribed via source and target branches