Remove icon_label

Eric Holk and Max Brunsfeld created

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>

Change summary

crates/collab_ui/src/notification_panel.rs |  9 ---------
crates/terminal_view/src/terminal_panel.rs | 14 --------------
crates/workspace/src/dock.rs               |  8 --------
3 files changed, 31 deletions(-)

Detailed changes

crates/collab_ui/src/notification_panel.rs 🔗

@@ -676,15 +676,6 @@ impl Panel for NotificationPanel {
         "Notification Panel"
     }
 
-    fn icon_label(&self, _window: &Window, cx: &App) -> Option<String> {
-        let count = self.notification_store.read(cx).unread_notification_count();
-        if count == 0 {
-            None
-        } else {
-            Some(count.to_string())
-        }
-    }
-
     fn toggle_action(&self) -> Box<dyn gpui::Action> {
         Box::new(ToggleFocus)
     }

crates/terminal_view/src/terminal_panel.rs 🔗

@@ -1605,20 +1605,6 @@ impl Panel for TerminalPanel {
         })
     }
 
-    fn icon_label(&self, _window: &Window, cx: &App) -> Option<String> {
-        let count = self
-            .center
-            .panes()
-            .into_iter()
-            .map(|pane| pane.read(cx).items_len())
-            .sum::<usize>();
-        if count == 0 {
-            None
-        } else {
-            Some(count.to_string())
-        }
-    }
-
     fn persistent_name() -> &'static str {
         "TerminalPanel"
     }

crates/workspace/src/dock.rs 🔗

@@ -38,9 +38,6 @@ pub trait Panel: Focusable + EventEmitter<PanelEvent> + Render + Sized {
     fn icon(&self, window: &Window, cx: &App) -> Option<ui::IconName>;
     fn icon_tooltip(&self, window: &Window, cx: &App) -> &'static str;
     fn toggle_action(&self) -> Box<dyn Action>;
-    fn icon_label(&self, _window: &Window, _: &App) -> Option<String> {
-        None
-    }
     fn is_zoomed(&self, _window: &Window, _cx: &App) -> bool {
         false
     }
@@ -78,7 +75,6 @@ pub trait PanelHandle: Send + Sync {
     fn icon(&self, window: &Window, cx: &App) -> Option<ui::IconName>;
     fn icon_tooltip(&self, window: &Window, cx: &App) -> &'static str;
     fn toggle_action(&self, window: &Window, cx: &App) -> Box<dyn Action>;
-    fn icon_label(&self, window: &Window, cx: &App) -> Option<String>;
     fn panel_focus_handle(&self, cx: &App) -> FocusHandle;
     fn to_any(&self) -> AnyView;
     fn activation_priority(&self, cx: &App) -> u32;
@@ -168,10 +164,6 @@ where
         self.read(cx).toggle_action()
     }
 
-    fn icon_label(&self, window: &Window, cx: &App) -> Option<String> {
-        self.read(cx).icon_label(window, cx)
-    }
-
     fn to_any(&self) -> AnyView {
         self.clone().into()
     }