make profile editor opened the conext menu and improve its appearance
This commit is contained in:
parent
e244329725
commit
434c253237
|
@ -163,7 +163,5 @@ See the following bug report for more details:
|
||||||
(debugthread, debugsvr) = debugserver.spawn(locals())
|
(debugthread, debugsvr) = debugserver.spawn(locals())
|
||||||
term.debugaddress = debugsvr.server_address
|
term.debugaddress = debugsvr.server_address
|
||||||
|
|
||||||
# from terminatorlib.prefs_profile import ProfileEditor
|
|
||||||
# prefs = ProfileEditor ()
|
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,14 @@ class ProfileEditor:
|
||||||
self.window = gtk.Window ()
|
self.window = gtk.Window ()
|
||||||
self.notebook = gtk.Notebook()
|
self.notebook = gtk.Notebook()
|
||||||
self.box = gtk.VBox()
|
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_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.window.add (self.box)
|
||||||
|
|
||||||
self.notebook.append_page (self.auto_add (gtk.Table (), self.globals), gtk.Label ("Global Settings"))
|
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.colours), gtk.Label ("Colours"))
|
||||||
self.notebook.append_page (self.auto_add (gtk.Table (), self.behaviour), gtk.Label ("Behaviour"))
|
self.notebook.append_page (self.auto_add (gtk.Table (), self.behaviour), gtk.Label ("Behaviour"))
|
||||||
|
|
||||||
|
def go (self):
|
||||||
self.window.show_all ()
|
self.window.show_all ()
|
||||||
|
|
||||||
def source_get_type (self, key):
|
def source_get_type (self, key):
|
||||||
|
|
|
@ -29,6 +29,7 @@ from config import dbg, err, debug
|
||||||
|
|
||||||
from terminatorlib.keybindings import TerminatorKeybindings
|
from terminatorlib.keybindings import TerminatorKeybindings
|
||||||
from terminatorlib.terminatorterm import TerminatorTerm
|
from terminatorlib.terminatorterm import TerminatorTerm
|
||||||
|
from terminatorlib.prefs_profile import ProfileEditor
|
||||||
|
|
||||||
class TerminatorNotebookTabLabel(gtk.HBox):
|
class TerminatorNotebookTabLabel(gtk.HBox):
|
||||||
def __init__(self, title, notebook, terminator):
|
def __init__(self, title, notebook, terminator):
|
||||||
|
@ -1038,3 +1039,7 @@ class Terminator:
|
||||||
|
|
||||||
widget._vte.grab_focus ()
|
widget._vte.grab_focus ()
|
||||||
|
|
||||||
|
def edit_profile (self, widget):
|
||||||
|
options = ProfileEditor()
|
||||||
|
options.go()
|
||||||
|
print "done"
|
||||||
|
|
|
@ -985,6 +985,13 @@ text/plain
|
||||||
item = gtk.MenuItem ()
|
item = gtk.MenuItem ()
|
||||||
menu.append (item)
|
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 = gtk.ImageMenuItem (gtk.STOCK_CLOSE)
|
||||||
item.connect ("activate", lambda menu_item: self.terminator.closeterm (self))
|
item.connect ("activate", lambda menu_item: self.terminator.closeterm (self))
|
||||||
menu.append (item)
|
menu.append (item)
|
||||||
|
|
Loading…
Reference in New Issue