Rename OptionType.BOOL to VALUE
This commit is contained in:
parent
5510e042d4
commit
f397e1b7cb
3 changed files with 8 additions and 8 deletions
|
@ -24,7 +24,7 @@ class OptionKind(IntEnum):
|
||||||
class OptionType(IntEnum):
|
class OptionType(IntEnum):
|
||||||
ACCOUNT_CONFIG = 0
|
ACCOUNT_CONFIG = 0
|
||||||
CONFIG = 1
|
CONFIG = 1
|
||||||
BOOL = 2
|
VALUE = 2
|
||||||
ACTION = 3
|
ACTION = 3
|
||||||
DIALOG = 4
|
DIALOG = 4
|
||||||
|
|
||||||
|
|
|
@ -3439,24 +3439,24 @@ class XMLConsoleWindow(Gtk.Window):
|
||||||
def on_filter_options(self, *args):
|
def on_filter_options(self, *args):
|
||||||
options = [
|
options = [
|
||||||
Option(OptionKind.SWITCH, 'Presence',
|
Option(OptionKind.SWITCH, 'Presence',
|
||||||
OptionType.BOOL, self.presence,
|
OptionType.VALUE, self.presence,
|
||||||
callback=self.on_option, data='presence'),
|
callback=self.on_option, data='presence'),
|
||||||
|
|
||||||
Option(OptionKind.SWITCH, 'Message',
|
Option(OptionKind.SWITCH, 'Message',
|
||||||
OptionType.BOOL, self.message,
|
OptionType.VALUE, self.message,
|
||||||
callback=self.on_option, data='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'),
|
callback=self.on_option, data='iq'),
|
||||||
|
|
||||||
Option(OptionKind.SWITCH, 'Stream\nManagement',
|
Option(OptionKind.SWITCH, 'Stream\nManagement',
|
||||||
OptionType.BOOL, self.stream,
|
OptionType.VALUE, self.stream,
|
||||||
callback=self.on_option, data='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'),
|
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'),
|
callback=self.on_option, data='outgoing'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ class GenericOption(Gtk.Grid):
|
||||||
def __get_value(type_, value, account):
|
def __get_value(type_, value, account):
|
||||||
if value is None:
|
if value is None:
|
||||||
return
|
return
|
||||||
if type_ == OptionType.BOOL:
|
if type_ == OptionType.VALUE:
|
||||||
return value
|
return value
|
||||||
elif type_ == OptionType.CONFIG:
|
elif type_ == OptionType.CONFIG:
|
||||||
return app.config.get(value)
|
return app.config.get(value)
|
||||||
|
|
Loading…
Add table
Reference in a new issue