mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Implement show/hide toggle.
This commit is contained in:
parent
ec326ed1c1
commit
2a3937bf55
@ -94,8 +94,9 @@ class accountSettingsController(globalSettingsController):
|
||||
buffer_values = self.get_buffers_list()
|
||||
self.dialog.buffers.insert_buffers(buffer_values)
|
||||
self.dialog.buffers.connect_hook_func(self.toggle_buffer_active)
|
||||
# widgetUtils.connect_event(self.dialog.buffers.up, widgetUtils.BUTTON_PRESSED, self.dialog.buffers.move_up)
|
||||
# widgetUtils.connect_event(self.dialog.buffers.down, widgetUtils.BUTTON_PRESSED, self.dialog.buffers.down)
|
||||
widgetUtils.connect_event(self.dialog.buffers.toggle_state, widgetUtils.BUTTON_PRESSED, self.toggle_state)
|
||||
widgetUtils.connect_event(self.dialog.buffers.up, widgetUtils.BUTTON_PRESSED, self.dialog.buffers.move_up)
|
||||
widgetUtils.connect_event(self.dialog.buffers.down, widgetUtils.BUTTON_PRESSED, self.dialog.buffers.down)
|
||||
|
||||
|
||||
self.dialog.create_ignored_clients(self.config["twitter"]["ignored_clients"])
|
||||
@ -180,6 +181,8 @@ class accountSettingsController(globalSettingsController):
|
||||
self.buffer.session.sound.check_soundpack()
|
||||
self.config["sound"]["sndup_api_key"] = self.dialog.get_value("services", "apiKey")
|
||||
|
||||
def toggle_state(self,*args,**kwargs):
|
||||
return self.dialog.buffers.change_selected_item()
|
||||
|
||||
def manage_autocomplete(self, *args, **kwargs):
|
||||
configuration = settings.autocompletionSettings(self.buffer.session.settings, self.buffer, self.window)
|
||||
|
@ -101,8 +101,10 @@ class other_buffers(wx.Panel):
|
||||
self.buffers = widgets.list(self, _(u"Buffer"), _(u"Status"), style=wx.LC_SINGLE_SEL|wx.LC_REPORT)
|
||||
sizer.Add(self.buffers.list, 0, wx.ALL, 5)
|
||||
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.toggle_state = wx.Button(self, -1, _(u"Show/hide"))
|
||||
self.up = wx.Button(self, -1, _(u"Move up"))
|
||||
self.down = wx.Button(self, -1, _(u"Move down"))
|
||||
btnSizer.Add(self.toggle_state, 0, wx.ALL, 5)
|
||||
btnSizer.Add(self.up, 0, wx.ALL, 5)
|
||||
btnSizer.Add(self.down, 0, wx.ALL, 5)
|
||||
sizer.Add(btnSizer, 0, wx.ALL, 5)
|
||||
@ -113,7 +115,7 @@ class other_buffers(wx.Panel):
|
||||
if i[1] == True:
|
||||
self.buffers.insert_item(False, *[i[0], _(u"Show")])
|
||||
else:
|
||||
self.buffer.insert_item(False, *[i[0], _(u"Hide")])
|
||||
self.buffers.insert_item(False, *[i[0], _(u"Hide")])
|
||||
|
||||
def connect_hook_func(self, func):
|
||||
self.buffers.list.Bind(wx.EVT_CHAR_HOOK, func)
|
||||
|
Loading…
Reference in New Issue
Block a user