Skip to content

Commit

Permalink
Always allow unsaving a stock even if it might not be real
Browse files Browse the repository at this point in the history
  • Loading branch information
gltchitm committed Mar 6, 2023
1 parent ab269a5 commit 8c13326
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/datagrid/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ impl ObjectImpl for StoxDataGrid {
symbol,
true,
unsave_btn.is_visible(),
!save_btn.is_sensitive() && !unsave_btn.is_sensitive(),
!save_btn.is_sensitive(),
);
}));

Expand Down
7 changes: 2 additions & 5 deletions src/datagrid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,8 @@ impl StoxDataGrid {
}
}

if !is_default || ok {
save_btn.set_sensitive(true);
unsave_btn.set_sensitive(true);
}

save_btn.set_sensitive(!is_default || ok);
unsave_btn.set_sensitive(true);
refresh_btn.set_sensitive(true);

drop(lock.replace(None));
Expand Down
6 changes: 3 additions & 3 deletions src/sidebar_item/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ impl ObjectImpl for StoxSidebarItem {
}
}

fn property(&self, _id: usize, _pspec: &ParamSpec) -> Value {
match _pspec.name() {
fn property(&self, _id: usize, pspec: &ParamSpec) -> Value {
match pspec.name() {
"symbol" => self.symbol.borrow().to_string().to_value(),
"searched" => self.searched.borrow().to_value(),
_ => unimplemented!(),
Expand Down Expand Up @@ -147,7 +147,7 @@ impl StoxSidebarItem {
}

if main_info.bankruptcy && settings.boolean("sidebar-color-bankruptcy") {
symbol_label.add_css_class("symbol_bankruptcy")
symbol_label.add_css_class("symbol_bankruptcy");
}

if main_info.instrument_type == "FUTURE"
Expand Down

0 comments on commit 8c13326

Please sign in to comment.