Skip to content

Commit

Permalink
Resolved Problem where Trim Dialog would not work. (#46)
Browse files Browse the repository at this point in the history
* Added Combat Time to Copy Summary.

* Updated league connector for new backend.

* Update League Connector to use oscr.stobuilds.com (HTTP)

* Updated oscr.stobilds.com to use HTTPS

* Updated README

* Reworded

* Removed word

* Updated README again

* Updated to also reference CLA.

* Moved section down

* Updated Error message on log failure.

* Updated messages again.

* Updated pyproject.toml

* Updated error log reporting in league connector.

* And removed debug print

* Updated version

* Updated OSCR client, Enabled New Upload Result Dialog

* Updated Version

* Testing something.

* Testing something.

* Try something else

* Having fun yet?

* Bootstrap venv

* PS1

* bat

* idk I'm tired

* Woops

* Add executable

* Trying to use cx_Freeze

* Trying to get cx_Freeze working.

* Test Build

* czfreeze

* Test?

* More

* More testing

* idk

* ZIP Exclude Packages

* bdis_msi

* Try and include assets

* idk kinda stuck

* Check if frozen

* Compilation error

* Icon and Shortcut?

* Was using the wrong syntax

* Another typo

* Try and add more to the msi

* Typo

* Try this instead

* toml is very strange

* Doesn't like that ICON

* ico is not optional

* Good enough for now

* Only create MSI on release

* Bumped up version

* Remove OSCR_settings

* Updated build workflow

* Update to include README and LICENSE

* Feature: Separate Seasonal Records from Overall Records.

* restored templog_folder_path

* Checkpoint

* Adjusted minimum UI size.

* Updated pyproject.toml

* 1/2 Fixed Trimming

* 2/3 I messed up.

* 3/3 ok

* One more
  • Loading branch information
Kraust authored Aug 10, 2024
1 parent 188afe8 commit bb6aafc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
19 changes: 9 additions & 10 deletions OSCRUI/datafunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def analyze_log_callback(self, translate, combat_id=None, path=None, parser_num:
if not hidden_path and path != self.settings.value('log_path'):
self.settings.setValue('log_path', path)

self.parser1.log_path = path
parser.log_path = path
try:
self.parser1.analyze_log_file()
parser.analyze_log_file()
except FileExistsError:
if self.settings.value('log_size_warning', type=bool):
action = log_size_warning(self, translate)
Expand All @@ -79,13 +79,12 @@ def analyze_log_callback(self, translate, combat_id=None, path=None, parser_num:
return
elif action == 'trim':
trim_logfile(self)
self.parser1.analyze_log_file()
parser.analyze_log_file()
elif action == 'continue':
self.parser1.analyze_massive_log_file()
else:
action = 'continue'
else:
self.parser1.analyze_massive_log_file()
parser.analyze_massive_log_file()
elif action == 'cancel':
return

except Exception as ex:
error = QMessageBox()
error.setWindowTitle("Open Source Combatlog Reader")
Expand Down Expand Up @@ -117,8 +116,8 @@ def analyze_log_callback(self, translate, combat_id=None, path=None, parser_num:
self.current_combats.setCurrentRow(0)
self.current_combat_id = 0
self.current_combat_path = path
self.widgets.navigate_up_button.setEnabled(self.parser1.navigation_up)
self.widgets.navigate_down_button.setEnabled(self.parser1.navigation_down)
self.widgets.navigate_up_button.setEnabled(parser.navigation_up)
self.widgets.navigate_down_button.setEnabled(parser.navigation_down)

analysis_thread = CustomThread(self.window, lambda: parser.full_combat_analysis(0))
analysis_thread.result.connect(lambda result: analysis_data_slot(self, result))
Expand Down
18 changes: 12 additions & 6 deletions OSCRUI/subwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def show_warning(self, title: str, message: str):
def log_size_warning(self, translate):
"""
Warns user about oversized logfile.
Note: The default button counts as a two buttons
:return: "cancel", "split dialog", "continue"
"""
Expand All @@ -63,20 +64,25 @@ def log_size_warning(self, translate):
dialog.setText(message)
dialog.setWindowTitle('Open Source Combalog Reader')
dialog.setWindowIcon(self.icons['oscr'])
dialog.addButton(self._('Cancel'), QMessageBox.ButtonRole.RejectRole)

dialog.addButton(self._('Continue'), QMessageBox.ButtonRole.AcceptRole)
default_button = dialog.addButton(self._('Split Dialog'), QMessageBox.ButtonRole.ActionRole)
dialog.addButton(self._('Trim'), QMessageBox.ButtonRole.ActionRole)
dialog.addButton(self._('Continue'), QMessageBox.ButtonRole.AcceptRole)
dialog.addButton(self._('Cancel'), QMessageBox.ButtonRole.RejectRole)

dialog.setDefaultButton(default_button)
clicked = dialog.exec()

if clicked == 1:
return 'split dialog'
elif clicked == 2:
return 'trim'
elif clicked == 3:
return 'continue'
else:
return 'cancel'
elif clicked == 3:
return 'split dialog'
elif clicked == 4:
return 'trim'

return 'cancel'


def split_dialog(self, translate):
Expand Down

0 comments on commit bb6aafc

Please sign in to comment.