Rename OptionType.BOOL to VALUE
This commit is contained in:
parent
5510e042d4
commit
f397e1b7cb
|
@ -24,7 +24,7 @@ class OptionKind(IntEnum):
|
|||
class OptionType(IntEnum):
|
||||
ACCOUNT_CONFIG = 0
|
||||
CONFIG = 1
|
||||
BOOL = 2
|
||||
VALUE = 2
|
||||
ACTION = 3
|
||||
DIALOG = 4
|
||||
|
||||
|
|
|
@ -3439,24 +3439,24 @@ class XMLConsoleWindow(Gtk.Window):
|
|||
def on_filter_options(self, *args):
|
||||
options = [
|
||||
Option(OptionKind.SWITCH, 'Presence',
|
||||
OptionType.BOOL, self.presence,
|
||||
OptionType.VALUE, self.presence,
|
||||
callback=self.on_option, data='presence'),
|
||||
|
||||
Option(OptionKind.SWITCH, 'Message',
|
||||
OptionType.BOOL, self.message,
|
||||
OptionType.VALUE, self.message,
|
||||
callback=self.on_option, data='message'),
|
||||
|
||||
Option(OptionKind.SWITCH, 'Iq', OptionType.BOOL, self.iq,
|
||||
Option(OptionKind.SWITCH, 'Iq', OptionType.VALUE, self.iq,
|
||||
callback=self.on_option, data='iq'),
|
||||
|
||||
Option(OptionKind.SWITCH, 'Stream\nManagement',
|
||||
OptionType.BOOL, self.stream,
|
||||
OptionType.VALUE, self.stream,
|
||||
callback=self.on_option, data='stream'),
|
||||
|
||||
Option(OptionKind.SWITCH, 'In', OptionType.BOOL, self.incoming,
|
||||
Option(OptionKind.SWITCH, 'In', OptionType.VALUE, self.incoming,
|
||||
callback=self.on_option, data='incoming'),
|
||||
|
||||
Option(OptionKind.SWITCH, 'Out', OptionType.BOOL, self.outgoing,
|
||||
Option(OptionKind.SWITCH, 'Out', OptionType.VALUE, self.outgoing,
|
||||
callback=self.on_option, data='outgoing'),
|
||||
]
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ class GenericOption(Gtk.Grid):
|
|||
def __get_value(type_, value, account):
|
||||
if value is None:
|
||||
return
|
||||
if type_ == OptionType.BOOL:
|
||||
if type_ == OptionType.VALUE:
|
||||
return value
|
||||
elif type_ == OptionType.CONFIG:
|
||||
return app.config.get(value)
|
||||
|
|
Loading…
Reference in New Issue