Merge branch 'sbinix-master'
This commit is contained in:
commit
330e03d382
@ -142,6 +142,7 @@ Contributors, sorted by the number of commits in descending order:
|
|||||||
* Martin Zimmermann
|
* Martin Zimmermann
|
||||||
* Error 800
|
* Error 800
|
||||||
* Brian Jackson
|
* Brian Jackson
|
||||||
|
* sbinix
|
||||||
* Johannes Altmanninger
|
* Johannes Altmanninger
|
||||||
* Samir Benmendil
|
* Samir Benmendil
|
||||||
* Regina Hug
|
* Regina Hug
|
||||||
|
@ -369,6 +369,9 @@ MAPPINGS = {
|
|||||||
|
|
||||||
def init():
|
def init():
|
||||||
"""Initialize the global QWebSettings."""
|
"""Initialize the global QWebSettings."""
|
||||||
|
if config.get('general', 'private-browsing'):
|
||||||
|
QWebSettings.setIconDatabasePath('')
|
||||||
|
else:
|
||||||
QWebSettings.setIconDatabasePath(standarddir.cache())
|
QWebSettings.setIconDatabasePath(standarddir.cache())
|
||||||
QWebSettings.setOfflineWebApplicationCachePath(
|
QWebSettings.setOfflineWebApplicationCachePath(
|
||||||
os.path.join(standarddir.cache(), 'application-cache'))
|
os.path.join(standarddir.cache(), 'application-cache'))
|
||||||
@ -391,6 +394,12 @@ def init():
|
|||||||
|
|
||||||
def update_settings(section, option):
|
def update_settings(section, option):
|
||||||
"""Update global settings when qwebsettings changed."""
|
"""Update global settings when qwebsettings changed."""
|
||||||
|
if (section, option) == ('general', 'private-browsing'):
|
||||||
|
if config.get('general', 'private-browsing'):
|
||||||
|
QWebSettings.setIconDatabasePath('')
|
||||||
|
else:
|
||||||
|
QWebSettings.setIconDatabasePath(standarddir.cache())
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
mapping = MAPPINGS[section][option]
|
mapping = MAPPINGS[section][option]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -324,8 +324,11 @@ def generate_settings(filename):
|
|||||||
|
|
||||||
def _get_authors():
|
def _get_authors():
|
||||||
"""Get a list of authors based on git commit logs."""
|
"""Get a list of authors based on git commit logs."""
|
||||||
|
corrections = {'binix': 'sbinix'}
|
||||||
commits = subprocess.check_output(['git', 'log', '--format=%aN'])
|
commits = subprocess.check_output(['git', 'log', '--format=%aN'])
|
||||||
cnt = collections.Counter(commits.decode('utf-8').splitlines())
|
authors = [corrections.get(author, author)
|
||||||
|
for author in commits.decode('utf-8').splitlines()]
|
||||||
|
cnt = collections.Counter(authors)
|
||||||
return sorted(cnt, key=lambda k: (cnt[k], k), reverse=True)
|
return sorted(cnt, key=lambda k: (cnt[k], k), reverse=True)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user