Remove ad-hoc titlebar visibility control and make the preferences setting be applied by Terminal::reconfigure()
This commit is contained in:
parent
79a340539b
commit
5520fe11c8
@ -658,6 +658,10 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||
self.config['alternate_screen_scroll'])
|
||||
|
||||
self.titlebar.update()
|
||||
if self.config['show_titlebar'] == True:
|
||||
self.titlebar.show()
|
||||
else:
|
||||
self.titlebar.hide()
|
||||
self.vte.queue_draw()
|
||||
|
||||
def get_window_title(self):
|
||||
@ -742,10 +746,6 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
|
||||
"""Show or hide the terminal scrollbar"""
|
||||
self.toggle_widget_visibility(self.scrollbar)
|
||||
|
||||
def do_titlebar_toggle(self):
|
||||
"""Show or hide the terminal titlebar"""
|
||||
self.toggle_widget_visibility(self.titlebar)
|
||||
|
||||
def toggle_widget_visibility(self, widget):
|
||||
"""Show or hide a widget"""
|
||||
if widget.get_property('visible'):
|
||||
|
@ -128,11 +128,6 @@ class TerminalPopupMenu(object):
|
||||
item.connect('toggled', lambda x: terminal.do_scrollbar_toggle())
|
||||
menu.append(item)
|
||||
|
||||
item = gtk.CheckMenuItem(_('Show _titlebar'))
|
||||
item.set_active(terminal.titlebar.get_property('visible'))
|
||||
item.connect('toggled', lambda x: terminal.do_titlebar_toggle())
|
||||
menu.append(item)
|
||||
|
||||
item = gtk.MenuItem(_('_Preferences'))
|
||||
item.connect('activate', lambda x: PrefsEditor(self.terminal))
|
||||
menu.append(item)
|
||||
|
@ -80,7 +80,10 @@ class Titlebar(gtk.EventBox):
|
||||
hbox.pack_start(self.label, True, True)
|
||||
|
||||
self.add(hbox)
|
||||
self.show_all()
|
||||
hbox.show_all()
|
||||
self.set_no_show_all(True)
|
||||
if self.config['show_titlebar'] == True:
|
||||
self.show()
|
||||
|
||||
self.connect('button-press-event', self.on_clicked)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user