1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 05:12:36 +01:00

chore: focus in signals

This commit is contained in:
aclist 2024-01-13 06:39:22 +09:00
parent 2a24bbfe6b
commit 00452cca5f
2 changed files with 16 additions and 3 deletions

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -o pipefail
version=5.0.0.rc-5
version=5.0.0.rc-6
#CONSTANTS
aid=221100
@ -528,7 +528,7 @@ fetch_dzq(){
fetch_helpers_by_sum(){
declare -A sums
sums=(
["ui.py"]="9cef55ccaa1c71b7e3ef648fe68d0eec"
["ui.py"]="a6d80a2cfff27e7c02e16499a0983f8e"
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="d9b0e6fa68314c18ac7aad565645948f"

View file

@ -1487,7 +1487,6 @@ class App(Gtk.Application):
self.win = OuterWindow()
self.win.fullscreen()
#self.win.set_keep_below(True)
accel = Gtk.AccelGroup()
accel.connect(Gdk.KEY_q, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE, self._halt_window_subprocess)
@ -1525,6 +1524,8 @@ class FilterPanel(Gtk.Box):
self.keyword_entry.set_placeholder_text("Filter by keyword")
self.keyword_entry.connect("activate", self._on_keyword_enter)
self.keyword_entry.connect("key-press-event", self._on_esc_pressed)
self.keyword_entry.connect("focus-in-event", self._on_keyword_focused)
self.keyword_entry.connect("focus-out-event", self._on_keyword_unfocused)
renderer_text = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END)
self.maps_combo = Gtk.ComboBox.new_with_model(map_store)
@ -1546,6 +1547,16 @@ class FilterPanel(Gtk.Box):
self.pack_start(self.debug_toggle, False, False, 0)
def _on_keyword_unfocused(self, widget):
print("user unfocused keyword field")
win = self.get_outer_window()
win.set_keep_below(False)
def _on_keyword_focused(self, widget):
print("user focused keyword field")
win = self.get_outer_window()
win.set_keep_below(True)
def _on_button_toggled(self, button, command):
transient_parent = self.get_outer_window()
grid = self.get_outer_grid()
@ -1577,6 +1588,8 @@ class FilterPanel(Gtk.Box):
return outer_window
def _on_keyword_enter(self, keyword_entry):
win = self.get_outer_window()
win.set_keep_below(False)
keyword = keyword_entry.get_text()
old_keyword = keyword_filter[0].split(delimiter)[1]
if keyword == old_keyword: