Skip to content

Commit

Permalink
Merge pull request #60 from DazedNConfused-/develop
Browse files Browse the repository at this point in the history
Prepare for v.1.6.7 release
  • Loading branch information
DazedNConfused- authored Jun 21, 2022
2 parents e70a2e4 + 998ed50 commit 9bee05a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cddagl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.6
1.6.7
6 changes: 5 additions & 1 deletion cddagl/ui/views/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3300,7 +3300,11 @@ def refresh_changelog(self):
else:
changelog_sorted.update({new_date : [new_entry]})

for date in sorted(changelog_sorted):
dated_changelog = sorted(changelog_sorted)
if config_true(get_config_value('reverse_sort_changelog', 'False')):
dated_changelog = reversed(dated_changelog)

for date in dated_changelog:
changelog_html.write('</ul>')
changelog_html.write(
'<h3>{0}</h3>'
Expand Down
17 changes: 17 additions & 0 deletions cddagl/ui/views/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ def __init__(self):
self.no_launcher_version_check_checkbox = (
no_launcher_version_check_checkbox)

reverse_sort_changelog_checkbox = QCheckBox()
check_state = (Qt.Checked if config_true(get_config_value(
'reverse_sort_changelog', 'False'))
else Qt.Unchecked)
reverse_sort_changelog_checkbox.setCheckState(
check_state)
reverse_sort_changelog_checkbox.stateChanged.connect(
self.rsc_changed)
layout.addWidget(reverse_sort_changelog_checkbox, 5, 0, 1, 2)
self.reverse_sort_changelog_checkbox = (
reverse_sort_changelog_checkbox)

self.setLayout(layout)
self.set_text()

Expand All @@ -158,6 +170,8 @@ def set_text(self):
'the launcher to be started'))
self.no_launcher_version_check_checkbox.setText(_('Do not check '
'for new version of the CDDA Game Launcher on launch'))
self.reverse_sort_changelog_checkbox.setText(_('Reverse sort '
'changelog'))
self.setTitle(_('Launcher'))

@property
Expand Down Expand Up @@ -206,6 +220,9 @@ def nlvcc_changed(self, state):
set_config_value('prevent_version_check_launch',
str(state != Qt.Unchecked))

def rsc_changed(self, state):
set_config_value('reverse_sort_changelog', str(state != Qt.Unchecked))

def klo_changed(self, state):
checked = state != Qt.Unchecked

Expand Down

0 comments on commit 9bee05a

Please sign in to comment.