Re-factor Titlebar.update() to not duplicate the label text setting call
This commit is contained in:
parent
7e7aa0ed59
commit
e43369d3e6
|
@ -104,10 +104,11 @@ class Titlebar(Gtk.EventBox):
|
||||||
def update(self, other=None):
|
def update(self, other=None):
|
||||||
"""Update our contents"""
|
"""Update our contents"""
|
||||||
default_bg = False
|
default_bg = False
|
||||||
if self.config['title_hide_sizetext']:
|
|
||||||
self.label.set_text("%s" % self.termtext)
|
temp_sizetext_str = ''
|
||||||
else:
|
if not self.config['title_hide_sizetext']:
|
||||||
self.label.set_text("%s %s" % (self.termtext, self.sizetext))
|
temp_sizetext_str = " %s" % (self.sizetext)
|
||||||
|
self.label.set_text("%s%s" % (self.termtext, temp_sizetext_str))
|
||||||
|
|
||||||
if (not self.config['title_use_system_font']) and self.config['title_font']:
|
if (not self.config['title_use_system_font']) and self.config['title_font']:
|
||||||
title_font = Pango.FontDescription(self.config['title_font'])
|
title_font = Pango.FontDescription(self.config['title_font'])
|
||||||
|
|
Loading…
Reference in New Issue