~jon-hill/spud/mac_port

« back to all changes in this revision

Viewing changes to diamond/diamond/interface.py

  • Committer: Fraser Waters
  • Date: 2011-08-22 17:22:47 UTC
  • mto: This revision was merged to the branch mainline in revision 457.
  • Revision ID: fraser.waters08@imperial.ac.uk-20110822172247-g5cx3yz4o1pl0bx3
Mega commit, working version of diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
import descriptionwidget
48
48
import databuttonswidget
49
49
import datawidget
 
50
import diffview
50
51
import sliceview
51
52
 
52
53
from lxml import etree
140
141
                    "on_copy": self.on_copy,
141
142
                    "on_paste": self.on_paste,
142
143
                    "on_slice": self.on_slice,
 
144
                    "on_diff": self.on_diff,
143
145
                    "on_group": self.on_group,
144
146
                    "on_ungroup": self.on_ungroup}
145
147
 
601
603
                      "You should have received a copy of the GNU General Public License\n"+
602
604
                      "along with Diamond.  If not, see http://www.gnu.org/licenses/.")
603
605
 
604
 
    logo = gtk.gdk.pixbuf_new_from_file(self.logofile)
605
 
 
 
606
    if self.logofile is not None:
 
607
      logo = gtk.gdk.pixbuf_new_from_file(self.logofile)
 
608
      about.set_logo(logo)
 
609
      
606
610
    try:
607
611
      image = about.get_children()[0].get_children()[0].get_children()[0]
608
612
      image.set_tooltip_text("Diamond: it's clearer than GEM")
609
613
    except:
610
614
      pass
611
 
 
612
 
    about.set_logo(logo)
 
615
    
613
616
    about.show()
614
617
 
615
618
    return
737
740
 
738
741
    return
739
742
 
 
743
  def on_diff(self, widget = None):
 
744
    path = os.path.dirname(self.filename) if self.filename else None
 
745
    window = diffview.DiffView(path, self.tree)
 
746
 
740
747
  def on_slice(self, widget = None):
741
748
    if not self.selected_node.is_sliceable():
742
749
      self.statusbar.set_statusbar("Cannot slice on this element.")