From cee63ca034c5c91fa0e6e638842b80ec11e09c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cs=C3=A1nyi=20Istv=C3=A1n?= Date: Sun, 4 Jun 2023 12:45:55 +0200 Subject: [PATCH] Add menu item separator for libappindicator --- src/api/linux_libappindicator/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/api/linux_libappindicator/mod.rs b/src/api/linux_libappindicator/mod.rs index 3417c07..244ab89 100644 --- a/src/api/linux_libappindicator/mod.rs +++ b/src/api/linux_libappindicator/mod.rs @@ -52,4 +52,13 @@ impl TrayItemLinux { Ok(()) } + + pub fn add_separator(&mut self) -> Result<(), TIError> { + let item = gtk::SeparatorMenuItem::new(); + self.menu.append(&item); + self.menu.show_all(); + self.tray.set_menu(&mut self.menu); + + Ok(()) + } }