roundabout,
created on Wednesday, 20 August 2025, 08:54:10 (1755680050),
received on Wednesday, 20 August 2025, 08:54:13 (1755680053)
Author identity: Vlad <vlad.muntoiu@gmail.com>
0b00a9501c0538eead6b6147aff34f9c7c9f9fe4
applets/soreaus-menu/__init__.py
@@ -164,7 +164,6 @@ class SoreausMenu(panorama_panel.Applet):
self.flowbox.set_homogeneous(True);
self.flowbox_item_focus_signal = self.flowbox.connect("selected-children-changed", self.on_flowbox_item_focus)
self.app_buttons = []
self.populate_menu_entries()
self.scrolled_window = Gtk.ScrolledWindow()
self.scrolled_window.set_size_request(-1, 350)
self.scrolled_window.set_child(self.flowbox)
@@ -188,15 +187,11 @@ class SoreausMenu(panorama_panel.Applet):
self.popover.connect("show", self.on_popover_popup)
self.button.set_popover(self.popover)
self.logout_ui = WayfireLogoutUI()
self.populate_menu_entries()
def on_search_changed(self, search_entry):
text = search_entry.get_text().lower()
self.flowbox.remove_all()
for button in self.app_buttons:
if (button.name and text in button.name.lower()) or \
(button.desc and text in button.desc.lower()) or \
(button.exe and text in button.exe.lower()):
self.flowbox.append(button)
self.populate_menu_entries()
def on_logout_button_clicked(self, button):
self.logout_ui.present()
@@ -218,8 +213,22 @@ class SoreausMenu(panorama_panel.Applet):
self.popover.popdown()
def populate_menu_entries(self):
app_infos = Gio.AppInfo.get_all() # Get all registered applications
app_infos = sorted(app_infos, key=lambda obj: obj.get_display_name().lower())
if self.search_entry.get_text():
desktop_names = Gio.DesktopAppInfo.search(self.search_entry.get_text())
app_infos = []
for sublist in desktop_names:
for desktop_name in sublist:
try:
app_infos.append(Gio.DesktopAppInfo.new(desktop_name))
except TypeError:
# The constructor may return a C NULL if the file is unable to be launched,
# so skip the app
pass
else:
app_infos = Gio.AppInfo.get_all()
app_infos.sort(key=lambda app_info: app_info.get_display_name())
for app_info in app_infos:
app_categories = app_info.get_categories()
config.yaml
@@ -7,6 +7,7 @@ panels:
can_capture_keyboard: false
applets:
left:
- SoreausMenu: {}
- AppMenu:
category_mappings:
Utility: