If something isn't used outside one function, don't make it be a class variable
This commit is contained in:
parent
d5ff98211c
commit
a31c0ef411
|
@ -20,9 +20,7 @@ class Titlebar(gtk.EventBox):
|
||||||
termtext = None
|
termtext = None
|
||||||
sizetext = None
|
sizetext = None
|
||||||
label = None
|
label = None
|
||||||
hbox = None
|
|
||||||
ebox = None
|
ebox = None
|
||||||
grouphbox = None
|
|
||||||
groupicon = None
|
groupicon = None
|
||||||
grouplabel = None
|
grouplabel = None
|
||||||
|
|
||||||
|
@ -41,7 +39,7 @@ class Titlebar(gtk.EventBox):
|
||||||
self.label = EditableLabel()
|
self.label = EditableLabel()
|
||||||
self.label.connect('edit-done', self.on_edit_done)
|
self.label.connect('edit-done', self.on_edit_done)
|
||||||
self.ebox = gtk.EventBox()
|
self.ebox = gtk.EventBox()
|
||||||
self.grouphbox = gtk.HBox()
|
grouphbox = gtk.HBox()
|
||||||
self.grouplabel = gtk.Label()
|
self.grouplabel = gtk.Label()
|
||||||
self.groupicon = gtk.Image()
|
self.groupicon = gtk.Image()
|
||||||
|
|
||||||
|
@ -55,17 +53,17 @@ class Titlebar(gtk.EventBox):
|
||||||
self.set_from_icon_name('_active_broadcast_%s' % icon_name,
|
self.set_from_icon_name('_active_broadcast_%s' % icon_name,
|
||||||
gtk.ICON_SIZE_MENU)
|
gtk.ICON_SIZE_MENU)
|
||||||
|
|
||||||
self.grouphbox.pack_start(self.groupicon, False, True, 2)
|
grouphbox.pack_start(self.groupicon, False, True, 2)
|
||||||
self.grouphbox.pack_start(self.grouplabel, False, True, 2)
|
grouphbox.pack_start(self.grouplabel, False, True, 2)
|
||||||
self.ebox.add(self.grouphbox)
|
self.ebox.add(grouphbox)
|
||||||
self.ebox.show_all()
|
self.ebox.show_all()
|
||||||
|
|
||||||
self.hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
self.hbox.pack_start(self.ebox, False, True, 0)
|
hbox.pack_start(self.ebox, False, True, 0)
|
||||||
self.hbox.pack_start(gtk.VSeparator(), False, True, 0)
|
hbox.pack_start(gtk.VSeparator(), False, True, 0)
|
||||||
self.hbox.pack_start(self.label, True, True)
|
hbox.pack_start(self.label, True, True)
|
||||||
|
|
||||||
self.add(self.hbox)
|
self.add(hbox)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
self.connect('button-press-event', self.on_clicked)
|
self.connect('button-press-event', self.on_clicked)
|
||||||
|
|
Loading…
Reference in New Issue