Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![version](https://img.shields.io/badge/Version-1.4.3-white.svg)
![version](https://img.shields.io/badge/Version-1.4.4-white.svg)
![license](https://img.shields.io/badge/License-GPL%20v3-blue.svg)
![python](https://img.shields.io/badge/Python-3.12-green.svg)

Expand Down
4 changes: 2 additions & 2 deletions docs/install_macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
>[!warning]
>Due to Apple's restrictions when it comes to open source applications such as ours, workarounds are needed to get AppUsageGUI to run on macOS.

If you encounter the error message saying the app was not opened, click "done", then go into your security settings and allow AppUsageGUI to run on your device
If you encounter the error message saying the app was not opened or was damaged, click "done" or "cancel", then go into your security settings and allow AppUsageGUI to run on your device

Enter this in your terminal if AppUsageGUI still does not run:
Enter this in your terminal if AppUsageGUI still does not run or if no option to allow the app to run appears in settings:

```shell
xattr -dr com.apple.quarantine /Applications/AppUsageGUI/AppUsageGUI.app
Expand Down
2 changes: 1 addition & 1 deletion installers/macos_installer.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# This script is used to create the installer for the macOS version of the application
app_version='1.4.3'
app_version='1.4.4'

mv dist/AppUsageGUI.app dist/AppUsageGUI/

Expand Down
4 changes: 2 additions & 2 deletions installers/windows_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "AppUsageGUI"
#define MyAppVersion "1.4.3"
#define MyAppVersion "1.4.4"
#define MyAppPublisher "Adam Blair-Smith"
#define MyAppURL "https://github.com/Adam-Color/AppUsageGUI"
#define MyAppExeName "AppUsageGUI.exe"
#define MyInstallerName "AppUsageGUI_v1.4.3_WINDOWS_setup"
#define MyInstallerName "AppUsageGUI_v1.4.4_WINDOWS_setup"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
Expand Down
2 changes: 1 addition & 1 deletion src/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.4.3"
__version__ = "1.4.4"
5 changes: 3 additions & 2 deletions src/core/logic/app_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def reset(self):
self.update_thread = None

def start_filter_reset(self, refresh=False, update_pids=False):
self.temp_reset_thread = threading.Thread(target=self._reset_excluded_pids(refresh, update_pids), name="reset_filter")
self.temp_reset_thread.start()
if os.name == 'nt':
self.temp_reset_thread = threading.Thread(target=self._reset_excluded_pids(refresh, update_pids), name="reset_filter")
self.temp_reset_thread.start()

def _reset_excluded_pids(self, refresh, update_pids):
global EXCLUDED_APP_PIDS
Expand Down
7 changes: 5 additions & 2 deletions src/core/logic/time_tracker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import time
import traceback

from core.utils.logic_utils import threaded

class TimeTracker:
"""A clock that runs in a separate thread to track elapsed time, with pause and resume functionality."""
"""A clock that runs in a separate thread to track elapsed time,
with pause and resume functionality."""
def __init__(self, parent, logic_controller):
self.parent = parent

Expand Down Expand Up @@ -77,7 +79,8 @@ def update_captures(self):
except KeyError as e:
# handle v1 session files
if str(e) != '\'time_captures\'':
print("Error updating time captures from session file: KEYERROR |", str(e))
print("Error loading time captures from session file:\n")
traceback.print_exc()

def get_is_paused(self):
return self.is_paused
Expand Down
4 changes: 2 additions & 2 deletions src/core/screens/splash_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ def load_app():
break
if suffix is None:
webbrowser.open_new_tab("https://github.com/adam-color/AppUsageGUI/releases/latest")
tk.showinfo("Update", "Your platform is currently unsupported.")
tk.messagebox.showinfo("Update", "Your platform is currently unsupported.")
elif download_url is not None:
webbrowser.open_new_tab(download_url)
tk.showinfo("Update", "Please install the latest version after it downloads,\nautomatic updates are not yet available.\n\nThe application will now close.")
tk.messagebox.showinfo("Update", "Please install the latest version after it downloads,\nautomatic updates are not yet available.\n\nThe application will now close.")
sys.exit(0)

update_progress(70)
Expand Down
27 changes: 16 additions & 11 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import tkinter as tk
import os
import traceback

from core.screens.splash_screen import splash_screen
from core.utils.tk_utils import is_dark_mode
Expand All @@ -33,21 +34,25 @@ def apply_dark_theme(root):
root.tk_setPalette(background=dark_bg, foreground=dark_fg)

def main():
root = tk.Tk()
root.withdraw()
try:
root = tk.Tk()
root.withdraw()

if is_dark_mode():
apply_dark_theme(root)
if is_dark_mode():
apply_dark_theme(root)

icon_name = "core\\resources\\icon.ico" if os.name == 'nt' else "core/resources/icon.icns"
icon_path = resource_path(icon_name)
icon_name = "core\\resources\\icon.ico" if os.name == 'nt' else "core/resources/icon.icns"
icon_path = resource_path(icon_name)

root.iconbitmap(icon_path)
root.title(f"AppUsageGUI - v{__version__}")
root.iconbitmap(icon_path)
root.title(f"AppUsageGUI - v{__version__}")

splash_screen(root)

root.mainloop()
splash_screen(root)
root.mainloop()
except Exception as e:
error_message = f"An unexpected error occurred:\n{str(e)}\n\n{traceback.format_exc()}"
print(error_message)
tk.messagebox.showerror("Error", error_message)

if __name__ == "__main__":
main()