Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/panels/search/show all #835

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/view/containers_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/containers_panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">package-x-generic-symbolic</property>
<property name="title" translatable="yes">No Running Containers</property>
<property name="title" translatable="yes">No Matching Containers</property>

<child>
<object class="GtkButton">
Expand Down
7 changes: 6 additions & 1 deletion src/view/images_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/images_panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">image-x-generic-symbolic</property>
<property name="title" translatable="yes">No Tagged Images</property>
<property name="title" translatable="yes">No Matching Images</property>

<child>
<object class="GtkButton">
Expand Down
7 changes: 6 additions & 1 deletion src/view/pods_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/pods_panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">pods-symbolic</property>
<property name="title" translatable="yes">No Running Pods</property>
<property name="title" translatable="yes">No Matching Pods</property>

<child>
<object class="GtkButton">
Expand Down
7 changes: 6 additions & 1 deletion src/view/volumes_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/volumes_panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
<property name="child">
<object class="AdwStatusPage">
<property name="icon-name">drive-harddisk-symbolic</property>
<property name="title" translatable="yes">No Volumes in Use</property>
<property name="title" translatable="yes">No Matching Volumes</property>

<child>
<object class="GtkButton">
Expand Down
Loading