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
|
Architecture: all
|
||||||
Maintainer: shenmo <shenmo@spark-app.store>
|
Maintainer: shenmo <shenmo@spark-app.store>
|
||||||
Installed-Size: $SIZE
|
Installed-Size: $SIZE
|
||||||
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
|
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell,python3
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Recommends: spark-dwine-helper-settings
|
Recommends: spark-dwine-helper-settings
|
||||||
@@ -85,7 +85,7 @@ Version: $version
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: shenmo <shenmo@spark-app.store>
|
Maintainer: shenmo <shenmo@spark-app.store>
|
||||||
Installed-Size: $SIZE
|
Installed-Size: $SIZE
|
||||||
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
|
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell,python3
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Recommends: spark-dwine-helper-settings
|
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:
|
# vim: set ts=4 sw=4 fileencoding=utf-8:
|
||||||
# Luomio <nohappiness@gmail.com>
|
# Luomio <nohappiness@gmail.com>
|
||||||
# Filename: dde-first-run.py
|
# Filename: dde-first-run.py
|
||||||
# Create Date: 27-03, 13
|
# Create Date: 27-03, 13
|
||||||
|
|
||||||
def get_tray_window():
|
import dbus
|
||||||
try:
|
|
||||||
import gobject
|
|
||||||
from dbus import glib
|
|
||||||
import dbus
|
|
||||||
except ImportError:
|
|
||||||
return False
|
|
||||||
|
|
||||||
gobject.threads_init()
|
def get_tray_window():
|
||||||
glib.init_threads()
|
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
traymanager = bus.get_object("com.deepin.dde.TrayManager", "/com/deepin/dde/TrayManager")
|
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:"
|
str="window_id:"
|
||||||
for i in xrange(len(windows)):
|
for i in range(len(windows)):
|
||||||
str += '{:#x} '.format(windows[i])
|
str += '{:#x} '.format(windows[i])
|
||||||
|
|
||||||
print(str)
|
print(str)
|
||||||
|
|||||||
Reference in New Issue
Block a user