[wxpython-users] Toasterbox patch
by Stani other posts by this author
May 28 2009 7:29PM messages near this date
Re: [wxpython-users] problem simulating button press
|
[wxpython-users] Re: Toasterbox patch
Hi,
I'll use Toasterbox in Phatch for notifications on Windows and Mac. On
Linux I prefer to use python-notify which interacts nicely with the
new notification system of Ubuntu. Unfortunately the method
"SetPopupPositionByInt" didn't seem to work for me. Maybe I understand
the api wrongly, but I made this patch to force it do what I want
(appear bottom right):
=== modified file 'phatch/other/ToasterBox.py'
--- phatch/other/ToasterBox.py 2009-05-28 16:14:00 +0000
+++ phatch/other/ToasterBox.py 2009-05-29 02:14:18 +0000
@@ -151,22 +151,22 @@
# top left
if pos == 0:
- popupposition = wx.Point(0,0)
+ self._popupposition = wx.Point(0,0)
# top right
elif pos == 1:
- popupposition = wx.Point(wx.GetDisplaySize().GetWidth() -
+ self._popupposition = wx.Point(self._bottomright.x -
self._popupsize[0], 0)
# bottom left
elif pos == 2:
- popupposition = wxPoint(0, wx.GetDisplaySize().GetHeight() -
+ self._popupposition = wxPoint(0, self._bottomright.y -
self._popupsize[1])
# bottom right
elif pos == 3:
- popupposition = wx.Point(self._bottomright.x - self._popupsize[0],
+ self._popupposition = wx.Point(self._bottomright.x -
self._popupsize[0],
self._bottomright.y - self._popupsize[1])
- self._bottomright = wx.Point(popupposition.x + self._popupsize[0],
- popupposition.y + self._popupsize[1])
+ self._bottomright = wx.Point(self._popupposition.x + self._popupsize[0],
+ self._popupposition.y + self._popupsize[1])
def SetPopupBackgroundColor(self, colour=None):
Andrea, could you also please include the license
(wxpython/wxwidgets?) in your source file? Otherwise it might be hard
to get it accepted in Debian/Ubuntu.
Best regards,
Stani
--
Phatch Photo Batch Processor - http://photobatch.stani.be
SPE Python IDE - http://pythonide.stani.be
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Stani
Stani
Andrea Gavana
Stani
Andrea Gavana
Stani
|