-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1735: try to match the notification to the application tray that sen…
…t it git-svn-id: https://xpra.org/svn/Xpra/trunk@17997 3bb7dfac-3a0b-4e04-842a-767bc560f471
- Loading branch information
Showing
8 changed files
with
47 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This file is part of Xpra. | ||
# Copyright (C) 2010 Nathaniel Smith <[email protected]> | ||
# Copyright (C) 2011-2017 Antoine Martin <[email protected]> | ||
# Copyright (C) 2011-2018 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
|
@@ -32,6 +32,9 @@ def __init__(self, _client, app_id, menu, tooltip, icon_filename, size_changed_c | |
self.tray_event_locations = deque(maxlen=512) | ||
self.default_icon_extension = "png" | ||
|
||
def __repr__(self): | ||
return "Tray(%i:%s)" % (self.app_id, self.tooltip) | ||
|
||
def cleanup(self): | ||
if self.tray_widget: | ||
self.hide() | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python | ||
# This file is part of Xpra. | ||
# Copyright (C) 2011-2017 Antoine Martin <[email protected]> | ||
# Copyright (C) 2011-2018 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
|
@@ -317,18 +317,16 @@ def make_nid(self, flags): | |
sprintf(byref(nid,NOTIFYICONDATA.szTip.offset), title) | ||
nid.dwState = 0 | ||
nid.dwStateMask = 0 | ||
nid.guidItem = XPRA_GUID | ||
nid.uID = self.app_id | ||
flags |= NIF_GUID | ||
#balloon notification bits: | ||
#szInfo | ||
#uTimeout | ||
#szInfoTitle | ||
#dwInfoFlags | ||
#hBalloonIcon | ||
#flags |= NIF_SHOWTIP | ||
if self.app_id==XPRA_APP_ID: | ||
nid.guidItem = XPRA_GUID | ||
flags |= NIF_GUID | ||
else: | ||
nid.uID = self.app_id | ||
nid.uVersion = 4 | ||
nid.uFlags = flags | ||
log("make_nid(..)=%s tooltip='%s', app_id=%i, actual flags=%s", nid, nonl(title), self.app_id, csv([v for k,v in NIF_FLAGS.items() if k&flags])) | ||
|
@@ -541,7 +539,7 @@ def command_callback(hwnd, cid): | |
icon = None | ||
else: | ||
pass | ||
notify(hwnd, "hello", "world", timeout=1000, icon=icon) | ||
notify(hwnd, 0, "hello", "world", timeout=1000, icon=icon) | ||
elif cid == 1025: | ||
print("Goodbye") | ||
DestroyWindow(hwnd) | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python | ||
# This file is part of Xpra. | ||
# Copyright (C) 2011-2017 Antoine Martin <[email protected]> | ||
# Copyright (C) 2011-2018 Antoine Martin <[email protected]> | ||
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any | ||
# later version. See the file COPYING for details. | ||
|
||
|
@@ -50,8 +50,8 @@ def get_size(self): | |
|
||
def getHWND(self): | ||
if self.tray_widget is None: | ||
return None | ||
return self.tray_widget.hwnd | ||
return None | ||
return self.tray_widget.hwnd | ||
|
||
def cleanup(self): | ||
log("Win32Tray.cleanup() tray_widget=%s", self.tray_widget) | ||
|