Bug in package gmail-notify

Guillaume Brunerie guillaume.brunerie at gmail.com
Fri May 23 23:14:00 UTC 2008


Hi,
I'm french, sorry for my bad english.
The package gmail-notify has a bug (not corrected in Hardy with proposals
repositories activated) : the popup isn't always at the good position and
sometimes moves up much higher than it should.
Looking at the source, it is just due to the function gtk.Window.get_size
which doesn't always gives the actual size of the window (see
http://www.pygtk.org/docs/pygtk/class-gtkwindow.html#method-gtkwindow--get-size
)
I corrected the code and it seems to work fine for me now.

I join the corrected code, and, if you prefer, there is the diff between the
two versions (with the 1.6.1-3ubuntu2.1 version) :

     $ diff notifier.py.old notifier.py

141,142c141,144
<         self.window.resize(180,1)
<         self.width, self.height = self.window.get_size()
---
>         self.window.resize(180,1)
>                 self.sizex = 180
>                 self.sizey = 1
>         self.width, self.height = self.sizex, self.sizey
292a295
>                 self.sizey = 1
300d302
<         currentsize=self.window.get_size()
303d304
<         sizey=currentsize[1]
305c306
<             if sizey<2:
---
>             if self.sizey<2:
309a311
>                                 self.sizey = 1
315c317
<                 self.window.resize(180,sizey-2)
---
>                 self.window.resize(180,self.sizey-2)
316a319
>                                 self.sizey-=2
318c321
<             if sizey<140:
---
>             if self.sizey<140:
320c323
<                 self.window.resize(180,sizey+2)
---
>                 self.window.resize(180,self.sizey+2)
321a325
>                                 self.sizey+=2
324d327
<                 sizex=currentsize[0]

I send this correction here because `apt-cache show gmail-notify ' gave me
this address.
I hope this can be useful to people, and possibly even be included in
repositories.

Cordially

Guillaume Brunerie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080524/09bae06a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notifier.py
Type: text/x-python
Size: 13263 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080524/09bae06a/attachment.py>


More information about the ubuntu-users mailing list