mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-07-07 01:29:32 +02:00
minor fixes for filter and search
This commit is contained in:
@@ -2173,10 +2173,17 @@ class Application(Gtk.Application):
|
||||
self.update_filter_sat_positions()
|
||||
self._filter_entry.grab_focus()
|
||||
else:
|
||||
self._filter_entry.set_text("")
|
||||
self.filter_set_default()
|
||||
|
||||
self._filter_bar.set_search_mode(value)
|
||||
|
||||
def filter_set_default(self):
|
||||
""" Setting defaults for filter elements. """
|
||||
self._filter_entry.set_text("")
|
||||
self._filter_sat_positions_box.set_active(0)
|
||||
self._filter_types_box.set_active(0)
|
||||
self._filter_only_free_button.set_active(False)
|
||||
|
||||
def init_sat_positions(self):
|
||||
self._sat_positions.clear()
|
||||
first = (self._filter_sat_positions_model[0][0],)
|
||||
@@ -2263,6 +2270,8 @@ class Application(Gtk.Application):
|
||||
self._search_bar.set_search_mode(value)
|
||||
if value:
|
||||
self._search_entry.grab_focus()
|
||||
else:
|
||||
self._search_entry.set_text("")
|
||||
|
||||
def on_search_down(self, item):
|
||||
self._search_provider.on_search_down()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018-2019 Dmitriy Yefremov
|
||||
Copyright (c) 2018-2020 Dmitriy Yefremov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -55,9 +55,10 @@ Author: Dmitriy Yefremov
|
||||
-->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<!-- interface-css-provider-path style.css -->
|
||||
<!-- interface-license-type mit -->
|
||||
<!-- interface-name DemonEditor -->
|
||||
<!-- interface-copyright 2018-2019 Dmitriy Yefremov -->
|
||||
<!-- interface-copyright 2018-2020 Dmitriy Yefremov -->
|
||||
<!-- interface-authors Dmitriy Yefremov -->
|
||||
<object class="GtkListStore" id="fec_store">
|
||||
<columns>
|
||||
@@ -1593,6 +1594,9 @@ Author: Dmitriy Yefremov
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="group"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
||||
@@ -31,6 +31,8 @@ class SearchProvider:
|
||||
if self._max_indexes > 0:
|
||||
self.on_search_down()
|
||||
|
||||
self.update_navigation_buttons()
|
||||
|
||||
def scroll_to(self, index):
|
||||
view, path = self._paths[index]
|
||||
view.scroll_to_cell(path, None)
|
||||
|
||||
Reference in New Issue
Block a user