diff --git a/terminatorlib/profileeditor.py b/terminatorlib/prefseditor.py similarity index 99% rename from terminatorlib/profileeditor.py rename to terminatorlib/prefseditor.py index 87740e88..e16e60e6 100644 --- a/terminatorlib/profileeditor.py +++ b/terminatorlib/prefseditor.py @@ -9,7 +9,7 @@ from keybindings import Keybindings from version import APP_NAME, APP_VERSION from translation import _ -class ProfileEditor: +class PrefsEditor: # lists of which settings to put in which tabs appearance = ['titlebars', 'zoomedtitlebar', 'allow_bold', 'audible_bell', 'visible_bell', 'urgent_bell', 'force_no_bell', 'background_darkness', 'background_type', 'background_image', 'cursor_blink', 'cursor_shape', 'font', 'scrollbar_position', 'scroll_background', 'use_system_font', 'use_theme_colors', 'enable_real_transparency'] colours = ['foreground_color','background_color', 'cursor_color', 'palette', 'title_tx_txt_color', 'title_tx_bg_color', 'title_rx_txt_color', 'title_rx_bg_color', 'title_ia_txt_color', 'title_ia_bg_color'] diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index bf13cbfe..45c20371 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -21,7 +21,6 @@ from newterminator import Terminator from titlebar import Titlebar from terminal_popup_menu import TerminalPopupMenu from searchbar import Searchbar -from profileeditor import ProfileEditor from translation import _ import plugin diff --git a/terminatorlib/terminal_popup_menu.py b/terminatorlib/terminal_popup_menu.py index 8800b6ef..1a3f2c32 100755 --- a/terminatorlib/terminal_popup_menu.py +++ b/terminatorlib/terminal_popup_menu.py @@ -11,7 +11,7 @@ from translation import _ from encoding import TerminatorEncoding from util import err from config import Config -from profileeditor import ProfileEditor +from prefseditor import PrefsEditor import plugin class TerminalPopupMenu(object): @@ -132,28 +132,29 @@ class TerminalPopupMenu(object): item.set_sensitive(False) menu.append(item) - item = gtk.MenuItem(_('Profiles')) - submenu = gtk.Menu() - item.set_submenu(submenu) + item = gtk.MenuItem(_('_Preferences')) + item.connect('activate', lambda x: PrefsEditor(self.terminal)) menu.append(item) config = Config() - current = terminal.get_profile() + profilelist = config.list_profiles() - group = None + if len(profilelist) > 1: + item = gtk.MenuItem(_('Profiles')) + submenu = gtk.Menu() + item.set_submenu(submenu) + menu.append(item) - for profile in config.list_profiles(): - item = gtk.RadioMenuItem(group, profile.capitalize()) - item.connect('activate', terminal.set_profile, profile) - if profile == current: - item.set_active(True) - submenu.append(item) + current = terminal.get_profile() - submenu.append(gtk.MenuItem()) + group = None - item = gtk.MenuItem(_('Ed_it profiles')) - item.connect('activate', lambda x: ProfileEditor(self.terminal)) - submenu.append(item) + for profile in profilelist(): + item = gtk.RadioMenuItem(group, profile.capitalize()) + item.connect('activate', terminal.set_profile, profile) + if profile == current: + item.set_active(True) + submenu.append(item) self.add_encoding_items(menu)