This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gi.repository import Gio, GLib, GObject | |
| class MyProxy(Gio.DBusProxy): | |
| __gsignals__ = {str('property-changed'): (GObject.SignalFlags.NO_HOOKS, None, | |
| (GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT, GObject.TYPE_PYOBJECT)) | |
| } | |
| def __init__(self, interface_name, obj_path, *args, **kwargs): | |
| super(MyProxy, self).__init__( | |
| g_name="org.bluez", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dbus | |
| import dbus.service | |
| from dbus.mainloop.glib import DBusGMainLoop | |
| import time | |
| from gi.repository import GLib | |
| DBusGMainLoop(set_as_default=True) | |
| class MyTestClass(dbus.service.Object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/blueman/plugins/mechanism/Network.py b/blueman/plugins/mechanism/Network.py | |
| index ab7465f..317a3f6 100644 | |
| --- a/blueman/plugins/mechanism/Network.py | |
| +++ b/blueman/plugins/mechanism/Network.py | |
| @@ -53,6 +53,7 @@ class Network(MechanismPlugin): | |
| @dbus.service.method('org.blueman.Mechanism', in_signature="ayays", out_signature="", sender_keyword="caller", | |
| byte_arrays=True) | |
| def EnableNetwork(self, ip_address, netmask, dhcp_handler, caller): | |
| + self.confirm_authorization(caller, "org.blueman.network.setup") | |
| nc = NetConf.get_default() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/blueman/bluez/BlueZInterface.py b/blueman/bluez/BlueZInterface.py | |
| index 366cf17..3bd7be1 100644 | |
| --- a/blueman/bluez/BlueZInterface.py | |
| +++ b/blueman/bluez/BlueZInterface.py | |
| @@ -12,17 +12,19 @@ class BlueZInterface(object): | |
| @staticmethod | |
| def get_interface_version(): | |
| - if not BlueZInterface.interface_version: | |
| - obj = dbus.SystemBus().get_object('org.bluez', '/') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gi.repository import Gio, GLib, GObject | |
| class TestProxy(Gio.DBusProxy): | |
| __bus = Gio.bus_get_sync(Gio.BusType.SYSTEM) | |
| def __init__(self, name, obj_path, interface): | |
| super(TestProxy, self).__init__( | |
| g_connection=self.__bus, | |
| g_flags=Gio.DBusProxyFlags.NONE, | |
| g_interface_info=None, | |
| g_name=name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gi.repository import Gio, GLib, GObject | |
| class BaseProxy(Gio.DBusProxy): | |
| __gsignals__ = { | |
| str('property-changed'): (GObject.SignalFlags.NO_HOOKS, | |
| None, | |
| (GObject.TYPE_PYOBJECT, | |
| GObject.TYPE_PYOBJECT, | |
| GObject.TYPE_PYOBJECT)) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gi.repository import Gio, GLib, GObject | |
| proxy = Gio.DBusProxy.new_sync( | |
| Gio.bus_get_sync(Gio.BusType.SYSTEM), | |
| Gio.DBusProxyFlags.NONE, | |
| None, | |
| 'org.bluez', | |
| '/org/bluez/hci0', | |
| 'org.freedesktop.DBus.Properties') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import blueman.bluez as Bluez | |
| import os | |
| from gi.repository import Gtk | |
| def on_property_changed(adapter, name, value, path): | |
| print(path) | |
| print(name) | |
| print(value) | |
| def on_adapter_added(manager, adapter_path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| from gi.repository import Gtk, GLib, Gdk | |
| import cairo | |
| class FadeBoxWindow(Gtk.Window): | |
| def __init__(self): | |
| super(FadeBoxWindow, self).__init__() | |
| self.init_ui() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| from blueman.gui.Notification import Notification | |
| from blueman.Functions import get_icon | |
| from gi.repository import Gdk, Gtk | |
| class StatusIconMock: | |
| def get_geometry(self): | |
| screen = Gdk.Screen.get_default() | |
| rect = Gdk.Rectangle() |