Merge pull request #481 from Vulcalien/master
Move titlebar settings to profiles (#379)
This commit is contained in:
commit
955ea09bed
|
@ -102,22 +102,12 @@ DEFAULTS = {
|
||||||
'use_custom_url_handler': False,
|
'use_custom_url_handler': False,
|
||||||
'custom_url_handler' : '',
|
'custom_url_handler' : '',
|
||||||
'disable_real_transparency' : False,
|
'disable_real_transparency' : False,
|
||||||
'title_at_bottom' : False,
|
|
||||||
'title_hide_sizetext' : False,
|
|
||||||
'title_transmit_fg_color' : '#ffffff',
|
|
||||||
'title_transmit_bg_color' : '#c80003',
|
|
||||||
'title_receive_fg_color' : '#ffffff',
|
|
||||||
'title_receive_bg_color' : '#0076c9',
|
|
||||||
'title_inactive_fg_color' : '#000000',
|
|
||||||
'title_inactive_bg_color' : '#c0bebf',
|
|
||||||
'inactive_color_offset': 0.8,
|
'inactive_color_offset': 0.8,
|
||||||
'enabled_plugins' : ['LaunchpadBugURLHandler',
|
'enabled_plugins' : ['LaunchpadBugURLHandler',
|
||||||
'LaunchpadCodeURLHandler',
|
'LaunchpadCodeURLHandler',
|
||||||
'APTURLHandler'],
|
'APTURLHandler'],
|
||||||
'suppress_multiple_term_dialog': False,
|
'suppress_multiple_term_dialog': False,
|
||||||
'always_split_with_profile': False,
|
'always_split_with_profile': False,
|
||||||
'title_use_system_font' : True,
|
|
||||||
'title_font' : 'Sans 9',
|
|
||||||
'putty_paste_style' : False,
|
'putty_paste_style' : False,
|
||||||
'putty_paste_style_source_clipboard': False,
|
'putty_paste_style_source_clipboard': False,
|
||||||
'smart_copy' : True,
|
'smart_copy' : True,
|
||||||
|
@ -126,6 +116,7 @@ DEFAULTS = {
|
||||||
'case_sensitive' : True,
|
'case_sensitive' : True,
|
||||||
'invert_search' : False,
|
'invert_search' : False,
|
||||||
'link_single_click' : False,
|
'link_single_click' : False,
|
||||||
|
'title_at_bottom' : False
|
||||||
},
|
},
|
||||||
'keybindings': {
|
'keybindings': {
|
||||||
'zoom_in' : '<Control>plus',
|
'zoom_in' : '<Control>plus',
|
||||||
|
@ -262,7 +253,17 @@ DEFAULTS = {
|
||||||
'http_proxy' : '',
|
'http_proxy' : '',
|
||||||
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'],
|
||||||
'background_image' : '',
|
'background_image' : '',
|
||||||
'background_alpha' : 0.0
|
'background_alpha' : 0.0,
|
||||||
|
# Titlebar
|
||||||
|
'title_hide_sizetext' : False,
|
||||||
|
'title_transmit_fg_color' : '#ffffff',
|
||||||
|
'title_transmit_bg_color' : '#c80003',
|
||||||
|
'title_receive_fg_color' : '#ffffff',
|
||||||
|
'title_receive_bg_color' : '#0076c9',
|
||||||
|
'title_inactive_fg_color' : '#000000',
|
||||||
|
'title_inactive_bg_color' : '#c0bebf',
|
||||||
|
'title_use_system_font' : True,
|
||||||
|
'title_font' : 'Sans 9'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'layouts': {
|
'layouts': {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -333,9 +333,6 @@ class PrefsEditor:
|
||||||
#Show on all workspaces
|
#Show on all workspaces
|
||||||
widget = guiget('stickycheck')
|
widget = guiget('stickycheck')
|
||||||
widget.set_active(self.config['sticky'])
|
widget.set_active(self.config['sticky'])
|
||||||
#Hide size text from the title bar
|
|
||||||
widget = guiget('title_hide_sizetextcheck')
|
|
||||||
widget.set_active(self.config['title_hide_sizetext'])
|
|
||||||
|
|
||||||
# title bar at bottom
|
# title bar at bottom
|
||||||
widget = guiget('title_at_bottom_checkbutton')
|
widget = guiget('title_at_bottom_checkbutton')
|
||||||
|
@ -359,19 +356,6 @@ class PrefsEditor:
|
||||||
# Clear selection on copy
|
# Clear selection on copy
|
||||||
widget = guiget('clear_select_on_copy')
|
widget = guiget('clear_select_on_copy')
|
||||||
widget.set_active(self.config['clear_select_on_copy'])
|
widget.set_active(self.config['clear_select_on_copy'])
|
||||||
#Titlebar font selector
|
|
||||||
# Use system font
|
|
||||||
widget = guiget('title_system_font_checkbutton')
|
|
||||||
widget.set_active(self.config['title_use_system_font'])
|
|
||||||
self.on_title_system_font_checkbutton_toggled(widget)
|
|
||||||
# Font selector
|
|
||||||
widget = guiget('title_font_selector')
|
|
||||||
if self.config['title_use_system_font'] == True:
|
|
||||||
fontname = self.config.get_system_prop_font()
|
|
||||||
if fontname is not None:
|
|
||||||
widget.set_font_name(fontname)
|
|
||||||
else:
|
|
||||||
widget.set_font_name(self.config['title_font'])
|
|
||||||
|
|
||||||
## Profile tab
|
## Profile tab
|
||||||
# Populate the profile list
|
# Populate the profile list
|
||||||
|
@ -615,12 +599,6 @@ class PrefsEditor:
|
||||||
# Now set the palette selector widget
|
# Now set the palette selector widget
|
||||||
widget = guiget('palette_combobox')
|
widget = guiget('palette_combobox')
|
||||||
widget.set_active(self.palettevalues[palette])
|
widget.set_active(self.palettevalues[palette])
|
||||||
# Titlebar colors
|
|
||||||
for bit in ['title_transmit_fg_color', 'title_transmit_bg_color',
|
|
||||||
'title_receive_fg_color', 'title_receive_bg_color',
|
|
||||||
'title_inactive_fg_color', 'title_inactive_bg_color']:
|
|
||||||
widget = guiget(bit)
|
|
||||||
widget.set_color(Gdk.color_parse(self.config[bit]))
|
|
||||||
# Inactive terminal shading
|
# Inactive terminal shading
|
||||||
widget = guiget('inactive_color_offset')
|
widget = guiget('inactive_color_offset')
|
||||||
widget.set_value(float(self.config['inactive_color_offset']))
|
widget.set_value(float(self.config['inactive_color_offset']))
|
||||||
|
@ -716,6 +694,29 @@ class PrefsEditor:
|
||||||
if encoding[1] == value:
|
if encoding[1] == value:
|
||||||
widget.set_active_iter(rowiter)
|
widget.set_active_iter(rowiter)
|
||||||
|
|
||||||
|
## Titlebar tab
|
||||||
|
# Titlebar colors
|
||||||
|
for bit in ['title_transmit_fg_color', 'title_transmit_bg_color',
|
||||||
|
'title_receive_fg_color', 'title_receive_bg_color',
|
||||||
|
'title_inactive_fg_color', 'title_inactive_bg_color']:
|
||||||
|
widget = guiget(bit)
|
||||||
|
widget.set_color(Gdk.color_parse(self.config[bit]))
|
||||||
|
# Hide size text from the title bar
|
||||||
|
widget = guiget('title_hide_sizetextcheck')
|
||||||
|
widget.set_active(self.config['title_hide_sizetext'])
|
||||||
|
# Use system font
|
||||||
|
widget = guiget('title_system_font_checkbutton')
|
||||||
|
widget.set_active(self.config['title_use_system_font'])
|
||||||
|
self.on_title_system_font_checkbutton_toggled(widget)
|
||||||
|
# Font selector
|
||||||
|
widget = guiget('title_font_selector')
|
||||||
|
if self.config['title_use_system_font'] == True:
|
||||||
|
fontname = self.config.get_system_prop_font()
|
||||||
|
if fontname is not None:
|
||||||
|
widget.set_font_name(fontname)
|
||||||
|
else:
|
||||||
|
widget.set_font_name(self.config['title_font'])
|
||||||
|
|
||||||
def set_layout(self, layout_name):
|
def set_layout(self, layout_name):
|
||||||
"""Set a layout"""
|
"""Set a layout"""
|
||||||
self.layouteditor.set_layout(layout_name)
|
self.layouteditor.set_layout(layout_name)
|
||||||
|
|
Loading…
Reference in New Issue