Bit of cleanup of old un-needed cruft, and place standard header.
This commit is contained in:
parent
4f7464b915
commit
103e609fae
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="2.18"/>
|
<requires lib="gtk+" version="2.16"/>
|
||||||
<!-- interface-naming-policy project-wide -->
|
<!-- interface-naming-policy project-wide -->
|
||||||
<object class="GtkWindow" id="layoutlauncherwin">
|
<object class="GtkWindow" id="layoutlauncherwin">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
"""Layout Launcher for Terminator.
|
# Terminator by Chris Jones <cmsj@tenshu.net>
|
||||||
|
# GPL v2 only
|
||||||
Load a UIBuilder config file, display it, populate it with our current layouts,
|
"""layoutlauncher.py - class for the Layout Launcher window"""
|
||||||
then allow launching it as a new instance
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import gtk
|
import gtk
|
||||||
|
@ -27,16 +24,14 @@ class LayoutLauncher:
|
||||||
layouttreeview = None
|
layouttreeview = None
|
||||||
layouttreestore = None
|
layouttreestore = None
|
||||||
|
|
||||||
def __init__ (self): #, term):
|
def __init__ (self):
|
||||||
self.terminator = Terminator()
|
self.terminator = Terminator()
|
||||||
self.terminator.register_launcher_window(self)
|
self.terminator.register_launcher_window(self)
|
||||||
|
|
||||||
self.config = config.Config()
|
self.config = config.Config()
|
||||||
#self.term = term
|
|
||||||
self.builder = gtk.Builder()
|
self.builder = gtk.Builder()
|
||||||
#self.keybindings = Keybindings()
|
|
||||||
try:
|
try:
|
||||||
# Figure out where our library is on-disk so we can open our
|
# Figure out where our library is on-disk so we can open our UI
|
||||||
(head, _tail) = os.path.split(config.__file__)
|
(head, _tail) = os.path.split(config.__file__)
|
||||||
librarypath = os.path.join(head, 'layoutlauncher.glade')
|
librarypath = os.path.join(head, 'layoutlauncher.glade')
|
||||||
gladefile = open(librarypath, 'r')
|
gladefile = open(librarypath, 'r')
|
||||||
|
@ -48,21 +43,12 @@ class LayoutLauncher:
|
||||||
|
|
||||||
self.builder.add_from_string(gladedata)
|
self.builder.add_from_string(gladedata)
|
||||||
self.window = self.builder.get_object('layoutlauncherwin')
|
self.window = self.builder.get_object('layoutlauncherwin')
|
||||||
#self.layouteditor = LayoutEditor(self.builder)
|
|
||||||
self.builder.connect_signals(self)
|
self.builder.connect_signals(self)
|
||||||
self.window.connect('destroy', self.on_destroy_event)
|
self.window.connect('destroy', self.on_destroy_event)
|
||||||
#self.layouteditor.prepare()
|
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
self.layouttreeview = self.builder.get_object('layoutlist')
|
self.layouttreeview = self.builder.get_object('layoutlist')
|
||||||
self.layouttreestore = self.builder.get_object('layoutstore')
|
self.layouttreestore = self.builder.get_object('layoutstore')
|
||||||
self.update_layouts()
|
self.update_layouts()
|
||||||
try:
|
|
||||||
#self.config.inhibit_save()
|
|
||||||
#self.set_values()
|
|
||||||
pass
|
|
||||||
except Exception, e:
|
|
||||||
err('Unable to set values: %s' % e)
|
|
||||||
#self.config.uninhibit_save()
|
|
||||||
|
|
||||||
def on_destroy_event(self, widget, data=None):
|
def on_destroy_event(self, widget, data=None):
|
||||||
"""Handle window destruction"""
|
"""Handle window destruction"""
|
||||||
|
|
Loading…
Reference in New Issue