Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes from stable #2337

Merged
merged 7 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DIST_DOCS = \
EXTRA_DIST = \
${DIST_DOCS} \
meson.build \
meson_options.txt \
po/meson.build

MAINTAINERCLEANFILES = \
Expand Down
4 changes: 2 additions & 2 deletions blueman/main/indicators/StatusNotifierItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ def on_watcher_appeared(*args: Any) -> None:
"RegisterStatusNotifierItem", GLib.Variant("(s)", ("/org/blueman/sni",)),
None, Gio.DBusCallFlags.NONE, -1)
watcher_expected = True
except GLib.Error:
watcher_expected = False
except GLib.Error as e:
watcher_expected = not e.message.startswith("org.freedesktop.DBusError.ServiceUnknown")
raise IndicatorNotAvailable

def set_icon(self, icon_name: str) -> None:
Expand Down
3 changes: 3 additions & 0 deletions blueman/plugins/applet/Menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def add(self, owner: AppletPlugin, priority: Union[int, Tuple[int, int]], text:
if isinstance(priority, int):
priority = (priority, 0)

assert priority[0] < 256
assert priority[1] < 256

item = MenuItem(self, owner, priority, text, markup, icon_name, tooltip, callback, submenu_function, visible,
sensitive)
self.__menuitems[item.priority] = item
Expand Down
3 changes: 2 additions & 1 deletion blueman/plugins/applet/PulseAudioProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def _generate_profiles_menu(info: "CardInfo") -> List["SubmenuItemDict"]:
return items

info = self._devices[device['Address']]
menu = self._menu.add(self, (42, info["index"]), _("Audio Profiles for %s") % device.display_name,
idx = max((item.priority[1] for item in self._device_menus.values()), default=-1) + 1
menu = self._menu.add(self, (42, idx), _("Audio Profiles for %s") % device.display_name,
icon_name="audio-card-symbolic",
submenu_function=lambda: _generate_profiles_menu(info))
self._device_menus[device['Address']] = menu
Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/RecentConns.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _rebuild_menu(self) -> None:
menu: "Menu" = self.parent.Plugins.Menu
self._mitems: List[MenuItem] = []
menu.unregister(self)
menu.add(self, 52, text=_("Recent _Connections"), icon_name="document-open-recent-symbolic",
menu.add(self, 52, text=_("Reconnect to…"), icon_name="document-open-recent-symbolic",
sensitive=False, callback=lambda: None)
for (idx, item) in enumerate(self.__menuitems):
self._mitems.append(menu.add(self, (53, idx), **item))
Expand Down
1 change: 1 addition & 0 deletions data/ui/manager-main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<object class="GtkApplicationWindow" id="manager_window">
<property name="can-focus">False</property>
<property name="icon-name">blueman</property>
<property name="title" translatable="yes">Bluetooth Devices</property>
<child>
<!-- n-columns=1 n-rows=5 -->
<object class="GtkGrid" id="grid">
Expand Down
Empty file removed po/ChangeLog
Empty file.
4 changes: 3 additions & 1 deletion test/main/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ SUBDIRS = \

EXTRA_DIST = \
__init__.py \
test_dns_server_provider.py \
test_dbus_proxies.py \
test_imports.py \
test_dbus_proxies.py \
test_netconf.py \
test_pulseaudio_utils.py