[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: geda_manager.git: branch: master updated (6fd4ceae050c1125bbabf005b67b3f0fff876827)



The branch, master has been updated
       via  6fd4ceae050c1125bbabf005b67b3f0fff876827 (commit)
      from  72d1c73d2146c537a242502d139fca072097407c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 src/gui/Preferences.py |   48 ++++++++++++----
 src/utils/Helpers.py   |  150 ++++++++++++++++++++++++++++++++++++-----------
 src/utils/Settings.py  |    3 +
 3 files changed, 155 insertions(+), 46 deletions(-)


=================
 Commit Messages
=================

commit 6fd4ceae050c1125bbabf005b67b3f0fff876827
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxxx>
Date:   Tue Jan 20 21:48:35 2009 -0800

    Its been a while since I have addressed the code base so I am just
    syncing up what I have locally.

:100644 100644 8c0f023... 3007ec0... M	src/gui/Preferences.py
:100644 100644 571acaf... ac00603... M	src/utils/Helpers.py
:100644 100644 9307580... db70fa6... M	src/utils/Settings.py

=========
 Changes
=========

commit 6fd4ceae050c1125bbabf005b67b3f0fff876827
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxxx>
Date:   Tue Jan 20 21:48:35 2009 -0800

    Its been a while since I have addressed the code base so I am just
    syncing up what I have locally.

diff --git a/src/gui/Preferences.py b/src/gui/Preferences.py
index 8c0f023..3007ec0 100644
--- a/src/gui/Preferences.py
+++ b/src/gui/Preferences.py
@@ -52,6 +52,8 @@ class Preferences(gtk.Dialog):
         ## Some initial setup
         self.editor_entry = gtk.Entry()
         self.editor_entry.show()
+        self.viewer_entry = gtk.Entry()
+        self.viewer_entry.show()
         self.combobox = gtk.ComboBox()
         self.combobox.show()
         self.flags_entry = gtk.Entry()                            
@@ -77,11 +79,16 @@ class Preferences(gtk.Dialog):
                     self.mw.settings.flags[current_tool] = self.mw.settings.default_flags[current_tool]
             
         
-        def cb_filebutton_selection_changed(filechooser, editor_entry):
-            self.mw.settings.editor = filebutton.get_filename()
+        def cb_editor_filebutton_selection_changed(filechooser, editor_entry):
+            self.mw.settings.editor = editor_filebutton.get_filename()
             editor_entry.delete_text(0,-1)
             editor_entry.set_text(self.mw.settings.editor)
 
+        def cb_viewer_filebutton_selection_changed(filechooser, viewer_entry):
+            self.mw.settings.viewer = viewer_filebutton.get_filename()
+            viewer_entry.delete_text(0,-1)
+            viewer_entry.set_text(self.mw.settings.viewer)
+
         def cb_combobox_changed(combobox):
             # self.current_tool holds the earlier tool
             current_tool = self.get_current_tool()
@@ -99,17 +106,17 @@ class Preferences(gtk.Dialog):
         hbox.show()
         if self.mw.settings.editor != None:
             self.editor_entry.set_text(self.mw.settings.editor)
-        filebutton = gtk.FileChooserButton('Text Editor')
-        filebutton.show()
-        filebutton.connect('selection-changed', cb_filebutton_selection_changed, self.editor_entry)
-        filebutton.set_local_only(True)
-        filebutton.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
-        hbox.pack_end(filebutton)
+        editor_filebutton = gtk.FileChooserButton('Text Editor')
+        editor_filebutton.show()
+        editor_filebutton.connect('selection-changed', cb_editor_filebutton_selection_changed, self.editor_entry)
+        editor_filebutton.set_local_only(True)
+        editor_filebutton.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
+        hbox.pack_end(editor_filebutton)
         hbox.pack_end(self.editor_entry)
         label = gtk.Label('Text Editor:')
         label.show()
         hbox.pack_end(label)
-        self.vbox.pack_end(hbox, True, True, 0)
+        self.vbox.pack_end(hbox)
         #####################################################
         ## gEDA Tools ComboBox
         #####################################################
@@ -170,6 +177,24 @@ class Preferences(gtk.Dialog):
         self.vbox.pack_start(hbox)
         self.connect('response', cb_response)        
         self.show()
+        #####################################################
+        ## PDF viewer
+        #####################################################
+        hbox = gtk.HBox()
+        hbox.show()
+        if self.mw.settings.viewer != None:
+            self.viewer_entry.set_text(self.mw.settings.viewer)
+        viewer_filebutton = gtk.FileChooserButton('PDF Viewer')
+        viewer_filebutton.show()
+        viewer_filebutton.connect('selection-changed', cb_viewer_filebutton_selection_changed, self.viewer_entry)
+        viewer_filebutton.set_local_only(True)
+        viewer_filebutton.set_action(gtk.FILE_CHOOSER_ACTION_OPEN)
+        hbox.pack_end(viewer_filebutton)
+        hbox.pack_end(self.viewer_entry)
+        label = gtk.Label('PDF Viewer:')
+        label.show()
+        hbox.pack_end(label)
+        self.vbox.pack_start(hbox)
         ###########################################################
         ###########################################################
         response = self.run()        
@@ -201,12 +226,13 @@ class Preferences(gtk.Dialog):
             self.mw.settings.flags[current_tool] = self.flags_entry.get_text()
         if self.mw.settings.editor != None or self.mw.settings.editor != '':
             self.mw.settings.editor = self.editor_entry.get_text()
-
+        if self.mw.settings.viewer != None or self.mw.settings.viewer != '':
+            self.mw.settings.viewer = self.viewer_entry.get_text()
 
 
     def update_fields(self, current_tool):
         """!
-        Method to update the gEDA Tool Flags field and Text Editor field.
+        Method to update the gEDA Tool Flags field and gEDA Flags Helper box.
         @param current_tool current tool to update the fields for
         """
         if current_tool != None:
diff --git a/src/utils/Helpers.py b/src/utils/Helpers.py
index 571acaf..ac00603 100644
--- a/src/utils/Helpers.py
+++ b/src/utils/Helpers.py
@@ -34,7 +34,7 @@ netlists = ['bom2','calay','mathematica','vipec','geda','systemc','allegro','red
 
 def not_implemented(mw):
     """
-    Method to let the user know that the selected feature is not
+    Function to let the user know that the selected feature is not
     implemented yet.
     """
     dialog = gtk.MessageDialog(mw,
@@ -49,13 +49,13 @@ def not_implemented(mw):
 
 
 def get_time():
-    """ Method returns a string of the current time. """
+    """ Function returns a string of the current time. """
     return time.asctime(time.localtime(time.time()))
 
 
 def get_filename_from_filepath(path):
     """!
-    Method to return the node name from the path.
+    Function to return the node name from the path.
     @param path path to the node
     @return filename of the node without an extension
     """
@@ -67,7 +67,7 @@ def get_filename_from_filepath(path):
 
 def set_menu_defaults(mw):
     """
-    Method to coordiante which methods should be called to handle
+    Function to coordiante which methods should be called to handle
     the sensitivity of the menu items.
     """
     # Project
@@ -79,7 +79,7 @@ def set_menu_defaults(mw):
 
 def set_no_project_default(mw):
     """
-    Method to set the default sensitivity when no project is loaded.
+    Function to set the default sensitivity when no project is loaded.
     """
     # File Menu
     mw.project.name = mw.no_project_name
@@ -92,7 +92,7 @@ def set_no_project_default(mw):
 
 def set_project_default(mw):
     """
-    Method to set the default sensitivity when a project is loaded.
+    Function to set the default sensitivity when a project is loaded.
     """
     # File Menu
     save_project_as_menuitem = mw.menu_uimanager.get_widget('/MenuBar/Project/Save Project As...')
@@ -102,7 +102,7 @@ def set_project_default(mw):
 
 def set_project(path, mw):
     """!
-    Method to set current project to the one on path.
+    Function to set current project to the one on path.
     @param path path for project to open.
     """
     # Save current project
@@ -113,7 +113,7 @@ def set_project(path, mw):
 
 
 def set_project_header(mw):
-    """ Method to set the project header. """
+    """ Function to set the project header. """
     column = mw.sources_tree.get_column(0)
     if mw.project.name != None:
         column.set_title('Project: ' + mw.project.name)
@@ -121,7 +121,7 @@ def set_project_header(mw):
     
 
 def set_sources_tree_to_project(mw):
-    """ Method to set the tree to current project object. """
+    """ Function to set the tree to current project object. """
     set_project_header(mw)
     mw.sources.clear()
     if mw.project.name != None:
@@ -130,7 +130,7 @@ def set_sources_tree_to_project(mw):
     
 
 def set_dependencies_tree_to_project(mw):
-    """ Method to set the tree to current project object. """
+    """ Function to set the tree to current project object. """
     mw.dependencies.clear()
     if mw.project.dependency_list != None:
         load_dependencies_tree(mw)
@@ -138,7 +138,7 @@ def set_dependencies_tree_to_project(mw):
 
 
 def set_dependencies_tree_to_new_project(mw):
-    """ Method to set the tree to newly created project object. """
+    """ Function to set the tree to newly created project object. """
     mw.dependencies.clear()
     # Parent Folder
     project_path = mw.project.directory + '/' + mw.project.name        
@@ -149,7 +149,7 @@ def set_dependencies_tree_to_new_project(mw):
 
 def load_sources_tree(mw):
     """
-    Method to the load the 'Sources' TreeView from the
+    Function to the load the 'Sources' TreeView from the
     directory structure of the project.
     """
     if mw.sources != None:
@@ -185,7 +185,7 @@ def load_sources_tree(mw):
 
 def load_dependencies_tree(mw):
     """!
-    Method to the load the dependencies tree.
+    Function to the load the dependencies tree.
     @param mw current MainWindow instance
     """
     # Need to add checking for whether or not the filesystem still
@@ -215,7 +215,7 @@ def load_dependencies_tree(mw):
 
 def update_dependency(mw, pathname, recurse=False):
     """!
-    Method to update a dependency's status.
+    Function to update a dependency's status.
     @param mw current MainWindow instance
     @param pathname filepath for the dependency
     @param recurse boolean used for recursion
@@ -240,7 +240,7 @@ def update_dependency(mw, pathname, recurse=False):
 
 def add_dependency(mw, pathname):
     """!
-    Method to add a dependency.
+    Function to add a dependency.
     @param mw current MainWindow instance
     @param pathname filepath for the dependency
     """
@@ -258,7 +258,7 @@ def add_dependency(mw, pathname):
 
 def remove_dependency(mw, pathname, recurse=False):
     """!
-    Method to remove
+    Function to remove
     """
     # First, make sure that the file is already in the dependencies
     if mw.project.dependency_status != None:
@@ -284,7 +284,7 @@ def remove_dependency(mw, pathname, recurse=False):
 
 def get_processes_selected_node(mw):
     """!
-    Method to get the selected node in the 'Processes' treeview.
+    Function to get the selected node in the 'Processes' treeview.
     @param mw current MainWindow instance    
     @return path of the selected node
     """
@@ -298,7 +298,7 @@ def get_processes_selected_node(mw):
 
 def file_filters(mw, dialog):
     """!
-    Method to abstract some redundant code that is used in the message
+    Function to abstract some redundant code that is used in the message
     dialog boxes.
     @param mw current MainWindow instance
     @param dialog gtk.FileChooserDialog object
@@ -357,7 +357,7 @@ def file_filters(mw, dialog):
 
         
 def save_settings(mw):
-    """ Method to save current settings to .gmrc file. """
+    """ Function to save current settings to .gmrc file. """
 
     if mw.project.directory and mw.project.name:
         mw.settings.project = mw.project.directory + '/' + mw.project.name + '.gm'
@@ -368,7 +368,7 @@ def save_settings(mw):
             
 def kill_processes(mw):
     """
-    Method to kill all the open processes if there are still any
+    Function to kill all the open processes if there are still any
     open when the gEDAManager is closed.
     """
     for tool, value in tools.iteritems():
@@ -381,7 +381,7 @@ def kill_processes(mw):
 
 def flatten(lst):
     """!
-    Method to flatten a nested list with tuple or list elements.
+    Function to flatten a nested list with tuple or list elements.
     @param lst nested list to flatten
     """
     for elem in lst:
@@ -394,7 +394,7 @@ def flatten(lst):
 
 def is_filename_in_dependencies(mw, filename, delete=False):
     """!
-    Method to determine if the given filename is in the project's
+    Function to determine if the given filename is in the project's
     dependencies.
     @param mw current mw instance                
     @param filename name of the file under investigation
@@ -426,7 +426,7 @@ def is_filename_in_dependencies(mw, filename, delete=False):
 
 def child_recurse(row_iter, index):
     """!
-    Method to iterate recursively over child nodes.
+    Function to iterate recursively over child nodes.
     @param row_iter gtk.TreeModelRowIter object
     @param index index of the row to add to the returned list
     @return list of child nodes
@@ -450,7 +450,7 @@ def child_recurse(row_iter, index):
     
 def run_command(mw, filepath, highlighted_source=None, ext=None):
     """!
-    Method to run commands for 'Processes' and 'Sources'.
+    Function to run commands for 'Processes' and 'Sources'.
     @param mw current mw instance                
     @param filepath selected 'Sources' or 'Processes' node
     @param highlighted_source highlighted 'Sources' node that
@@ -478,7 +478,18 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
                 pass
         #elif (ext in files or ext in configfiles):
         elif ext in ['ps','eps','pdf']:
-            Popen(['evince', filepath])
+            if mw.settings.viewer != None and mw.settings.viewer != '':
+                Popen([mw.settings.viewer, filepath])                
+            else: 
+                dialog = gtk.MessageDialog(mw,
+                                           (gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT),
+                                           gtk.MESSAGE_INFO,
+                                           gtk.BUTTONS_OK,
+                                           gtk.STOCK_DIRECTORY)
+                dialog.set_markup('<b>Please go to Edit->Preferences and choose a default PDF viewer.</b>')
+                dialog.show()
+                response = dialog.run()
+                dialog.destroy()
         else:
             if mw.settings.editor != None and mw.settings.editor != '':
                 Popen([mw.settings.editor, filepath])                
@@ -514,56 +525,84 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
             inner_flags.append(highlighted_source)
             final = ['gnetlist'] + inner_flags
             subpro = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'gnetlist':
             current_flags = flags['gnetlist']
             inner_flags = current_flags['gnetlist']
             inner_flags.append(highlighted_source)
             final = [program] + inner_flags
-            subproc = Popen(final, stdout=PIPE)            
+            subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'gnetlist-drc2':
             subproc = Popen(['gnetlist','-g', 'drc2', '-o', 'drc2_verify.txt', highlighted_source], stdout=PIPE)
+            final = 'gnetlist -g drc2 -o drc2_verify.txt ' + highlighted_source
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'vcd2lxt':
             lxt = highlighted_source.rsplit('.')[0] + '.lxt'
             subproc = Popen(['vcd2lxt', highlighted_source, lxt], stdout=PIPE)
+            final = 'vcd2lxt ' + highlighted_source
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'vcd2lxt2':
             lxt2 = highlighted_source.rsplit('.')[0] + '.lxt2'
-            subproc = Popen(['vcd2lxt', highlighted_source, lxt2], stdout=PIPE)
+            subproc = Popen(['vcd2lxt2', highlighted_source, lxt2], stdout=PIPE)
+            final = 'vcd2lxt2 ' + highlighted_source
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'vcd2vzt':
             vzt = highlighted_source.rsplit('.')[0] + '.vzt'
             subproc = Popen(['vcd2vzt', highlighted_source, vzt], stdout=PIPE)
+            final = 'vcd2vzt ' + highlighted_source
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'ngspice':
             current_flags = flags['ngspice'][:]
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]
+            write_to_output_log(mw, output)
         elif program == 'gnucap':
             current_flags = flags['gnucap'][:]
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]            
+            write_to_output_log(mw, output)
         elif program == 'gspiceui':
             current_flags = flags['gnucap'][:]
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]            
+            write_to_output_log(mw, output)
         elif program == 'ghdl-analyze':
             current_flags = flags['ghdl'].copy()
             inner_flags = current_flags['analyze'][:]
             inner_flags.append(highlighted_source)
             final = ['ghdl'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]            
+            write_to_output_log(mw, output)
         elif program == 'ghdl-eloborate':
             current_flags = flags['ghdl'].copy()
             inner_flags = current_flags['eloborate'][:]
             inner_flags.append(highlighted_source)
             final = ['ghdl'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]            
+            write_to_output_log(mw, output)
         elif program == 'ghdl-run':
             current_flags = flags['ghdl'].copy()
             inner_flags = current_flags['run'][:]
             inner_flags.append(highlighted_source)
             final = ['ghdl'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]            
+            write_to_output_log(mw, output)
         elif program == 'iverilog-compile':
             current_flags = flags['iverilog'].copy()
             inner_flags = current_flags['compile'][:]
@@ -572,6 +611,8 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
             inner_flags.append(highlighted_source)
             final = ['iverilog'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'iverilog-translate':
             current_flags = flags['iverilog'].copy()
             inner_flags = current_flags['translate'][:]
@@ -580,24 +621,30 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
             inner_flags.append(highlighted_source)
             final = ['iverilog'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'vvp':
             inner_flags = flags[program][:]
+            print 'inner_flags:',inner_flags
             inner_flags.append(highlighted_source)
             final = [program] + inner_flags
             subproc = Popen(final, stdout=PIPE)
-            # I need to get output and put into textbuffer
-            output = subproc.communicate()[0]
-            print 'output:',output
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'refdes_renum':
             current_flags = flags[program][:]
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'grenum':
             current_flags = flags[program][:]
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'gattrib':
             if tools['gattrib'] == None or tools['gattrib'].poll() == 0:
                 tools['gattrib'] = Popen([program, highlighted_source], stdout=PIPE)
@@ -608,6 +655,8 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
             current_flags.append(highlighted_source)
             final = [program] + current_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'gsch2pcb wizard':
             gsch2pcb = Gsch2pcb(mw, highlighted_source)
         elif program == 'pcb-lpr':
@@ -616,42 +665,56 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-bom':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['bom'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-gerber':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['gerber'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-nelma':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['nelma'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-png':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['png'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-ps':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['ps'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'pcb-eps':
             current_flags = flags['pcb'].copy()
             inner_flags = current_flags['eps'][:]
             inner_flags.append(highlighted_source)
             final = ['pcb'] + inner_flags
             subproc = Popen(final, stdout=PIPE)
+            output = final + '\n' + subproc.communicate()[0]             
+            write_to_output_log(mw, output)
         elif program == 'update-gsch2pcb':
             not_implemented(mw)
             # The stuff below is commented out until the dependency issues
@@ -701,10 +764,27 @@ def run_command(mw, filepath, highlighted_source=None, ext=None):
     ##         ## subproc = Popen([program, highlighted_source])
     ## mw.processes_tree.set_sensitive(False)
 
+def write_to_output_log(mw, message):
+    """!
+    Function to write `message' to output log.
+    @param mw current MainWindow instance
+    @param message string message to write out
+    """
+    mw.output_textbuffer.insert(mw.output_textiter, get_time() + ':\n' + message + '\n')
+
+    
+def write_to_error_log(mw, message):
+    """!
+    Function to write `message' to error log.
+    @param mw current MainWindow instance
+    @param message string message to write out
+    """
+    mw.error_textbuffer.insert(mw.error_textiter, get_time() + ':\n' + message + '\n')
+
 
 def write_logs(mw):
     """
-    Method to write out the error and output logs with what is in
+    Function to write out the error and output logs with what is in
     the textbuffers.
     """
     if mw.project.directory != None:
@@ -725,7 +805,7 @@ def write_logs(mw):
 
 def kill_processes():
     """
-    Method to kill all the open processes if there are still any
+    Function to kill all the open processes if there are still any
     open when the gEDAManager is closed.
     """
     for tool, value in tools.iteritems():
@@ -738,7 +818,7 @@ def kill_processes():
 
     ## def update_dependency_list(mw, filename, flag=False):
     ##     """!
-    ##     Method to update the dependencies for filename.
+    ##     Function to update the dependencies for filename.
     ##     @param filename file that will have its dependencies updated
     ##     or list of filenames that will have its dependencies updated
     ##     @param flag sets status of filename
@@ -758,7 +838,7 @@ def kill_processes():
 
     ## def add_to_dependency_list(mw, filename):
     ##     """!
-    ##     Method to add a file to the project's dependency_list.
+    ##     Function to add a file to the project's dependency_list.
     ##     @param filename file to add to project.dependency_list
     ##     """
     ##     # add file to the dependency_list
@@ -767,7 +847,7 @@ def kill_processes():
 
     ## def get_status_image(mw, highlighted_source):
     ##     """!
-    ##     Method to get the status image for the process.
+    ##     Function to get the status image for the process.
     ##     @param mw current mw instance                
     ##     @param highlighted_source currently selected node in the 'Sources' tree view.
     ##     @return icon from the icon_lut structure
diff --git a/src/utils/Settings.py b/src/utils/Settings.py
index 9307580..db70fa6 100644
--- a/src/utils/Settings.py
+++ b/src/utils/Settings.py
@@ -37,6 +37,7 @@ class Settings:
         self.version = 0.1
         self.project = None
         self.editor = None
+        self.viewer = None
         self.flags = None
         self.default_flags = {'gnucap': ['-b'],
                               'ngspice': ['-b'],
@@ -75,6 +76,7 @@ class Settings:
             for data in yaml.load_all(stream):
                 self.project = data['project']
                 self.editor = data['editor']
+                self.viewer = data['viewer']
                 self.flags = data['flags']
                 # Check to see if this file is still available
                 if self.project != None:
@@ -111,6 +113,7 @@ class Settings:
         yaml.dump({'version': self.version,
                    'project': self.project,
                    'editor': self.editor,
+                   'viewer': self.viewer,
                    'flags': self.flags}, stream, default_flow_style=False)
         stream.close()
 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs