From 8f3193d8919fa597d8cfd313353a271090ab8a51 Mon Sep 17 00:00:00 2001 From: Marcus Behrendt Date: Thu, 10 Oct 2024 11:44:26 +0200 Subject: [PATCH 1/4] fix(containers-panels): Correctly reset search --- src/view/containers_panel.rs | 7 ++++++- src/view/containers_panel.ui | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/view/containers_panel.rs b/src/view/containers_panel.rs index cc66ffb1..2ccad345 100644 --- a/src/view/containers_panel.rs +++ b/src/view/containers_panel.rs @@ -144,7 +144,7 @@ mod imp { ); klass.install_action(ACTION_SHOW_ALL_CONTAINERS, None, |widget, _, _| { - widget.set_show_only_running_containers(false); + widget.show_all_containers(); }); } @@ -493,6 +493,11 @@ impl ContainersPanel { .and_then(model::ContainerList::client) } + pub(crate) fn show_all_containers(&self) { + self.set_show_only_running_containers(false); + self.set_search_mode(false); + } + pub(crate) fn set_search_mode(&self, value: bool) { self.imp().search_bar.set_search_mode(value); } diff --git a/src/view/containers_panel.ui b/src/view/containers_panel.ui index 96fc1b69..d6ba3c9e 100644 --- a/src/view/containers_panel.ui +++ b/src/view/containers_panel.ui @@ -257,7 +257,7 @@ package-x-generic-symbolic - No Running Containers + No Matching Containers From 3e18f16e1ef30caa1de37b866497ade89cc1f33a Mon Sep 17 00:00:00 2001 From: Marcus Behrendt Date: Thu, 10 Oct 2024 11:44:39 +0200 Subject: [PATCH 2/4] fix(pods-panels): Correctly reset search --- src/view/pods_panel.rs | 7 ++++++- src/view/pods_panel.ui | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/view/pods_panel.rs b/src/view/pods_panel.rs index 24e29847..d79578c6 100644 --- a/src/view/pods_panel.rs +++ b/src/view/pods_panel.rs @@ -143,7 +143,7 @@ mod imp { ); klass.install_action(ACTION_SHOW_ALL_PODS, None, |widget, _, _| { - widget.set_show_only_running_pods(false); + widget.show_all_pods(); }); } @@ -420,6 +420,11 @@ impl Default for PodsPanel { } impl PodsPanel { + pub(crate) fn show_all_pods(&self) { + self.set_show_only_running_pods(false); + self.set_search_mode(false); + } + pub(crate) fn set_search_mode(&self, value: bool) { self.imp().search_bar.set_search_mode(value); } diff --git a/src/view/pods_panel.ui b/src/view/pods_panel.ui index bb239583..5736ad64 100644 --- a/src/view/pods_panel.ui +++ b/src/view/pods_panel.ui @@ -255,7 +255,7 @@ pods-symbolic - No Running Pods + No Matching Pods From 7fd15ab95dee068b831ef46ea258891827011200 Mon Sep 17 00:00:00 2001 From: Marcus Behrendt Date: Thu, 10 Oct 2024 11:44:59 +0200 Subject: [PATCH 3/4] fix(images-panels): Correctly reset search --- src/view/images_panel.rs | 7 ++++++- src/view/images_panel.ui | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/view/images_panel.rs b/src/view/images_panel.rs index f73d3247..0cedc388 100644 --- a/src/view/images_panel.rs +++ b/src/view/images_panel.rs @@ -115,7 +115,7 @@ mod imp { ); klass.install_action(ACTION_SHOW_ALL_IMAGES, None, |widget, _, _| { - widget.set_hide_intermediate_images(false); + widget.show_all_images(); }); } @@ -419,6 +419,11 @@ impl Default for ImagesPanel { } impl ImagesPanel { + pub(crate) fn show_all_images(&self) { + self.set_hide_intermediate_images(false); + self.set_search_mode(false); + } + pub(crate) fn set_search_mode(&self, value: bool) { self.imp().search_bar.set_search_mode(value); } diff --git a/src/view/images_panel.ui b/src/view/images_panel.ui index f2c8ce30..5ce511b1 100644 --- a/src/view/images_panel.ui +++ b/src/view/images_panel.ui @@ -280,7 +280,7 @@ image-x-generic-symbolic - No Tagged Images + No Matching Images From abce831d3a217372b0904da3ed55739f15c06513 Mon Sep 17 00:00:00 2001 From: Marcus Behrendt Date: Thu, 10 Oct 2024 11:45:06 +0200 Subject: [PATCH 4/4] fix(volumes-panels): Correctly reset search --- src/view/volumes_panel.rs | 7 ++++++- src/view/volumes_panel.ui | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/view/volumes_panel.rs b/src/view/volumes_panel.rs index 3373f77d..742c3626 100644 --- a/src/view/volumes_panel.rs +++ b/src/view/volumes_panel.rs @@ -109,7 +109,7 @@ mod imp { ); klass.install_action(ACTION_SHOW_ALL_VOLUMES, None, |widget, _, _| { - widget.set_show_only_used_volumes(false); + widget.show_all_volumes(); }); } @@ -398,6 +398,11 @@ impl Default for VolumesPanel { } impl VolumesPanel { + pub(crate) fn show_all_volumes(&self) { + self.set_show_only_used_volumes(false); + self.set_search_mode(false); + } + pub(crate) fn set_search_mode(&self, value: bool) { self.imp().search_bar.set_search_mode(value); } diff --git a/src/view/volumes_panel.ui b/src/view/volumes_panel.ui index 13bc4501..511ac8ca 100644 --- a/src/view/volumes_panel.ui +++ b/src/view/volumes_panel.ui @@ -255,7 +255,7 @@ drive-harddisk-symbolic - No Volumes in Use + No Matching Volumes