Skip to content

Commit

Permalink
Remove 'Show search on start' option
Browse files Browse the repository at this point in the history
  • Loading branch information
nokyan committed Jan 24, 2025
1 parent 5e435b0 commit 4c942e3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 31 deletions.
4 changes: 0 additions & 4 deletions data/net.nokyan.Resources.gschema.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
<default>&quot;Normal&quot;</default>
<summary>Refresh Speed</summary>
</key>
<key name="show-search-on-start" type="b">
<default>false</default>
<summary>Show search field for Processes and Applications on launch</summary>
</key>
<key name="show-virtual-drives" type="b">
<default>false</default>
<summary>Show virtual block devices such as LVM containers</summary>
Expand Down
5 changes: 0 additions & 5 deletions data/resources/ui/dialogs/settings_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@
</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="show_search_on_start_row">
<property name="title" translatable="yes">Show Search Fields on Launch</property>
</object>
</child>
<child>
<object class="AdwSwitchRow" id="sidebar_details_row">
<property name="title" translatable="yes">Show Usage Details in Sidebar</property>
Expand Down
9 changes: 0 additions & 9 deletions src/ui/dialogs/settings_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ mod imp {
#[template_child]
pub graph_data_points_row: TemplateChild<adw::SpinRow>,
#[template_child]
pub show_search_on_start_row: TemplateChild<adw::SwitchRow>,
#[template_child]
pub sidebar_details_row: TemplateChild<adw::SwitchRow>,
#[template_child]
pub sidebar_description_row: TemplateChild<adw::SwitchRow>,
Expand Down Expand Up @@ -188,8 +186,6 @@ impl ResSettingsDialog {
.set_active(SETTINGS.sidebar_description());
imp.sidebar_meter_type_row
.set_selected((SETTINGS.sidebar_meter_type() as u8) as u32);
imp.show_search_on_start_row
.set_active(SETTINGS.show_search_on_start());
imp.normalize_cpu_usage_row
.set_active(SETTINGS.normalize_cpu_usage());

Expand Down Expand Up @@ -313,11 +309,6 @@ impl ResSettingsDialog {
}
});

imp.show_search_on_start_row
.connect_active_notify(|switch_row| {
let _ = SETTINGS.set_show_search_on_start(switch_row.is_active());
});

imp.normalize_cpu_usage_row
.connect_active_notify(|switch_row| {
let _ = SETTINGS.set_normalize_cpu_usage(switch_row.is_active());
Expand Down
12 changes: 0 additions & 12 deletions src/ui/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,6 @@ impl MainWindow {

imp.resources_sidebar.set_stack(&imp.content_stack);

if SETTINGS.show_search_on_start() {
// we want the search bar to show up for both but also let the last viewed page grab the focus, so order is
// important here
if SETTINGS.last_viewed_page() == applications::TAB_ID {
imp.processes.toggle_search();
imp.apps.toggle_search();
} else if SETTINGS.last_viewed_page() == processes::TAB_ID {
imp.apps.toggle_search();
imp.processes.toggle_search();
}
}

if ARGS.disable_process_monitoring {
self.remove_page(imp.apps_page.child().downcast_ref().unwrap());
self.remove_page(imp.processes_page.child().downcast_ref().unwrap());
Expand Down
1 change: 0 additions & 1 deletion src/utils/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ impl Settings {
uint_settings!(graph_data_points, apps_sort_by, processes_sort_by);

bool_settings!(
show_search_on_start,
show_virtual_drives,
show_virtual_network_interfaces,
sidebar_details,
Expand Down

0 comments on commit 4c942e3

Please sign in to comment.