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

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



The branch, master has been updated
       via  73d89440f9caa1a97e038a121bbc6070f6097489 (commit)
      from  2b4ccc07a13c79397c7563d762756be6bac8c506 (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/GHDL_logo-22.png            |  Bin 0 -> 1050 bytes
 images/bitmaps/application_xp_terminal.png |  Bin 0 -> 507 bytes
 images/bitmaps/background-logo-icon.png    |  Bin 0 -> 1057 bytes
 images/bitmaps/exclamation.png             |  Bin 0 -> 701 bytes
 images/bitmaps/flag_red.png                |  Bin 0 -> 665 bytes
 images/bitmaps/report.png                  |  Bin 0 -> 649 bytes
 images/bitmaps/tick.png                    |  Bin 0 -> 537 bytes
 src/dependencyloop.py                      |   79 ++++++++++++++++++++++++++++
 src/processdependencyevent.py              |   56 ++++++++++++++++++++
 9 files changed, 135 insertions(+), 0 deletions(-)
 create mode 100644 images/bitmaps/GHDL_logo-22.png
 create mode 100644 images/bitmaps/application_xp_terminal.png
 create mode 100644 images/bitmaps/background-logo-icon.png
 create mode 100644 images/bitmaps/exclamation.png
 create mode 100644 images/bitmaps/flag_red.png
 create mode 100644 images/bitmaps/report.png
 create mode 100644 images/bitmaps/tick.png
 create mode 100644 src/dependencyloop.py
 create mode 100644 src/processdependencyevent.py


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

commit 73d89440f9caa1a97e038a121bbc6070f6097489
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Mon Aug 18 00:22:40 2008 -0700

    Adding the files that I accidentally left out of the last checkin.

:000000 100644 0000000... a1a9898... A	images/bitmaps/GHDL_logo-22.png
:000000 100644 0000000... c28dd63... A	images/bitmaps/application_xp_terminal.png
:000000 100644 0000000... 25ddbf9... A	images/bitmaps/background-logo-icon.png
:000000 100644 0000000... c37bd06... A	images/bitmaps/exclamation.png
:000000 100644 0000000... e8a602d... A	images/bitmaps/flag_red.png
:000000 100644 0000000... 779ad58... A	images/bitmaps/report.png
:000000 100644 0000000... a9925a0... A	images/bitmaps/tick.png
:000000 100644 0000000... 84ec9ca... A	src/dependencyloop.py
:000000 100644 0000000... e0c7930... A	src/processdependencyevent.py

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

commit 73d89440f9caa1a97e038a121bbc6070f6097489
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Mon Aug 18 00:22:40 2008 -0700

    Adding the files that I accidentally left out of the last checkin.

diff --git a/images/bitmaps/GHDL_logo-22.png b/images/bitmaps/GHDL_logo-22.png
new file mode 100644
index 0000000..a1a9898
Binary files /dev/null and b/images/bitmaps/GHDL_logo-22.png differ
diff --git a/images/bitmaps/application_xp_terminal.png b/images/bitmaps/application_xp_terminal.png
new file mode 100644
index 0000000..c28dd63
Binary files /dev/null and b/images/bitmaps/application_xp_terminal.png differ
diff --git a/images/bitmaps/background-logo-icon.png b/images/bitmaps/background-logo-icon.png
new file mode 100644
index 0000000..25ddbf9
Binary files /dev/null and b/images/bitmaps/background-logo-icon.png differ
diff --git a/images/bitmaps/exclamation.png b/images/bitmaps/exclamation.png
new file mode 100644
index 0000000..c37bd06
Binary files /dev/null and b/images/bitmaps/exclamation.png differ
diff --git a/images/bitmaps/flag_red.png b/images/bitmaps/flag_red.png
new file mode 100644
index 0000000..e8a602d
Binary files /dev/null and b/images/bitmaps/flag_red.png differ
diff --git a/images/bitmaps/report.png b/images/bitmaps/report.png
new file mode 100644
index 0000000..779ad58
Binary files /dev/null and b/images/bitmaps/report.png differ
diff --git a/images/bitmaps/tick.png b/images/bitmaps/tick.png
new file mode 100644
index 0000000..a9925a0
Binary files /dev/null and b/images/bitmaps/tick.png differ
diff --git a/src/dependencyloop.py b/src/dependencyloop.py
new file mode 100644
index 0000000..84ec9ca
--- /dev/null
+++ b/src/dependencyloop.py
@@ -0,0 +1,79 @@
+#! /usr/bin/env python
+
+# gEDA Manager
+# Copyright (C) 2008 Newell Jensen
+# Copyright (C) 2008 gEDA Contributors (see ChangeLog for details)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+##@package src.dependencyloop
+#Class to handle dependency loop for the project's sources.
+#@author Newell Jensen
+
+import gtk, pygtk
+pygtk.require('2.0')
+from pyinotify import *
+from processdependencyevent import *
+
+
+class DependencyLoop:
+    """
+    Class to handle the dependency loop for the project's sources.
+    This class uses the python module pyinotify which is used to watch for
+    filesystem changes.  This is all run in a separate thread from the main
+    execution thread and called as a seperate program in its own process.
+    """
+    def __init__(self, gedamanager):
+        """!
+        Constructor for the DependencyLoop class.
+        This class is component of the gEDAManager class ('has-a' relationship).
+        @param gedamanager is the current gEDAManager instance.
+        """
+        # Things to do: (we can get all the info from the gedamanager object
+        # Start the thread with the project's directory
+        self.g = gedamanager
+        self.watch_manager = WatchManager()
+        self.processdependencyevent = ProcessDependencyEvent(self.g)
+        self.threaded_notifier = ThreadedNotifier(self.watch_manager, self.processdependencyevent)
+        
+        self.threaded_notifier.start()
+        # start watching the project's directory recursively
+        if self.g.project.directory != None:
+            self.wdd = self.watch_manager.add_watch(self.g.project.directory, IN_MODIFY, rec=True)
+
+        
+    def swith_projects(self):
+        """
+        Method to switch which directory is being watched for events.
+        This method will be called when projects are changed, etc.
+        """
+        # TODO --I will need to call this when a project is renamed.
+        
+        # Takes care of subdirectories
+        self.watch_manager.rm_watch(self.wdd.values()) 
+        # Now add a new watch to the new project
+        # This line probable doesn't do anything for me
+        if self.g.project.directory != None:
+            self.wdd = self.watch_manager.add_watch(self.g.project.directory, IN_MODIFY, rec=True)
+
+
+    def kill_thread(self):
+        """
+        Method to kill the DependencyLoop thread when gEDAManager exits.
+        """
+        self.threaded_notifier.stop()
+        
+    
diff --git a/src/processdependencyevent.py b/src/processdependencyevent.py
new file mode 100644
index 0000000..e0c7930
--- /dev/null
+++ b/src/processdependencyevent.py
@@ -0,0 +1,56 @@
+#! /usr/bin/env python
+
+# gEDA Manager
+# Copyright (C) 2008 Newell Jensen
+# Copyright (C) 2008 gEDA Contributors (see ChangeLog for details)
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+##@package src.processevent
+#Class to process the events from the thread executed by DependencyLoop
+#@author Newell Jensen
+
+import gtk, pygtk
+pygtk.require('2.0')
+from utils import *
+from pyinotify import *
+
+
+class ProcessDependencyEvent(ProcessEvent):
+    """
+    Class to process the events from the thread executed by DependencyLoop.
+    """
+    # I need to be able to pass the gedamanager into this class somehow
+    def __init__(self, gedamanager):
+        """!
+        Constructor for the ProcessDependencyEvent class.
+        @param gedamanager is the current gEDAManager instance.
+        """
+        self.g = gedamanager
+
+        
+    def process_IN_MODIFY(self, event):
+        """!
+        Method to process the IN_MODIFY event from the pyinotify module
+        @param event is the current IN_MODIFY event that was caught for the
+        project's filesystem.
+        """
+        # Call method to set the status of the dependent files recursively
+        print 'event:',event
+        print 'event.pathname:',event.pathname
+        if event.pathname in self.g.project.dependency_dict:
+            self.g.utils.update_dependency_dict(self.g.project.dependency_dict[event.pathname])
+




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