parameters: (self, open_with_file, node_name)
docstring: Try to load a file if there are the conditions
docstring_summary: Try to load a file if there are the conditions
docstring_tokens: Try to load a file if there are the conditions
function: def file_startup_load(self, open_with_file, node_name):
          """Try to load a file if there are the conditions"""
          #print "file_startup_load '%s' ('%s', '%s')" % (open_with_file, self.file_name, self.file_dir)
          if open_with_file:
              try:
                  open_with_file = unicode(open_with_file, cons.STR_UTF8, cons.STR_IGNORE)
              except TypeError: # it is already unicode
                  pass
              self.file_name = os.path.basename(open_with_file)
              self.file_dir = os.path.dirname(open_with_file)
              #print "open_with_file -> file_name '%s', file_dir '%s'" % (self.file_name, self.file_dir)
          elif self.boss.running_windows:
              self.file_name = ""
              return
          if self.file_name and os.path.isfile(os.path.join(self.file_dir, self.file_name)):
              self.file_load(os.path.join(self.file_dir, self.file_name))
              self.modification_time_update_value(True)
              if self.rest_exp_coll == 1:
                  self.treeview.expand_all()
              else:
                  if self.rest_exp_coll == 2:
                      self.expanded_collapsed_string = ""
                  config.set_tree_expanded_collapsed_string(self)
              # is there a node name to focus?
              if node_name:
                  node_name = unicode(node_name, cons.STR_UTF8, cons.STR_IGNORE)
                  node_name_iter = self.get_tree_iter_from_node_name(node_name, use_content=False)
                  if node_name_iter:
                      self.node_path = self.treestore.get_path(node_name_iter)
                      self.cursor_position = 0
                  else:
                      node_name_iter = self.get_tree_iter_from_node_name(node_name, use_content=True)
                      if node_name_iter:
                          self.node_path = self.treestore.get_path(node_name_iter)
                          self.cursor_position = 0
              # we try to restore the focused node
              config.set_tree_path_and_cursor_pos(self)
          else:
              if self.file_name:
                  print "? not is_file '%s'" % (os.path.join(self.file_dir, self.file_name))
                  self.file_name = ""
              self.update_window_save_not_needed()
          self.file_update = False
function_tokens: def file_startup_load ( self , open_with_file , node_name ) : #print "file_startup_load '%s' ('%s', '%s')" % (open_with_file, self.file_name, self.file_dir) if open_with_file : try : open_with_file = unicode ( open_with_file , cons . STR_UTF8 , cons . STR_IGNORE ) except TypeError : # it is already unicode pass self . file_name = os . path . basename ( open_with_file ) self . file_dir = os . path . dirname ( open_with_file ) #print "open_with_file -> file_name '%s', file_dir '%s'" % (self.file_name, self.file_dir) elif self . boss . running_windows : self . file_name = "" return if self . file_name and os . path . isfile ( os . path . join ( self . file_dir , self . file_name ) ) : self . file_load ( os . path . join ( self . file_dir , self . file_name ) ) self . modification_time_update_value ( True ) if self . rest_exp_coll == 1 : self . treeview . expand_all ( ) else : if self . rest_exp_coll == 2 : self . expanded_collapsed_string = "" config . set_tree_expanded_collapsed_string ( self ) # is there a node name to focus? if node_name : node_name = unicode ( node_name , cons . STR_UTF8 , cons . STR_IGNORE ) node_name_iter = self . get_tree_iter_from_node_name ( node_name , use_content = False ) if node_name_iter : self . node_path = self . treestore . get_path ( node_name_iter ) self . cursor_position = 0 else : node_name_iter = self . get_tree_iter_from_node_name ( node_name , use_content = True ) if node_name_iter : self . node_path = self . treestore . get_path ( node_name_iter ) self . cursor_position = 0 # we try to restore the focused node config . set_tree_path_and_cursor_pos ( self ) else : if self . file_name : print "? not is_file '%s'" % ( os . path . join ( self . file_dir , self . file_name ) ) self . file_name = "" self . update_window_save_not_needed ( ) self . file_update = False