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:

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
1=== modified file 'diamond/bin/diamond'
2--- diamond/bin/diamond 2012-07-30 14:17:38 +0000
3+++ diamond/bin/diamond 2012-09-22 15:08:22 +0000
4@@ -273,7 +273,11 @@
5 else:
6 plugins.configure_plugins(suffix)
8+ try:
9 i = interface.Diamond(gladefile = gladefile, logofile = logofile, suffix = suffix)
10+ except Exception, e:
11+ debug.deprint('Error: ' + str(e), 0)
12+ i = interface.Diamond(gladefile = gladefile, suffix = suffix)
14 i.main_window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
15 i.open_file(schemafile = input_schemafile, filename = input_filename)


People subscribed via source and target branches