diff --git a/terminator b/terminator index 9330f7de..cb5eac3e 100755 --- a/terminator +++ b/terminator @@ -163,7 +163,5 @@ See the following bug report for more details: (debugthread, debugsvr) = debugserver.spawn(locals()) term.debugaddress = debugsvr.server_address -# from terminatorlib.prefs_profile import ProfileEditor -# prefs = ProfileEditor () gtk.main() diff --git a/terminatorlib/prefs_profile.py b/terminatorlib/prefs_profile.py index 9a17af07..85479fcb 100644 --- a/terminatorlib/prefs_profile.py +++ b/terminatorlib/prefs_profile.py @@ -30,9 +30,14 @@ class ProfileEditor: self.window = gtk.Window () self.notebook = gtk.Notebook() self.box = gtk.VBox() - self.closebut = gtk.Button(stock=gtk.STOCK_CLOSE) + self.butbox = gtk.HButtonBox() + self.applybut = gtk.Button(stock=gtk.STOCK_APPLY) + self.cancelbut = gtk.Button(stock=gtk.STOCK_CANCEL) self.box.pack_start(self.notebook, False, False) - self.box.pack_end(self.closebut, False, False) + self.box.pack_end(self.butbox, False, False) + self.butbox.set_layout(gtk.BUTTONBOX_END) + self.butbox.pack_start(self.applybut, False, False) + self.butbox.pack_start(self.cancelbut, False, False) self.window.add (self.box) self.notebook.append_page (self.auto_add (gtk.Table (), self.globals), gtk.Label ("Global Settings")) @@ -41,6 +46,7 @@ class ProfileEditor: self.notebook.append_page (self.auto_add (gtk.Table (), self.colours), gtk.Label ("Colours")) self.notebook.append_page (self.auto_add (gtk.Table (), self.behaviour), gtk.Label ("Behaviour")) + def go (self): self.window.show_all () def source_get_type (self, key): diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 5ea107f7..64583a5b 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -29,6 +29,7 @@ from config import dbg, err, debug from terminatorlib.keybindings import TerminatorKeybindings from terminatorlib.terminatorterm import TerminatorTerm +from terminatorlib.prefs_profile import ProfileEditor class TerminatorNotebookTabLabel(gtk.HBox): def __init__(self, title, notebook, terminator): @@ -1038,3 +1039,7 @@ class Terminator: widget._vte.grab_focus () + def edit_profile (self, widget): + options = ProfileEditor() + options.go() + print "done" diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index fa198cb8..90a6d9cd 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -985,6 +985,13 @@ text/plain item = gtk.MenuItem () menu.append (item) + item = gtk.MenuItem (_("Ed_it profile")) + item.connect ("activate", lambda menu_item: self.terminator.edit_profile (self)) + menu.append (item) + + item = gtk.MenuItem () + menu.append (item) + item = gtk.ImageMenuItem (gtk.STOCK_CLOSE) item.connect ("activate", lambda menu_item: self.terminator.closeterm (self)) menu.append (item)