diff --git a/terminator b/terminator index 7cd86a2f..69d18cec 100755 --- a/terminator +++ b/terminator @@ -54,11 +54,7 @@ if __name__ == '__main__': TERMINATOR = Terminator() TERMINATOR.origcwd = ORIGCWD TERMINATOR.reconfigure() - try: - TERMINATOR.create_layout(OPTIONS.layout) - except (KeyError,ValueError), ex: - err('layout creation failed, creating a window ("%s")' % ex) - TERMINATOR.new_window() + TERMINATOR.new_window() if OPTIONS.debug > 2: import terminatorlib.debugserver as debugserver diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 508e8f73..391849d8 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -2057,192 +2057,9 @@ - + True - - - True - vertical - - - True - True - LayoutListStore - adjustment5 - adjustment6 - 0 - - - Layout - True - - - - - - 1 - 0 - - - - - - - 0 - - - - - True - - - - - - gtk-add - True - True - True - True - - - - False - False - 1 - - - - - gtk-remove - True - True - True - True - - - - False - False - 2 - - - - - False - 1 - - - - - False - 0 - - - - - True - 6 - 6 - 6 - 6 - - - - - - 1 - - - - - True - vertical - - - True - 6 - - - True - 2 - 2 - 12 - 6 - - - True - Profile - - - - - - - - - True - Custom command - - - 1 - 2 - - - - - - - True - True - - - - 1 - 2 - 1 - 2 - - - - - - - True - layoutprofilelist - 0 - - - - 0 - - - - - 1 - 2 - GTK_FILL - - - - - - - - False - False - 0 - - - - - - - - False - 2 - - + Not yet implemented 2 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 39c89677..670a2ed9 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -23,7 +23,6 @@ class PrefsEditor: keybindings = None window = None builder = None - previous_layout_selection = None previous_profile_selection = None colorschemevalues = {'black_on_yellow': 0, 'black_on_white': 1, @@ -189,19 +188,6 @@ class PrefsEditor: selection.select_iter(self.profileiters['default']) ## Layouts tab - widget = guiget('layoutlist') - liststore = widget.get_model() - layouts = self.config.list_layouts() - self.layoutiters = {} - for layout in layouts: - if layout == 'default': - editable = False - else: - editable = True - self.layoutiters[layout] = liststore.append([layout, editable]) - selection = widget.get_selection() - selection.connect('changed', self.on_layout_selection_changed) - selection.select_iter(self.layoutiters['default']) ## Keybindings tab widget = guiget('keybindingtreeview') @@ -276,7 +262,6 @@ class PrefsEditor: self.store_profile_values() ## Layouts tab - self.store_layout(self.previous_layout_selection) ## Keybindings tab keybindings = self.config['keybindings'] @@ -616,14 +601,6 @@ class PrefsEditor: value = 'escape-sequence' self.config['delete_binding'] = value - def set_layout(self, layout): - """Set a layout""" - pass - - def store_layout(self, layout): - """Store a layout""" - pass - def on_profileaddbutton_clicked(self, _button): """Add a new profile to the list""" guiget = self.builder.get_object @@ -660,44 +637,6 @@ class PrefsEditor: model.remove(rowiter) selection.select_iter(model.get_iter_first()) - def on_layoutaddbutton_clicked(self, _button): - """Add a new layout to the list""" - terminator = Terminator() - current_layout = terminator.describe_layout() - guiget = self.builder.get_object - - treeview = guiget('layoutlist') - model = treeview.get_model() - values = [ r[0] for r in model ] - - name = _('New Layout') - if name in values: - i = 1 - while name in values: - i = i + 1 - name = '%s %d' % (_('New Layout'), i) - - if self.config.add_layout(name, current_layout): - model.append([name, True]) - - def on_layoutremovebutton_clicked(self, _button): - """Remove a layout from the list""" - guiget = self.builder.get_object - - treeview = guiget('layoutlist') - selection = treeview.get_selection() - (model, rowiter) = selection.get_selected() - layout = model.get_value(rowiter, 0) - - if layout == 'default': - # We shouldn't let people delete this layout - return - - self.previous_sekection = None - self.config.del_layout(layout) - model.remove(rowiter) - selection.select_iter(model.get_iter_first()) - def on_use_custom_command_checkbutton_toggled(self, checkbox): """Toggling the use_custom_command checkbox needs to alter the sensitivity of the custom_command entrybox""" @@ -800,45 +739,6 @@ class PrefsEditor: if oldname == self.previous_profile_selection: self.previous_profile_selection = newtext - def on_layout_selection_changed(self, selection): - """A different layout was selected""" - if self.previous_layout_selection is not None: - dbg('Storing: %s' % self.previous_layout_selection) - self.store_layout(self.previous_layout_selection) - - (listmodel, rowiter) = selection.get_selected() - if not rowiter: - # Something is wrong, just jump to the first item in the list - treeview = selection.get_tree_view() - liststore = treeview.get_model() - selection.select_iter(liststore.get_iter_first()) - return - layout = listmodel.get_value(rowiter, 0) - self.set_layout(layout) - self.previous_layout_selection = layout - - widget = self.builder.get_object('layoutremovebutton') - if layout == 'default': - widget.set_sensitive(False) - else: - widget.set_sensitive(True) - - def on_layout_name_edited(self, cell, path, newtext): - """Update a layout name""" - oldname = cell.get_property('text') - if oldname == newtext or oldname == 'default': - return - dbg('Changing %s to %s' % (oldname, newtext)) - self.config.rename_layout(oldname, newtext) - - widget = self.builder.get_object('layoutlist') - model = widget.get_model() - itera = model.get_iter(path) - model.set_value(itera, 0, newtext) - - if oldname == self.previous_layout_selection: - self.previous_layout_selection = newtext - def on_color_scheme_combobox_changed(self, widget): """Update the fore/background colour pickers""" value = None