支持get_tray_window

This commit is contained in:
2023-11-17 22:19:29 +08:00
parent 829a7839eb
commit ccc53deceb
2 changed files with 8 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell,python3
Section: utils
Priority: extra
Recommends: spark-dwine-helper-settings
@@ -85,7 +85,7 @@ Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell,python3
Section: utils
Priority: extra
Recommends: spark-dwine-helper-settings

View File

@@ -1,25 +1,19 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# vim: set ts=4 sw=4 fileencoding=utf-8:
# Luomio <nohappiness@gmail.com>
# Filename: dde-first-run.py
# Create Date: 27-03, 13
def get_tray_window():
try:
import gobject
from dbus import glib
import dbus
except ImportError:
return False
gobject.threads_init()
glib.init_threads()
def get_tray_window():
bus = dbus.SessionBus()
traymanager = bus.get_object("com.deepin.dde.TrayManager", "/com/deepin/dde/TrayManager")
windows = traymanager.Get("com.deepin.dde.TrayManager","TrayIcons")
traymanager_iface = dbus.Interface(traymanager, dbus_interface='org.freedesktop.DBus.Properties')
windows = traymanager_iface.Get("com.deepin.dde.TrayManager","TrayIcons")
str="window_id:"
for i in xrange(len(windows)):
for i in range(len(windows)):
str += '{:#x} '.format(windows[i])
print(str)