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

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



The branch, master has been updated
       via  1092956eabfaaaedb18b39217dbc13f720920028 (commit)
      from  a5231e95a421d68cf83a36782e963d598a323bfb (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/gedamanager.py |    9 ++++++---
 src/utils.py       |   36 +++++++++++++++++++++++++++++++-----
 2 files changed, 37 insertions(+), 8 deletions(-)


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

commit 1092956eabfaaaedb18b39217dbc13f720920028
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Sun Aug 3 11:52:01 2008 -0700

    Routine checkin.

:100644 100644 e139efb... 6674db8... M	src/gedamanager.py
:100644 100644 5dac5f1... e03cad4... M	src/utils.py

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

commit 1092956eabfaaaedb18b39217dbc13f720920028
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Sun Aug 3 11:52:01 2008 -0700

    Routine checkin.

diff --git a/src/gedamanager.py b/src/gedamanager.py
index e139efb..6674db8 100644
--- a/src/gedamanager.py
+++ b/src/gedamanager.py
@@ -916,13 +916,16 @@ class gEDAManager:
                 # and then to populate the according tree view
                 ext = name.split('.')[-1]
                 self.utils.get_processes_tree(self, ext)
+                # Update 'Processes: ' for the 'Processes' tree
+                column = self.processes_tree.get_column(0)
+                column.set_title('Processes for: ' + name)
             else: # We have a folder
                 # Logic to call the functions to populate the 'Processes' tree
                 # view.
                 self.utils.get_processes_tree(self)
-            # Update 'Processes: ' for the 'Processes' tree
-            column = self.processes_tree.get_column(0)
-            column.set_title('Processes for: ' + name)
+                # Update 'Processes: ' for the 'Processes' tree
+                column = self.processes_tree.get_column(0)
+                column.set_title('Processes for all files in: ' + name)
 
 
     def cb_popup_deactivate(self, popup_menu, merge_id):
diff --git a/src/utils.py b/src/utils.py
index 5dac5f1..e03cad4 100644
--- a/src/utils.py
+++ b/src/utils.py
@@ -125,7 +125,7 @@ class Utils:
                          'gbr': 'application-x-gerber',
                          'gerber': 'application-x-gerber',
                          'cnc': 'application-x-excellon',
-                         'net': 'application-x-geda-netlist',
+                         'net': 'application-x-pcb-netlist',
                          'exc': 'application-x-excellon',
                          'fp': 'application-x-pcb-footprint'}
                          
@@ -240,18 +240,37 @@ class Utils:
 
 
     @exceptions
-    def get_processes_tree(self, gedamanager, ext=None):
+    def get_processes_tree(self, gedamanager, ext=None, folder=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.
+        @param folder is a flag used to let the method know whether or not a
+        folder has been selected.
         """
         g = gedamanager
         current_directory = os.getcwd()
         os.chdir(self.directory)            
         g.processes.clear()
         icon = gtk.IconTheme()
+        
+        if ext == None and folder != None:
+            selection = g.sources_tree.get_selection()
+            model, selection_iter = selection.get_selected()
+            selected_node = g.sources.get_value(selection_iter, 2)
+
+            # Iterate over the folder to see what types of files they have
+            # and build the tree this way.
+            files = os.listdir(selected_node)
+            for f in files:
+                ext = self.get_node_ext(f)
+                # recursively structure the tree
+                if ext in self.icon_lut:
+                    self.get_processes_tree(self, g, ext, True)
+                else:
+                    print 'self.icon_lut does not contain:', ext
+            
         if ext == 'sch':
             # Parent folders
             simulation = g.processes.append(None, ['Simulation', None])
@@ -284,16 +303,23 @@ class Utils:
 
         elif ext == 'pcb':
             # Parent folders
-            create_gerber = g.processes.append(None, ['Create Gerber files', None])
+            create_gerber = g.processes.append(None, ['Create Gerber files', None])            
             image = icon.load_icon(self.icon_lut['pcb'], 22, 0) 
             g.processes.append(create_gerber, ['PCB', image])
 
         elif ext == 'gbr':
             # Parent folders
-            analyize_gerber = g.processes.append(None, ['View Gerber file', None])
+            analyze_gerber = g.processes.append(None, ['View Gerber file', None])
             image = icon.load_icon(self.icon_lut['gbr'], 22, 0) 
-            g.processes.append(modify_attributes, ['Gerbv', image])
+            g.processes.append(analyze_gerber, ['Gerbv', image])
+
+        elif ext == 'sym':
+            # Parent folders
+            check_symbols = g.processes.append(None, ['Check symbols', None])
+            image = icon.load_icon(self.icon_lut['sym'], 22, 0) 
+            g.processes.append(check_symbols, ['gsymcheck', image])
 
+        # There is obviously more to put in here
         if ext == None: # We have a folder, so we will need to look through
             pass
         




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