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

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



The branch, master has been updated
       via  d219c7dfd3e05c61fc1366f5bdb53c2ed7564213 (commit)
      from  f9ebd2a7cbe872e8086fff2601ed1a1f6cb61fe3 (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
=========

 images/bitmaps/geda-xgsch2pcb-26.png |  Bin 0 -> 1687 bytes
 src/gedamanager.py                   |  146 +++++++++++++++++++++++++---------
 src/newproject.py                    |    3 +-
 src/project.py                       |    1 -
 src/utils.py                         |  104 ++++++++++++++++++------
 5 files changed, 187 insertions(+), 67 deletions(-)
 create mode 100644 images/bitmaps/geda-xgsch2pcb-26.png


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

commit d219c7dfd3e05c61fc1366f5bdb53c2ed7564213
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Sat Jul 26 09:35:32 2008 -0700

    Routine check in. Processes are being experimented with for a schematic file.

:000000 100644 0000000... f25ad86... A	images/bitmaps/geda-xgsch2pcb-26.png
:100644 100644 9b02194... e947d1c... M	src/gedamanager.py
:100644 100644 d0fa8e8... 667234a... M	src/newproject.py
:100644 100644 8d0647e... 9f177f9... M	src/project.py
:100644 100644 3a4fbb9... c14e865... M	src/utils.py

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

commit d219c7dfd3e05c61fc1366f5bdb53c2ed7564213
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Sat Jul 26 09:35:32 2008 -0700

    Routine check in. Processes are being experimented with for a schematic file.

diff --git a/images/bitmaps/geda-xgsch2pcb-26.png b/images/bitmaps/geda-xgsch2pcb-26.png
new file mode 100644
index 0000000..f25ad86
Binary files /dev/null and b/images/bitmaps/geda-xgsch2pcb-26.png differ
diff --git a/src/gedamanager.py b/src/gedamanager.py
index 9b02194..e947d1c 100644
--- a/src/gedamanager.py
+++ b/src/gedamanager.py
@@ -5,7 +5,7 @@
 #@author Newell Jensen
 
 import os, sys, gtk, pygtk, yaml, gnomevfs
-import gobject, shutil, vte, logging
+import gobject, shutil, vte, logging, subprocess
 pygtk.require('2.0')
 from project import *
 from settings import *
@@ -23,7 +23,7 @@ class gEDAManager:
     """
     def __init__(self):
         """ gEDAManager Constructor. """
-        # Initialize gEDA Manager
+       # Initialize gEDA Manager
         self.no_project_name = 'No project loaded...\n\n Select:\n  File->Open Project\n  or File->New Project'
         self.settings = Settings()
         if self.settings.project != None:
@@ -50,8 +50,8 @@ class gEDAManager:
         self.window.add_accel_group(self.menu_accel_group)
         self.popup_accel_group = self.popup_uimanager.get_accel_group()
         self.__init_menus__()
-        self.__init_about_dialog__()
         self.__init_gui_sections__()
+        self.__init_about_dialog__()        
         self.set_menu_defaults()
         self.window.show()
 
@@ -73,7 +73,7 @@ class gEDAManager:
             try:
                 gnomevfs.url_show(link)
             except:
-                print 'Unexpected error:', sys.exc_info()[0]
+                self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')                            
                 raise
 
         self.aboutdialog = gtk.AboutDialog()
@@ -84,8 +84,11 @@ class gEDAManager:
             version = y['version']
             self.aboutdialog.set_version(str(version))
             f.close()
+        except OSError:
+            self.errors_textbuffer.insert(self.errors_textiter, 'OSError: ' + sys.exc_info()[0] + '.\n')            
         except:
-            print 'Unexpected error:', sys.exc_info()[0]
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')
+            raise
         self.aboutdialog.set_copyright("gEDA Manager 2008")
         self.aboutdialog.set_authors(['Newell Jensen', '--',
                                       'Before Enlightenment, chop wood and carry water',
@@ -226,17 +229,40 @@ class gEDAManager:
         hpaned1.pack2(vbox2, True, True)
 
         # Main Window
-        scrolled_window = gtk.ScrolledWindow()
-        scrolled_window.show()
-        scrolled_window.set_shadow_type(gtk.SHADOW_IN)
-        scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        vbox2.pack_start(scrolled_window, True, True)
-
-        textview1 = gtk.TextView()
-        textview1.show()
-        scrolled_window.add(textview1)
+
+        # Do plugs and sockets here
+
+        # New window
+##         pid = subprocess.Popen(["/usr/bin/gschem"]).pid
+##         print pid
         
-        # Tree Views
+##         self.plug_window = gtk.Window(gtk.WINDOW_POPUP)
+##         self.plug_window.connect('destroy', self.cb_destroy)
+##         self.plug_window.show()
+##         socket = gtk.Socket()
+##         socket.show()
+##         self.plug_window.add(socket)
+##         vbox2.pack_start(self.plug_window, True, True)
+##         sockect.add_id(
+##         plug = gtk.Plug(window_id)
+##         print 'plugid:',plug.get_id()
+##         print 'socketid:',socket.get_id()
+
+
+
+##         socket = gtk.Socket()
+##         socket.show()
+##         vbox2.pack_start(socket, True, True)
+##         scrolled_window = gtk.ScrolledWindow()
+##         scrolled_window.show()
+##         scrolled_window.set_shadow_type(gtk.SHADOW_IN)
+##         scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+##         vbox2.pack_start(scrolled_window, True, True)
+##         textview1 = gtk.TextView()
+##         textview1.show()
+##         scrolled_window.add(textview1)
+
+        # Notebook
         vpaned2 = gtk.VPaned()
         vpaned2.show()
         hpaned1.pack1(vpaned2, True, True)
@@ -260,7 +286,7 @@ class gEDAManager:
         sources_notebook.add(scrolled_window1)
         processes_notebook.add(scrolled_window2)        
 
-        # labels
+        # Labels
         sources_label = gtk.Label('Sources')
         sources_label.show()
         processes_label = gtk.Label('Processes')
@@ -268,25 +294,30 @@ class gEDAManager:
         sources_notebook.set_tab_label(sources_notebook.get_nth_page(0), sources_label)
         processes_notebook.set_tab_label(processes_notebook.get_nth_page(0), processes_label)
         self.sources = gtk.TreeStore(gtk.gdk.Pixbuf, str, str)
-        self.processes = gtk.TreeStore(gtk.gdk.Pixbuf, str, str)
+        self.processes = gtk.TreeStore(gtk.gdk.Pixbuf, str)
         
-        # views
+        # Tree views
         self.sources_tree = gtk.TreeView(self.sources)
         self.sources_tree.show()
-        self.sources_tree.connect('button_press_event', self.cb_treeview_popup)
+        self.sources_tree.connect('button_press_event', self.cb_button_press)
         self.sources_tree.connect('row-activated', self.cb_row_activated)
         self.sources_tree.connect('cursor-changed', self.cb_cursor_changed)
+
         self.processes_tree = gtk.TreeView(self.processes)
         self.processes_tree.show()
 
         # column headings
         column = gtk.TreeViewColumn(None, gtk.CellRendererPixbuf(), pixbuf=0)
         self.sources_tree.append_column(column)
-        column = gtk.TreeViewColumn(None, gtk.CellRendererText(), text=1)
+        sources_cell = gtk.CellRendererText()
+        sources_cell.set_property('editable', True)
+        sources_cell.connect('edited', self.cb_cell_edited, self.sources)
+        column = gtk.TreeViewColumn(None, sources_cell, text=1)
         self.sources_tree.append_column(column)
         column = gtk.TreeViewColumn('Processes for: ', gtk.CellRendererPixbuf(), pixbuf=0)
         self.processes_tree.append_column(column)
         column = gtk.TreeViewColumn(None, gtk.CellRendererText(), text=1)
+        self.processes_tree.append_column(column)
         
         # set some properties
         self.sources_tree.set_property('enable-tree-lines', True)
@@ -295,15 +326,18 @@ class gEDAManager:
         # make it searchable
         self.sources_tree.set_search_column(0)
         self.processes_tree.set_search_column(0)
-        
+
         # add to the scrolling window
         scrolled_window1.add(self.sources_tree)
         scrolled_window2.add(self.processes_tree)        
 
         # add data to the store
         self.set_sources_tree_to_project()
-
+        
+        ######################################
         # Lower Notebook Window
+        ######################################
+        
         notebook = gtk.Notebook()
         notebook.show()
         vpaned1.pack2(notebook, True, True)
@@ -558,7 +592,6 @@ class gEDAManager:
         """
         # Save current project
         if not self.project.clean:
-            
             self.project.save()
         self.project.open(path)
         self.output_textbuffer.insert(self.output_textiter,
@@ -580,11 +613,11 @@ class gEDAManager:
         
         # Parent Folder
         name = self.project.name.split('.')[0]
-        image = self.utils.get_node_image('project')
+        image = self.utils.get_node_image(self, 'project')
         parent = self.sources.append(None, [image, name, self.project.directory])
 
         # Child Node
-        image = self.utils.get_node_image(self.project.name)
+        image = self.utils.get_node_image(self, self.project.name)
         path = self.project.directory + '/' + self.project.name        
         self.sources.append(parent, [image, self.project.name, path])
         self.sources_tree.expand_all()
@@ -595,6 +628,7 @@ class gEDAManager:
          and it is not a bid deal to push out a utility just for this. """
         self.project.file_list = [self.project.directory, [self.project.directory +'/' + self.project.name]]
 
+
     def load_tree(self, list, parent=None):
         """!
         Method to the load the tree -- recursively.
@@ -606,9 +640,9 @@ class gEDAManager:
             if file_path[0] == '/': # means this file is a parent
                 name = self.utils.get_node_name(file_path)
                 if file_path == self.project.directory:
-                    image = self.utils.get_node_image('project')
+                    image = self.utils.get_node_image(self, 'project')
                 else:
-                    image = self.utils.get_node_image(name)
+                    image = self.utils.get_node_image(self, name)
                 n_parent = self.sources.append(parent, [image, name, file_path])
             else:
                 # recursion
@@ -704,7 +738,6 @@ class gEDAManager:
     # Callback Methods -- signal handlers are event driven
     ######################################################
 
-
     # Help Menu #
     def cb_show_about_dialog(self, menuitem, data=None):
         """!
@@ -726,7 +759,7 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://geda.seul.org/wiki/')
         except:
-            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + sys.exc_info()[0] + '.\n')            
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')            
 
 
     def cb_url_geda_documentation(self, menuitem, data=None):
@@ -738,7 +771,7 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://geda.seul.org/wiki/geda:documentation')
         except:
-            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + sys.exc_info()[0] + '.\n')
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')
 
 
     def cb_url_geda_manager(self, menuitem, data=None):
@@ -750,7 +783,9 @@ class gEDAManager:
         try:
             gnomevfs.url_show('http://www.gempillar.com')
         except:
-            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + sys.exc_info()[0] + '.\n')                        
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')                        
+
+
 
 
     # File Menu #
@@ -1024,7 +1059,6 @@ class gEDAManager:
         @param data optional to pass in.
         """
 
-    # TODO -- decide if I want to combine the three functions below
     def cb_project_closed(self, widget, event):
         """!
         Event occurs when a Project object is closed
@@ -1155,12 +1189,12 @@ class gEDAManager:
         except IOError, detail:
             self.errors_textbuffer.insert(self.errors_textiter, 'IOError: ' + detail + '.\n')
         except:
-            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + sys.exc_info()[0] + '.\n')            
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')            
             raise
         
         name = self.utils.get_node_name(path)
         # Find out what file it is so we can pick an icon for it
-        image = self.utils.get_node_image(name)
+        image = self.utils.get_node_image(self, name)
         self.sources.append(selection_iter, [image, name, path])
         # Add the new folder to project file list
         self.utils.update_file_list(self)
@@ -1172,7 +1206,32 @@ class gEDAManager:
         """
         self.utils.update_file_list(self, 2)
 
-        
+
+    def cb_cell_edited(self, cell, path, new_text, model):
+        """!
+        Event handler to catch the event of the user editing a cell in the
+        'Sources' tree view.
+        @param cell is the gtk.CellRendererText that was changed.
+        @param path is the tree path (as a string) to the row containing the
+        edited cell.
+        @param new_text is the edited text.
+        @param model is the gtk.TreeStore model for the tree view.
+        """
+        old_path = model[path][2]
+        new_path = old_path.rpartition('/')[0] + '/' + new_text
+        try:
+            os.rename(old_path, new_path)
+            model[path][1] = new_text
+            model[path][2] = new_path
+            self.utils.update_file_list(self) # update file list
+        except OSError:
+            self.errors_textbuffer.insert(self.errors_textiter, 'OSError: ' + str(sys.exc_info()[0]) + '.\n')        
+        except IOError:
+            self.errors_textbuffer.insert(self.errors_textiter, 'IOError: ' + str(sys.exc_info()[0]) + '.\n')
+        except:
+            self.errors_textbuffer.insert(self.errors_textiter, 'Unexpected error: ' + str(sys.exc_info()[0]) + '.\n')            
+
+
     def cb_row_activated(self, widget, path, view_column):
         """!
         Event occurs when 'row-activated' signal is emitted or a user double
@@ -1197,6 +1256,15 @@ class gEDAManager:
         model, selection_iter = selection.get_selected()
         selected_node = self.sources.get_value(selection_iter, 2)
         name = self.utils.get_node_name(selected_node)
+        if '.' in name:
+            # Logic to call function to find what type of file it is
+            # and then to populate the according tree view
+            ext = name.split('.')[-1]
+            self.utils.get_processes_tree(self, ext)
+        else: # We have a folder
+            # Logic to call the functions to populate the 'Processes' tree
+            # view.
+            pass
         # Update 'Processes: ' for the 'Processes' tree
         column = self.processes_tree.get_column(0)
         column.set_title('Processes for: ' + name)
@@ -1213,7 +1281,7 @@ class gEDAManager:
         self.popup_uimanager.remove_ui(merge_id)
 
         
-    def cb_treeview_popup(self, widget, event):
+    def cb_button_press(self, widget, event):
         """!
         This signal handler will be called when the treeview emits
         a 'button_press_event' signal.
@@ -1247,16 +1315,16 @@ class gEDAManager:
             # Choose Popup Menu
             if selected_node == self.project.directory:
                 # Project Folder
-                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file('project_popup.xml'))
+                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file(self, 'project_popup.xml'))
                 popup_menu = self.popup_uimanager.get_widget('/popup')
             elif '.' not in selected_node:
                 # Folder
-                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file('folder_popup.xml'))
+                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file(self, 'folder_popup.xml'))
 
                 popup_menu = self.popup_uimanager.get_widget('/popup')
             else:
                 # File
-                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file('file_popup.xml'))
+                merge_id = self.popup_uimanager.add_ui_from_file(self.utils.get_file(self, 'file_popup.xml'))
                 popup_menu = self.popup_uimanager.get_widget('/popup')
                 
             popup_menu.connect('deactivate', self.cb_popup_deactivate, merge_id)
diff --git a/src/newproject.py b/src/newproject.py
index d0fa8e8..667234a 100644
--- a/src/newproject.py
+++ b/src/newproject.py
@@ -21,6 +21,7 @@ class NewProject:
         called from.
         """
         self.project = gedamanager.project
+        self.manager = gedamanager
         self.assistant = gtk.Assistant()
         self.assistant.connect('close', self.cb_close)
         self.assistant.connect('apply', self.cb_apply)
@@ -286,7 +287,7 @@ class NewProject:
             md.hide_all()
             return
         except:
-            print "Unexpected error:", sys.exc_info()[0]
+            self.manager.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  str(sys.exc_info()[0]) + '.\n')                        
             md = gtk.MessageDialog(self.assistant,
                                    (gtk.DIALOG_MODAL |
                                     gtk.DIALOG_DESTROY_WITH_PARENT),
diff --git a/src/project.py b/src/project.py
index 8d0647e..9f177f9 100644
--- a/src/project.py
+++ b/src/project.py
@@ -122,7 +122,6 @@ class Project(gobject.GObject):
             self.clean = True
             self.emit('opened', True)
         except IOError:
-            print path
             print sys.exc_info()[0]        
 
 gobject.type_register(Project)
diff --git a/src/utils.py b/src/utils.py
index 3a4fbb9..c14e865 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -6,12 +6,13 @@
 
 import os, pygtk, gtk
 pygtk.require('2.0')
+from gedamanager import gEDAManager
 from project import *
 from settings import *
 from distutils.dir_util import remove_tree
 
 
-class Utils:
+class Utils(gEDAManager):
     """
     Utility class for the gEDA Manager.
     """
@@ -26,7 +27,7 @@ class Utils:
                 'gbr': '../images/bitmaps/gerbv-icon26.png',
                 'cnc': '',
                 'gerbv': '',
-                'g2p': '',
+                'g2p': '../images/bitmaps/geda-xgsch2pcb-26.png',
                 'gafrc': '',
                 'gschemrc': '',
                 'gnetlistrc': '',
@@ -40,11 +41,11 @@ class Utils:
                 'sym': '../images/bitmaps/schematic-module.bmp',
                 'ps': '',
                 'png': '../images/bitmaps/image.png',
-                'bom1': '../images/bitmaps/money.png',
+                'bom': '../images/bitmaps/money.png',
                 'bom2': '../images/bitmaps/money_add.png',
                 'tex': '',
                 'gnumeric': '',
-                'spice': '../images/bitmaps/plot_singlepot.png',
+                'spice': '../images/bitmaps/plot_singleplot.png',
                 'dwg': '',
                 'other': '../images/bitmaps/page_white_error.png',}
 
@@ -58,18 +59,20 @@ class Utils:
         self.directory = os.getcwd()
 
 
-    def get_file(self, filename):
+    def get_file(self, gedamanager, filename):
         """!
         Method to get the file from the file look up table.
+        @param gedamanager is the current gEDAManager instance.
         @param filename is the file to find.
         @returns path to the file.
         """
+        g = gedamanager
         try:
             current_directory = os.getcwd()
         except OSError:
-            print 'OSError:', sys.exc_info()[0]
+            g.errors_textbuffer.insert(g.errors_textiter, 'OSError: ' +  str(sys.exc_info()[0]) + '.\n')
         except:
-            print 'Unexpected error:', sys.exc_info[0]
+            g.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  str(sys.exc_info()[0]) + '.\n')
             raise
 
         os.chdir(self.directory)
@@ -79,18 +82,20 @@ class Utils:
         os.chdir(current_directory)
         return f
 
-    def get_node_image(self, name):
+    def get_node_image(self, gedamanager, name):
         """!
         Method to get the image for node with param name.
+        @param gedamanager is the current gEDAManager instance.        
         @param name of the file.
         @return a gtk.Pixbuf image is returned
         """
+        g = gedamanager
         try:
             current_directory = os.getcwd()
         except OSError:
-            print 'OSError:', sys.exc_info[0]
+            g.errors_textbuffer.insert(g.errors_textiter, 'OSError: ' +  str(sys.exc_info()[0]) + '.\n')
         except:
-            print 'Unexpected error:', sys.exc_info[0]
+            g.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  str(sys.exc_info()[0]) + '.\n')
             raise
 
         os.chdir(self.directory)            
@@ -128,19 +133,14 @@ class Utils:
         """!
         Method to update the gEDA Manager's project file list any time
         the 'Sources' tree view is changed.
-        @param gedamanager is the the gEDAManager instance.
-        @param index (0 = add copy source, 1 =  delete source,
+        @param gedamanager is the current gEDAManager instance.        
+        @param index (0 = add copy source, 1 = delete source,
         2 = delete folder)
-        @param filename is the the filename of the source to add or copy.
+        @param filename is the filename of the source to copy.
         """
-        # TODO -- Code clean up is possible with the back of the envelope
-        # algorithm that I am using below to recursively iterate over the
-        # tree view.  For some reason, I am appending None to the lists and
-        # I later have to remove them.  If anyone can clean this up, that
-        # would be nice. 
         g = gedamanager
         def child_recurse(row_iter):
-            """
+            """!
             Internal function to iterate recursively over child nodes.
             @param row_iter is the gtk.TreeModelRowIter object.
             @return a list of child nodes.
@@ -167,7 +167,7 @@ class Utils:
         name = self.get_node_name(selected_node)
         if filename != None:
             name = self.get_node_name(filename)
-        image = self.get_node_image(name)        
+        image = self.get_node_image(g, name)        
         path = selected_node + '/' + name
 
         try:
@@ -196,16 +196,16 @@ class Utils:
                     g.sources.remove(selection_iter)
                     g.output_textbuffer.insert(g.output_textiter, 'Folder deleted: ' + selected_node + '.\n')                                                                        
         except IOError:
-            g.errors_textbuffer.insert(g.errors_textiter, 'IOError: ' +  sys.exc_info()[0] + '.\n')
+            g.errors_textbuffer.insert(g.errors_textiter, 'IOError: ' +  str(sys.exc_info()[0]) + '.\n')
         except OSError:
-            g.errors_textbuffer.insert(g.errors_textiter, 'OSError: ' +  sys.exc_info()[0] + '.\n')            
+            g.errors_textbuffer.insert(g.errors_textiter, 'OSError: ' +  str(sys.exc_info()[0]) + '.\n')            
         except:
-            g.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  sys.exc_info()[0] + '.\n')            
+            g.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  str(sys.exc_info()[0]) + '.\n')            
             raise
-            
+
         # Project's File List
         project_file = g.project.directory + '/' + g.project.name
-        g.project.file_list = []#[g.project.directory, [project_file]]
+        g.project.file_list = [] #[g.project.directory, [project_file]]
         for row in g.sources:
             # Get the name of the node
             if row[2] == g.project.directory: # Project Folder
@@ -219,4 +219,56 @@ class Utils:
                 g.project.file_list.append(child_list)
 
         g.sources_tree.expand_all()
-                    
+
+
+    def get_processes_tree(self, gedamanager, ext=None):
+        """!
+        Method to populate the 'Processes' tree view in the gEDA Manager.
+        @param gedamanager is the current gEDAManager instance.        
+        @param ext is the filename extension for the currently selected node
+        in the 'Sources' tree view.
+        """
+        g = gedamanager
+        try:
+            current_directory = os.getcwd()
+        except OSError:
+            g.errors_textbuffer.insert(g.errors_textiter, 'OSError: ' +  str(sys.exc_info()[0]) + '.\n')
+        except:
+            g.errors_textbuffer.insert(g.errors_textiter, 'Unexpected error: ' +  str(sys.exc_info()[0]) + '.\n')
+            raise
+
+        os.chdir(self.directory)            
+
+        print ext
+        if ext == 'sch':
+            icon_type = self.icon_lut['g2p']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            g.processes.append(None, [image, 'gsch2pcb'])
+            icon_type = self.icon_lut['other']#icon_type = self.icon_lut['net']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            parent = g.processes.append(None, [image, 'gnetlist'])
+            netlists = ['bom2','calay','mathematica','vipec','geda','systemc','allegro','redac','drc2','cascade','pads','bae','pcbpins','vams','drc','gsch2pcb','partslist2','partslist3','partslist-common','gossip','maxascii','PCB','vhdl','tango','spice-sdb','partstlist1','PCBboard','switchcap','osmond','spice','verilog','bom','eagle','protelII','futurenet2']
+            for netlist in sorted(netlists):
+                g.processes.append(parent, [None, netlist])
+            icon_type = self.icon_lut['other']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            g.processes.append(None, [image, 'refdes_renum'])
+            icon_type = self.icon_lut['other']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            g.processes.append(None, [image, 'grenum'])
+            icon_type = self.icon_lut['spice']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            g.processes.append(None, [image, 'gspiceui'])
+            icon_type = self.icon_lut['gattribrc']
+            image = gtk.gdk.pixbuf_new_from_file(icon_type)
+            g.processes.append(None, [image, 'gattrib'])
+        elif ext == 'v':
+            pass
+        elif ext == 'pcb':
+            pass
+            # add more
+        if ext == None: # We have a folder, so we will need to look through
+            pass
+        
+        os.chdir(current_directory)            
+




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