components.rs: remove unused Component::set_id method

pull/227/head
Manos Pitsidianakis 2023-06-13 17:55:04 +03:00
parent 96537e48c5
commit 155fb41b93
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
26 changed files with 0 additions and 135 deletions

View File

@ -153,8 +153,6 @@ pub trait Component: Display + Debug + Send + Sync {
fn kill(&mut self, _id: ComponentId, _context: &mut Context) {}
fn set_id(&mut self, _id: ComponentId) {}
fn id(&self) -> ComponentId;
fn shortcuts(&self, _context: &Context) -> ShortcutMaps {

View File

@ -268,10 +268,6 @@ impl Component for ContactManager {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
if !self.has_changes {
return true;

View File

@ -955,10 +955,6 @@ impl Component for ContactList {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
self.view
.as_mut()

View File

@ -2138,9 +2138,6 @@ impl Component for Composer {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
if !self.has_changes {

View File

@ -300,8 +300,4 @@ impl Component for EditAttachmentsRefMut<'_, '_> {
fn id(&self) -> ComponentId {
self.inner.id
}
fn set_id(&mut self, new_id: ComponentId) {
self.inner.id = new_id;
}
}

View File

@ -250,17 +250,6 @@ impl Component for KeySelection {
KeySelection::Loaded { ref widget, .. } => widget.id(),
}
}
fn set_id(&mut self, new_id: ComponentId) {
match self {
KeySelection::LoadingKeys {
ref mut progress_spinner,
..
} => progress_spinner.set_id(new_id),
KeySelection::Error { ref mut id, .. } => *id = new_id,
KeySelection::Loaded { ref mut widget, .. } => widget.set_id(new_id),
}
}
}
#[derive(Debug, Clone)]

View File

@ -1981,9 +1981,6 @@ impl Component for Listing {
fn id(&self) -> ComponentId {
self.component.id()
}
fn set_id(&mut self, id: ComponentId) {
self.component.set_id(id);
}
fn status(&self, context: &Context) -> String {
let mailbox_hash = match self.cursor_pos.1 {

View File

@ -2041,7 +2041,4 @@ impl Component for CompactListing {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -1563,7 +1563,4 @@ impl Component for ConversationsListing {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -234,8 +234,4 @@ impl Component for OfflineListing {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -1612,7 +1612,4 @@ impl Component for PlainListing {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -1580,7 +1580,4 @@ impl Component for ThreadListing {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -467,8 +467,4 @@ impl Component for AccountStatus {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -2909,10 +2909,6 @@ impl Component for MailView {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn kill(&mut self, id: ComponentId, context: &mut Context) {
if self.id == id {
context

View File

@ -638,8 +638,4 @@ impl Component for EnvelopeView {
.replies
.push_back(UIEvent::Action(Tab(Kill(self.id))));
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -209,8 +209,4 @@ impl Component for HtmlView {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -1172,10 +1172,6 @@ impl Component for ThreadView {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn kill(&mut self, id: ComponentId, context: &mut Context) {
debug_assert!(self.id == id);
context

View File

@ -542,10 +542,6 @@ impl Component for MailboxManager {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn can_quit_cleanly(&mut self, _context: &Context) -> bool {
true
}

View File

@ -135,10 +135,6 @@ mod dbus {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
fn escape_str(s: &str) -> String {
@ -286,10 +282,6 @@ impl Component for NotificationCommand {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
fn update_xbiff(path: &str) -> Result<()> {

View File

@ -446,10 +446,6 @@ impl Component for SVGScreenshotFilter {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
const CSS_STYLE: &str = r#"#t{font-family:'DejaVu Sans Mono',monospace;font-style:normal;font-size:14px;} text {dominant-baseline: text-before-edge; white-space: pre;} .f{fill:#e5e5e5;} .b{fill:#000;} .c0 {fill:#000;} .c1 {fill:#cd0000;} .c2 {fill:#00cd00;} .c3 {fill:#cdcd00;} .c4 {fill:#00e;} .c5 {fill:#cd00cd;} .c6 {fill:#00cdcd;} .c7 {fill:#e5e5e5;} .c8 {fill:#7f7f7f;} .c9 {fill:#f00;} .c10 {fill:#0f0;} .c11 {fill:#ff0;} .c12 {fill:#5c5cff;} .c13 {fill:#f0f;} .c14 {fill:#0ff;} .c15 {fill:#fff;}"#;

View File

@ -791,9 +791,6 @@ impl Component for StatusBar {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
self.container.can_quit_cleanly(context)
@ -1539,10 +1536,6 @@ impl Component for Tabbed {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
fn shortcuts(&self, context: &Context) -> ShortcutMaps {
let mut map = ShortcutMaps::default();
map.insert(
@ -1645,10 +1638,6 @@ impl Component for RawBuffer {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
impl RawBuffer {

View File

@ -424,9 +424,6 @@ impl<T: 'static + PartialEq + Debug + Clone + Sync + Send> Component for UIDialo
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
impl Component for UIConfirmationDialog {
@ -753,10 +750,6 @@ impl Component for UIConfirmationDialog {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
impl<T: PartialEq + Debug + Clone + Sync + Send, F: 'static + Sync + Send> Selector<T, F> {

View File

@ -110,9 +110,6 @@ impl Component for HSplit {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
/// A vertically split in half container.
@ -250,7 +247,4 @@ impl Component for VSplit {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -845,8 +845,4 @@ impl Component for Pager {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}

View File

@ -318,10 +318,6 @@ impl Component for TextField {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
impl fmt::Display for TextField {

View File

@ -179,13 +179,6 @@ impl Component for Field {
Self::Choice(_, _, i) => *i,
}
}
fn set_id(&mut self, id: ComponentId) {
match self {
Self::Text(ref mut i) => i.set_id(id),
Self::Choice(_, _, i) => *i = id,
}
}
}
impl fmt::Display for Field {
@ -535,9 +528,6 @@ impl<T: 'static + std::fmt::Debug + Copy + Default + Send + Sync> Component for
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
#[derive(Debug, Default)]
@ -675,9 +665,6 @@ where
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
#[derive(Debug, PartialEq, Eq, Clone)]
@ -811,9 +798,6 @@ impl Component for AutoComplete {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}
impl AutoComplete {
@ -1260,8 +1244,4 @@ impl Component for ProgressSpinner {
fn id(&self) -> ComponentId {
self.id
}
fn set_id(&mut self, id: ComponentId) {
self.id = id;
}
}