Added telemetry system to get information about issues.
This commit is contained in:
@@ -79,6 +79,7 @@ from ..tk_chrome import (
|
||||
load_square_window_icon,
|
||||
show_themed_dialog,
|
||||
)
|
||||
from ..telemetry import current_telemetry, set_shared_telemetry_enabled
|
||||
from .components.action_panel import build_action_panel
|
||||
from .components.broadcasts_panel import build_broadcasts_panel
|
||||
from .components.header import build_dashboard_header
|
||||
@@ -446,6 +447,9 @@ def run_dashboard(paths: AppPaths) -> None:
|
||||
set_root_opacity(1.0)
|
||||
root.lift()
|
||||
play_button.focus_set()
|
||||
telemetry = current_telemetry()
|
||||
if telemetry is not None:
|
||||
telemetry.mark_ready({"interface": "gui"})
|
||||
root.after_idle(start_remote_content_refresh)
|
||||
|
||||
def fade_dashboard_in(step: int = 0) -> None:
|
||||
@@ -2832,6 +2836,7 @@ def run_dashboard(paths: AppPaths) -> None:
|
||||
)
|
||||
|
||||
def apply_saved_settings(updated_settings: Settings) -> None:
|
||||
set_shared_telemetry_enabled(updated_settings.telemetry_enabled)
|
||||
saved_limit = (
|
||||
f"{updated_settings.download_speed_limit_mbps:g} MB/s"
|
||||
if updated_settings.download_speed_limit_mbps is not None
|
||||
@@ -2842,7 +2847,8 @@ def run_dashboard(paths: AppPaths) -> None:
|
||||
f"runtime={updated_settings.runtime}, "
|
||||
f"proton_sync={updated_settings.proton_sync}, "
|
||||
f"download_limit={saved_limit}, "
|
||||
f"low_bandwidth={updated_settings.low_bandwidth_mode}"
|
||||
f"low_bandwidth={updated_settings.low_bandwidth_mode}, "
|
||||
f"telemetry={updated_settings.telemetry_enabled}"
|
||||
)
|
||||
status.set("Settings saved.")
|
||||
progress_text.set(
|
||||
|
||||
@@ -180,6 +180,7 @@ def open_settings_dialog(
|
||||
ui_scale_value = tk.StringVar(
|
||||
value=setting_label(current_settings.ui_scale, UI_SCALE_LABELS)
|
||||
)
|
||||
telemetry_value = tk.BooleanVar(value=current_settings.telemetry_enabled)
|
||||
suppress_unresponsive_value = tk.BooleanVar(
|
||||
value=current_settings.suppress_unresponsive_warnings
|
||||
)
|
||||
@@ -313,6 +314,7 @@ def open_settings_dialog(
|
||||
borderless=borderless_value.get(),
|
||||
allow_window_resizing=allow_window_resizing_value.get(),
|
||||
ui_scale=setting_value(ui_scale_value.get(), UI_SCALE_LABELS),
|
||||
telemetry_enabled=telemetry_value.get(),
|
||||
suppress_unresponsive_warnings=suppress_unresponsive_value.get(),
|
||||
runtime=setting_value(runtime_value.get(), RUNTIME_LABELS),
|
||||
proton_sync=setting_value(
|
||||
@@ -524,13 +526,49 @@ def open_settings_dialog(
|
||||
)
|
||||
update_custom_download_state()
|
||||
|
||||
diagnostics_card = ttk.LabelFrame(
|
||||
content,
|
||||
text="PRIVACY & DIAGNOSTICS",
|
||||
style="SettingsCard.TLabelframe",
|
||||
padding=14,
|
||||
)
|
||||
diagnostics_card.grid(
|
||||
row=2,
|
||||
column=0,
|
||||
columnspan=2,
|
||||
sticky="ew",
|
||||
pady=(12, 0),
|
||||
)
|
||||
diagnostics_card.columnconfigure(0, weight=1)
|
||||
ttk.Checkbutton(
|
||||
diagnostics_card,
|
||||
name="settings_telemetry_enabled",
|
||||
text="Send anonymous diagnostic and usage information",
|
||||
variable=telemetry_value,
|
||||
style="Settings.TCheckbutton",
|
||||
cursor="hand2",
|
||||
takefocus=True,
|
||||
).grid(row=0, column=0, sticky="w")
|
||||
diagnostics_hint = ttk.Label(
|
||||
diagnostics_card,
|
||||
text=(
|
||||
"Helps improve PristonTale EU Linux compatibility by sending anonymous "
|
||||
"launcher errors, Linux and display versions, graphics/runtime compatibility, "
|
||||
"and installation or update reliability. Game accounts, personal files, "
|
||||
"hostnames, and hardware serial numbers are never collected."
|
||||
),
|
||||
style="SettingsHint.TLabel",
|
||||
wraplength=720,
|
||||
)
|
||||
diagnostics_hint.grid(row=1, column=0, sticky="w", pady=(7, 0))
|
||||
|
||||
overrides_card = ttk.LabelFrame(
|
||||
content,
|
||||
text="OPTIONAL OVERRIDES",
|
||||
style="SettingsCard.TLabelframe",
|
||||
padding=14,
|
||||
)
|
||||
overrides_card.grid(row=2, column=0, columnspan=2, sticky="ew", pady=(12, 0))
|
||||
overrides_card.grid(row=3, column=0, columnspan=2, sticky="ew", pady=(12, 0))
|
||||
overrides_card.columnconfigure(0, weight=1)
|
||||
ttk.Label(
|
||||
overrides_card,
|
||||
@@ -614,6 +652,9 @@ def open_settings_dialog(
|
||||
card_wraplength = max(140, card_width - round(42 * launcher_ui_scale))
|
||||
display_hint.configure(wraplength=card_wraplength)
|
||||
rendering_hint.configure(wraplength=card_wraplength)
|
||||
diagnostics_hint.configure(
|
||||
wraplength=max(140, viewport_width - round(42 * launcher_ui_scale))
|
||||
)
|
||||
footer_note.configure(
|
||||
wraplength=(
|
||||
max(140, viewport_width - round(42 * launcher_ui_scale))
|
||||
@@ -644,7 +685,8 @@ def open_settings_dialog(
|
||||
pady=(12, 0),
|
||||
)
|
||||
downloads_card.grid_configure(row=2, pady=(12, 0))
|
||||
overrides_card.grid_configure(row=3, pady=(12, 0))
|
||||
diagnostics_card.grid_configure(row=3, pady=(12, 0))
|
||||
overrides_card.grid_configure(row=4, pady=(12, 0))
|
||||
else:
|
||||
display_card.grid_configure(
|
||||
row=0,
|
||||
@@ -663,7 +705,8 @@ def open_settings_dialog(
|
||||
pady=0,
|
||||
)
|
||||
downloads_card.grid_configure(row=1, pady=(12, 0))
|
||||
overrides_card.grid_configure(row=2, pady=(12, 0))
|
||||
diagnostics_card.grid_configure(row=2, pady=(12, 0))
|
||||
overrides_card.grid_configure(row=3, pady=(12, 0))
|
||||
|
||||
if footer_stacked:
|
||||
footer_note.grid_configure(row=0, column=0, columnspan=2)
|
||||
|
||||
Reference in New Issue
Block a user