diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index b6669dca..d5a7e19a 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -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() diff --git a/app/ui/satellites_dialog.glade b/app/ui/satellites_dialog.glade index 7998c713..a24c5d16 100644 --- a/app/ui/satellites_dialog.glade +++ b/app/ui/satellites_dialog.glade @@ -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 --> + - + @@ -1593,6 +1594,9 @@ Author: Dmitriy Yefremov + False diff --git a/app/ui/search.py b/app/ui/search.py index 31bd60cd..bba8a75f 100644 --- a/app/ui/search.py +++ b/app/ui/search.py @@ -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)