Set the initial palette group to "default"
This commit is contained in:
parent
3b8f25b7b9
commit
1a65f81d10
@ -159,6 +159,7 @@ class Palette(gtk.Window):
|
||||
self._leave_notify_event_cb)
|
||||
|
||||
self.set_primary_text(label, accel_path)
|
||||
self.set_group_id('default')
|
||||
|
||||
def is_up(self):
|
||||
return self._up
|
||||
|
@ -39,6 +39,7 @@ class Group(gobject.GObject):
|
||||
gobject.GObject.__init__(self)
|
||||
self._up = False
|
||||
self._palettes = []
|
||||
self._sig_ids = {}
|
||||
|
||||
def is_up(self):
|
||||
return self._up
|
||||
@ -46,15 +47,18 @@ class Group(gobject.GObject):
|
||||
def add(self, palette):
|
||||
self._palettes.append(palette)
|
||||
|
||||
self._sig_ids[palette] = []
|
||||
|
||||
sid = palette.connect('popup', self._palette_popup_cb)
|
||||
palette.popup_sid = sid
|
||||
self._sig_ids[palette].append(sid)
|
||||
|
||||
sid = palette.connect('popdown', self._palette_popdown_cb)
|
||||
palette.podown_sid = sid
|
||||
self._sig_ids[palette].append(sid)
|
||||
|
||||
def remove(self, palette):
|
||||
self.disconnect(palette.popup_sid)
|
||||
self.disconnect(palette.popdown_sid)
|
||||
sig_ids = self._sig_ids[palette]
|
||||
for sid in sig_ids:
|
||||
palette.disconnect(sid)
|
||||
|
||||
self._palettes.remove(palette)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user