mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2025-12-18 21:11:39 +08:00
支持get_tray_window
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user