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

gEDA-cvs: branch: master updated (9823a0908c711381bd09dbcf0fa2415009e8e9ca)



The branch, master has been updated
       via  9823a0908c711381bd09dbcf0fa2415009e8e9ca (commit)
      from  791b2c645d4f4de647debda1df4e04af246c2bc8 (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 |   50 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 17 deletions(-)


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

commit 9823a0908c711381bd09dbcf0fa2415009e8e9ca
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Wed Jul 16 23:26:05 2008 -0700

    Terminal integration has been added.

:100644 100644 2825426... 6161475... M	src/gedamanager.py

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

commit 9823a0908c711381bd09dbcf0fa2415009e8e9ca
Author: Newell Jensen <jensen@xxxxxxxxxxxxxxx>
Date:   Wed Jul 16 23:26:05 2008 -0700

    Terminal integration has been added.

diff --git a/src/gedamanager.py b/src/gedamanager.py
index 2825426..6161475 100644
--- a/src/gedamanager.py
+++ b/src/gedamanager.py
@@ -4,7 +4,7 @@
 #Top-level window for the gEDA Manager
 #@author Newell Jensen
 
-import os, sys, gtk, pygtk, yaml, gnomevfs, gobject, shutil
+import os, sys, gtk, pygtk, yaml, gnomevfs, gobject, shutil, vte
 pygtk.require('2.0')
 from project import *
 from settings import *
@@ -313,6 +313,34 @@ class gEDAManager:
         notebook.show()
         vpaned1.pack2(notebook, True, True)
         notebook.set_tab_pos(gtk.POS_BOTTOM)
+        scrolled_window5 = gtk.ScrolledWindow()
+        scrolled_window5.show()
+
+        # Add a terminal to the terminal output notebook
+        for f in sys.argv:
+            print f
+        current_directory = os.getcwd()
+        try:
+            os.chdir(self.project.directory)
+        except:
+            print 'Unable to switch to', self.project.directory
+        term = vte.Terminal()
+        term.connect("child-exited", lambda terminal: gtk.main_quit())
+        term.fork_command()
+        term.show()
+        try:
+            os.chdir(current_directory)
+        except:
+            print 'Unable to switch to', current_directory
+        scrolled_window5.set_shadow_type(gtk.SHADOW_IN)
+        scrolled_window5.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+        scrolled_window5.add_with_viewport(term)
+        notebook.add(scrolled_window5)
+
+        terminal_icon = gtk.Image()
+        terminal_icon.set_from_file('../images/icons/terminal.jpg')
+        terminal_icon.show()
+        notebook.set_tab_label(notebook.get_nth_page(0), terminal_icon)
 
         scrolled_window3 = gtk.ScrolledWindow()
         scrolled_window3.show()
@@ -327,7 +355,7 @@ class gEDAManager:
         output_icon = gtk.image_new_from_stock('gtk-justify-fill',
                                                gtk.ICON_SIZE_BUTTON)
         output_icon.show()
-        notebook.set_tab_label(notebook.get_nth_page(0), output_icon)
+        notebook.set_tab_label(notebook.get_nth_page(1), output_icon)
 
         scrolled_window4 = gtk.ScrolledWindow()
         scrolled_window4.show()
@@ -342,22 +370,8 @@ class gEDAManager:
         errors_icon = gtk.image_new_from_stock('gtk-dialog-error',
                                                gtk.ICON_SIZE_BUTTON)
         errors_icon.show()
-        notebook.set_tab_label(notebook.get_nth_page(1), errors_icon)
-
-        scrolled_window5 = gtk.ScrolledWindow()
-        scrolled_window5.show()
-        scrolled_window5.set_shadow_type(gtk.SHADOW_IN)
-        scrolled_window5.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        notebook.add(scrolled_window5)
-
-        textview4 = gtk.TextView()
-        textview4.show()
-        scrolled_window5.add(textview4)
+        notebook.set_tab_label(notebook.get_nth_page(2), errors_icon)
 
-        terminal_icon = gtk.Image()
-        terminal_icon.set_from_file('../images/icons/terminal.jpg')
-        terminal_icon.show()
-        notebook.set_tab_label(notebook.get_nth_page(2), terminal_icon)
 
     ####################################
     # Methods 
@@ -1214,6 +1228,8 @@ class gEDAManager:
             model, selection_iter = selection.get_selected()
             if selection_iter != None:
                 selected_node = self.sources.get_value(selection_iter, 2)
+            else:
+                return
             popup_menu = gtk.Menu()
             actiongroup = gtk.ActionGroup('Popup')
             actiongroup_list = [('Save Project As...', None, 'Save Pro_ject As...', None, 'Save Active Project As...', self.cb_save_project_as),




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