mirror of
https://github.com/pulb/mailnag.git
synced 2026-05-07 02:25:57 +02:00
renamed [general] settings section to [core]
This commit is contained in:
@@ -27,7 +27,7 @@ from ConfigParser import RawConfigParser
|
||||
from common.i18n import _
|
||||
|
||||
mailnag_defaults = {
|
||||
'general':
|
||||
'core':
|
||||
{
|
||||
'check_interval' : '10',
|
||||
'sender_format' : '1',
|
||||
|
||||
@@ -136,7 +136,7 @@ class ConfigWindow:
|
||||
|
||||
|
||||
def _load_config(self):
|
||||
self._switch_daemon_enabled.set_active(bool(int(self._cfg.get('general', 'autostart'))))
|
||||
self._switch_daemon_enabled.set_active(bool(int(self._cfg.get('core', 'autostart'))))
|
||||
|
||||
self._accounts.load_from_cfg(self._cfg)
|
||||
|
||||
@@ -147,7 +147,7 @@ class ConfigWindow:
|
||||
self._select_account_path((0,))
|
||||
|
||||
# load plugins
|
||||
enabled_lst = self._cfg.get('general', 'enabled_plugins').split(',')
|
||||
enabled_lst = self._cfg.get('core', 'enabled_plugins').split(',')
|
||||
enabled_lst = filter(lambda s: s != '', map(lambda s: s.strip(), enabled_lst))
|
||||
|
||||
plugins = Plugin.load_plugins(self._cfg)
|
||||
@@ -164,7 +164,7 @@ class ConfigWindow:
|
||||
|
||||
def _save_config(self):
|
||||
autostart = self._switch_daemon_enabled.get_active()
|
||||
self._cfg.set('general', 'autostart', int(autostart))
|
||||
self._cfg.set('core', 'autostart', int(autostart))
|
||||
|
||||
self._accounts.save_to_cfg(self._cfg)
|
||||
|
||||
@@ -185,7 +185,7 @@ class ConfigWindow:
|
||||
for k, v in config.iteritems():
|
||||
self._cfg.set(modname, k, v)
|
||||
|
||||
self._cfg.set('general', 'enabled_plugins', enabled_plugins)
|
||||
self._cfg.set('core', 'enabled_plugins', enabled_plugins)
|
||||
|
||||
write_cfg(self._cfg)
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ class MailCollector:
|
||||
except:
|
||||
sender = ('','Error: cannot format sender')
|
||||
|
||||
sender_format = self._cfg.get('general', 'sender_format')
|
||||
sender_format = self._cfg.get('core', 'sender_format')
|
||||
if sender_format == '1' and sender[0] != '':
|
||||
# real sender name if not empty
|
||||
sender = sender_real
|
||||
|
||||
@@ -115,7 +115,7 @@ def load_plugins(cfg, hookreg):
|
||||
global plugins
|
||||
controller = MailnagController_Impl(hookreg)
|
||||
|
||||
enabled_lst = cfg.get('general', 'enabled_plugins').split(',')
|
||||
enabled_lst = cfg.get('core', 'enabled_plugins').split(',')
|
||||
enabled_lst = filter(lambda s: s != '', map(lambda s: s.strip(), enabled_lst))
|
||||
plugins = Plugin.load_plugins(cfg, controller, enabled_lst)
|
||||
|
||||
@@ -202,7 +202,7 @@ def start(cfg, hookreg):
|
||||
# start polling thread for POP3 accounts and
|
||||
# IMAP accounts without idle support
|
||||
if len(non_idle_accounts) > 0:
|
||||
check_interval = int(cfg.get('general', 'check_interval'))
|
||||
check_interval = int(cfg.get('core', 'check_interval'))
|
||||
|
||||
def poll_func():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user