~cjo20/terminator/savelayout

« back to all changes in this revision

Viewing changes to terminator

  • Committer: Chris Oattes
  • Date: 2008-05-19 18:38:37 UTC
  • Revision ID: cjo20@cdesk-20080519183837-f8eeybtgrfd0yyh3
Added code to save / restore cwd

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    self.cwd = cwd or os.getcwd();
91
91
    if not os.path.exists(self.cwd) or not os.path.isdir(self.cwd):
92
92
      self.cwd = pwd.getpwuid(os.getuid ())[5]
93
 
 
 
93
      print self.cwd
94
94
    self.clipboard = gtk.clipboard_get (gtk.gdk.SELECTION_CLIPBOARD)
95
95
    self.scrollbar_position = self.conf.scrollbar_position
96
96
 
852
852
 
853
853
  def rebuild_tree(self, element, window):
854
854
    if element.localName == "Term":
855
 
      term = (TerminatorTerm (self, self.profile, self.command))
 
855
      cwd = element.getAttribute ("cwd")
 
856
      term = (TerminatorTerm (self, self.profile, self.command, cwd = cwd))
856
857
      if element.getAttribute ("scrollbars") == "1":
857
858
        term._scrollbar.show ()
858
859
      else: 
893
894
      element.setAttribute("scrollbars", "1")
894
895
    else:
895
896
      element.setAttribute("scrollbars", "0")
 
897
    element.setAttribute("cwd", obj.get_cwd ())
896
898
    return element
897
899
  else:
898
900
    #Otherwise, this obj is split - determine type and print each side.