From 5cbe9321aa2d39330811be84c9b948c4fbb69b18 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 19 Jun 2025 12:05:08 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(launcher):=20remove=20extra?= =?UTF-8?q?=20whitespace=20in=20import=20statement=20and=20fix=20attribute?= =?UTF-8?q?=20access=20in=20mixed=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/launcher/main.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/modules/launcher/main.py b/modules/launcher/main.py index b703f0f..e8727cf 100644 --- a/modules/launcher/main.py +++ b/modules/launcher/main.py @@ -635,7 +635,6 @@ class Launcher(Window): # Use idle_add to check after the backspace is processed from gi.repository import GLib - GLib.idle_add(check_trigger_after_backspace) # Allow the normal backspace to proceed @@ -675,9 +674,7 @@ class Launcher(Window): if self._custom_widget_has_entry(result.custom_widget): # Let the custom widget handle the Enter key # Find the focused Entry widget and trigger its activate signal - focused_entry = self._find_focused_entry_in_widget( - result.custom_widget - ) + focused_entry = self._find_focused_entry_in_widget(result.custom_widget) if focused_entry: focused_entry.emit("activate") return True @@ -703,7 +700,7 @@ class Launcher(Window): return True # Check children recursively - if hasattr(widget, "get_children"): + if hasattr(widget, 'get_children'): for child in widget.get_children(): if self._custom_widget_has_entry(child): return True @@ -726,7 +723,7 @@ class Launcher(Window): return widget # Check children recursively - if hasattr(widget, "get_children"): + if hasattr(widget, 'get_children'): for child in widget.get_children(): focused_entry = self._find_focused_entry_in_widget(child) if focused_entry: @@ -739,14 +736,10 @@ class Launcher(Window): for result in self.results: if result.custom_widget: # Check if this is a NetworkPasswordEntry widget - if ( - hasattr(result.custom_widget, "__class__") - and result.custom_widget.__class__.__name__ - == "NetworkPasswordEntry" - ): + if hasattr(result.custom_widget, '__class__') and result.custom_widget.__class__.__name__ == 'NetworkPasswordEntry': return result.custom_widget # Also check if it has the cancel_password_entry method (duck typing) - elif hasattr(result.custom_widget, "cancel_password_entry"): + elif hasattr(result.custom_widget, 'cancel_password_entry'): return result.custom_widget return None