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@=SGJ;=i-%4<&`PslSx>
gwx|A3{-B`1?uB{v;k}l3u0J#LRABw3x)n|T3!9S|(EtDd
diff --git a/ks_includes/locales/ru/LC_MESSAGES/KlipperScreen.po b/ks_includes/locales/ru/LC_MESSAGES/KlipperScreen.po
index c867711e7..037db9860 100644
--- a/ks_includes/locales/ru/LC_MESSAGES/KlipperScreen.po
+++ b/ks_includes/locales/ru/LC_MESSAGES/KlipperScreen.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: KlipperScreen\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-26 12:31-0300\n"
-"PO-Revision-Date: 2026-01-28 16:51+0300\n"
+"PO-Revision-Date: 2026-01-28 17:01+0300\n"
"Last-Translator: gfbdrgng \n"
"Language-Team: Russian \n"
"Language: ru\n"
@@ -941,6 +941,12 @@ msgstr "Обновление"
msgid "Show cursor"
msgstr "Отображать курсор"
+msgid "Show Access Point toggle"
+msgstr "Показывать переключатель точки доступа"
+
+msgid "Test feature, unstable behavior possible"
+msgstr "Тестовая функция, возможны сбои"
+
msgid "For mouse control or to verify touchscreen accuracy"
msgstr "Для управления мышью или для проверки точности сенсора"
diff --git a/panels/network.py b/panels/network.py
index 22be8c85f..ae490ef52 100644
--- a/panels/network.py
+++ b/panels/network.py
@@ -84,31 +84,7 @@ def __init__(self, screen, title):
)
self.wifi_toggle.connect("notify::active", self.toggle_wifi)
- # AP toggle switch
- self.ap_ssid = self._config.get_main_config().get('ap_ssid', 'zboltprinter')
- self.ap_password = self._config.get_main_config().get('ap_password', 'zboltprinter')
- self.is_ap_mode = False
-
- # Check saved AP mode state
- ap_mode_enabled = self._config.get_main_config().getboolean('ap_mode_enabled', False)
- current_ap_mode = self.sdbus_nm.is_access_point_mode()
-
- self.ap_toggle = Gtk.Switch(
- width_request=round(self._gtk.font_size * 2),
- height_request=round(self._gtk.font_size),
- active=current_ap_mode or ap_mode_enabled
- )
- self.ap_toggle.connect("notify::active", self.toggle_ap_mode)
- self.ap_label = Gtk.Label(label=_("AP"), hexpand=False)
-
sbox = Gtk.Box(hexpand=True, vexpand=False)
-
- # AP toggle container - placed first (leftmost)
- ap_container = Gtk.Box(spacing=5, hexpand=False)
- ap_container.add(self.ap_label)
- ap_container.add(self.ap_toggle)
- sbox.add(ap_container)
-
sbox.add(self.labels['interface'])
sbox.add(self.labels['ip'])
sbox.add(self.reload_button)
@@ -117,18 +93,59 @@ def __init__(self, screen, title):
scroll = self._gtk.ScrolledWindow()
self.labels['main_box'] = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, vexpand=True)
+ # AP test feature visibility flag
+ self.show_ap_toggle = self._config.get_main_config().getboolean('show_ap_toggle', False)
+
+ # AP-related attributes (used only if show_ap_toggle is True)
+ self.ap_ssid = self._config.get_main_config().get('ap_ssid', 'zboltprinter')
+ self.ap_password = self._config.get_main_config().get('ap_password', 'zboltprinter')
+ self.is_ap_mode = False
+
if self.sdbus_nm.wifi:
self.labels['main_box'].pack_start(sbox, False, False, 5)
- # Check initial AP mode state and restore if needed
- if self.sdbus_nm.is_access_point_mode():
- self.is_ap_mode = True
- self.ap_toggle.set_active(True)
- GLib.idle_add(self.update_ap_display)
- elif ap_mode_enabled and not current_ap_mode:
- # AP mode was enabled in config but not active, restore it
- logging.info("Restoring AP mode from saved configuration")
- GLib.idle_add(self.restore_ap_mode)
+ if self.show_ap_toggle:
+ # Initialize AP toggle switch (test feature)
+ ap_mode_enabled = self._config.get_main_config().getboolean('ap_mode_enabled', False)
+ current_ap_mode = self.sdbus_nm.is_access_point_mode()
+
+ self.ap_toggle = Gtk.Switch(
+ width_request=round(self._gtk.font_size * 2),
+ height_request=round(self._gtk.font_size),
+ active=current_ap_mode or ap_mode_enabled
+ )
+ self.ap_toggle.connect("notify::active", self.toggle_ap_mode)
+ self.ap_label = Gtk.Label(label=_("AP"), hexpand=False)
+
+ ap_container = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2, hexpand=False)
+ ap_label_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
+ ap_label_box.add(self.ap_label)
+ ap_note = Gtk.Label(
+ label=_("Test feature, unstable behavior possible"),
+ hexpand=False
+ )
+ ap_note.set_justify(Gtk.Justification.LEFT)
+ ap_note.set_xalign(0)
+ ap_note.get_style_context().add_class("dim-label")
+ ap_label_box.add(ap_note)
+
+ ap_container.add(ap_label_box)
+ ap_container.add(self.ap_toggle)
+
+ # Insert AP container at the beginning of sbox
+ sbox.pack_start(ap_container, False, False, 5)
+
+ # Check initial AP mode state and restore if needed
+ if self.sdbus_nm.is_access_point_mode():
+ self.is_ap_mode = True
+ self.ap_toggle.set_active(True)
+ GLib.idle_add(self.update_ap_display)
+ elif ap_mode_enabled and not current_ap_mode:
+ logging.info("Restoring AP mode from saved configuration")
+ GLib.idle_add(self.restore_ap_mode)
+ else:
+ GLib.idle_add(self.load_networks)
else:
+ # AP toggle hidden: always use normal network list
GLib.idle_add(self.load_networks)
scroll.add(self.network_list)
self.sdbus_nm.enable_monitoring(True)
From 40e8d535a09aab78f8e9f622e219df1449c89890 Mon Sep 17 00:00:00 2001
From: Vlad <427departament@gmail.com>
Date: Wed, 28 Jan 2026 17:06:00 +0300
Subject: [PATCH 8/8] Refactor Access Point UI in network panel for improved
layout
- Simplified the Access Point (AP) container by removing the note label and adjusting the layout.
- Enhanced the spacing and organization of UI elements for better visual clarity.
---
panels/network.py | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/panels/network.py b/panels/network.py
index ae490ef52..a3238a578 100644
--- a/panels/network.py
+++ b/panels/network.py
@@ -116,19 +116,8 @@ def __init__(self, screen, title):
self.ap_toggle.connect("notify::active", self.toggle_ap_mode)
self.ap_label = Gtk.Label(label=_("AP"), hexpand=False)
- ap_container = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2, hexpand=False)
- ap_label_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=0)
- ap_label_box.add(self.ap_label)
- ap_note = Gtk.Label(
- label=_("Test feature, unstable behavior possible"),
- hexpand=False
- )
- ap_note.set_justify(Gtk.Justification.LEFT)
- ap_note.set_xalign(0)
- ap_note.get_style_context().add_class("dim-label")
- ap_label_box.add(ap_note)
-
- ap_container.add(ap_label_box)
+ ap_container = Gtk.Box(spacing=5, hexpand=False)
+ ap_container.add(self.ap_label)
ap_container.add(self.ap_toggle)
# Insert AP container at the beginning of sbox