Browse Source

Fix UI for notifications.

"Notification Center", "Growl" and "NTFOSD" should have boolean options instead of numerical.
Otherwise the user interface will not properly handle disabled options.
pull/219/head
shypike 10 years ago
parent
commit
145afc44f5
  1. 60
      sabnzbd/cfg.py

60
sabnzbd/cfg.py

@ -235,44 +235,44 @@ no_ipv6 = OptionBool('misc', 'no_ipv6', False)
# [ncenter]
ncenter_enable = OptionBool('ncenter', 'ncenter_enable', sabnzbd.DARWIN_VERSION > 7)
ncenter_prio_startup = OptionNumber('ncenter', 'ncenter_prio_startup', 1)
ncenter_prio_download = OptionNumber('ncenter', 'ncenter_prio_download', 0)
ncenter_prio_pp = OptionNumber('ncenter', 'ncenter_prio_pp', 0)
ncenter_prio_complete = OptionNumber('ncenter', 'ncenter_prio_complete', 1)
ncenter_prio_failed = OptionNumber('ncenter', 'ncenter_prio_failed', 1)
ncenter_prio_disk_full = OptionNumber('ncenter', 'ncenter_prio_disk_full', 1)
ncenter_prio_warning = OptionNumber('ncenter', 'ncenter_prio_warning', 0)
ncenter_prio_error = OptionNumber('ncenter', 'ncenter_prio_error', 0)
ncenter_prio_queue_done = OptionNumber('ncenter', 'ncenter_prio_queue_done', 1)
ncenter_prio_other = OptionNumber('ncenter', 'ncenter_prio_other', 0)
ncenter_prio_startup = OptionBool('ncenter', 'ncenter_prio_startup', True)
ncenter_prio_download = OptionBool('ncenter', 'ncenter_prio_download', False)
ncenter_prio_pp = OptionBool('ncenter', 'ncenter_prio_pp', False)
ncenter_prio_complete = OptionBool('ncenter', 'ncenter_prio_complete', True)
ncenter_prio_failed = OptionBool('ncenter', 'ncenter_prio_failed', True)
ncenter_prio_disk_full = OptionBool('ncenter', 'ncenter_prio_disk_full', True)
ncenter_prio_warning = OptionBool('ncenter', 'ncenter_prio_warning', False)
ncenter_prio_error = OptionBool('ncenter', 'ncenter_prio_error', False)
ncenter_prio_queue_done = OptionBool('ncenter', 'ncenter_prio_queue_done', True)
ncenter_prio_other = OptionBool('ncenter', 'ncenter_prio_other', False)
# [ntfosd]
ntfosd_enable = OptionBool('ntfosd', 'ntfosd_enable', not sabnzbd.WIN32 and not sabnzbd.DARWIN)
ntfosd_prio_startup = OptionNumber('ntfosd', 'ntfosd_prio_startup', 1)
ntfosd_prio_download = OptionNumber('ntfosd', 'ntfosd_prio_download', 0)
ntfosd_prio_pp = OptionNumber('ntfosd', 'ntfosd_prio_pp', 0)
ntfosd_prio_complete = OptionNumber('ntfosd', 'ntfosd_prio_complete', 1)
ntfosd_prio_failed = OptionNumber('ntfosd', 'ntfosd_prio_failed', 1)
ntfosd_prio_disk_full = OptionNumber('ntfosd', 'ntfosd_prio_disk_full', 1)
ntfosd_prio_warning = OptionNumber('ntfosd', 'ntfosd_prio_warning', 0)
ntfosd_prio_error = OptionNumber('ntfosd', 'ntfosd_prio_error', 0)
ntfosd_prio_queue_done = OptionNumber('ntfosd', 'ntfosd_prio_queue_done', 1)
ntfosd_prio_other = OptionNumber('ntfosd', 'ntfosd_prio_other', 0)
ntfosd_prio_startup = OptionBool('ntfosd', 'ntfosd_prio_startup', True)
ntfosd_prio_download = OptionBool('ntfosd', 'ntfosd_prio_download', False)
ntfosd_prio_pp = OptionBool('ntfosd', 'ntfosd_prio_pp', False)
ntfosd_prio_complete = OptionBool('ntfosd', 'ntfosd_prio_complete', True)
ntfosd_prio_failed = OptionBool('ntfosd', 'ntfosd_prio_failed', True)
ntfosd_prio_disk_full = OptionBool('ntfosd', 'ntfosd_prio_disk_full', True)
ntfosd_prio_warning = OptionBool('ntfosd', 'ntfosd_prio_warning', False)
ntfosd_prio_error = OptionBool('ntfosd', 'ntfosd_prio_error', False)
ntfosd_prio_queue_done = OptionBool('ntfosd', 'ntfosd_prio_queue_done', True)
ntfosd_prio_other = OptionBool('ntfosd', 'ntfosd_prio_other', False)
# [growl]
growl_enable = OptionBool('growl', 'growl_enable', sabnzbd.DARWIN_VERSION < 8)
growl_server = OptionStr('growl', 'growl_server')
growl_password = OptionPassword('growl', 'growl_password')
growl_prio_startup = OptionNumber('growl', 'growl_prio_startup', 1)
growl_prio_download = OptionNumber('growl', 'growl_prio_download', 0)
growl_prio_pp = OptionNumber('growl', 'growl_prio_pp', 0)
growl_prio_complete = OptionNumber('growl', 'growl_prio_complete', 1)
growl_prio_failed = OptionNumber('growl', 'growl_prio_failed', 1)
growl_prio_disk_full = OptionNumber('growl', 'growl_prio_disk_full', 1)
growl_prio_warning = OptionNumber('growl', 'growl_prio_warning', 0)
growl_prio_error = OptionNumber('growl', 'growl_prio_error', 0)
growl_prio_queue_done = OptionNumber('growl', 'growl_prio_queue_done', 1)
growl_prio_other = OptionNumber('growl', 'growl_prio_other', 0)
growl_prio_startup = OptionBool('growl', 'growl_prio_startup', True)
growl_prio_download = OptionBool('growl', 'growl_prio_download', False)
growl_prio_pp = OptionBool('growl', 'growl_prio_pp', False)
growl_prio_complete = OptionBool('growl', 'growl_prio_complete', True)
growl_prio_failed = OptionBool('growl', 'growl_prio_failed', True)
growl_prio_disk_full = OptionBool('growl', 'growl_prio_disk_full', True)
growl_prio_warning = OptionBool('growl', 'growl_prio_warning', False)
growl_prio_error = OptionBool('growl', 'growl_prio_error', False)
growl_prio_queue_done = OptionBool('growl', 'growl_prio_queue_done', True)
growl_prio_other = OptionBool('growl', 'growl_prio_other', False)
# [prowl]
prowl_enable = OptionBool('prowl', 'prowl_enable', False)

Loading…
Cancel
Save