Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HowTo show tooltips from PYMP'D longer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
smlgbl
Guru
Guru


Joined: 10 Feb 2005
Posts: 305

PostPosted: Wed Nov 15, 2006 4:16 pm    Post subject: HowTo show tooltips from PYMP'D longer Reply with quote

Hi,
I really like the setup of pymp'd, which is a client for mpd with a music library in the like of winamp. or so. It might still need some improvement, but what doesn't?
There's a plugin that shows a trayicon and when you hover over it with your mouse, then it displays the currently playing song in a "tooltip". Also, if enabled, it shows the title on a songchange. But the time that the tooltip on songchange was shown was a bit too short in my opinion.
All you have to do to prolong the time this is displayed, is change the following number (here the 5000) in /usr/share/pympd/plugins/trayicon.py (Good, it's python!):
Code:
def display(self, widget):
        if self._show_timeout_id != -1:
            return

        self._show_timeout_id = gobject.timeout_add(500, self._real_display, widget)
        gobject.timeout_add(5000, self.hide)

It was at 1500 in the beginning, but I like it better with 5000 (milli-seconds, i presume). This way, when I see it pop-up, I still have time to read it. The other number in the line above is the time until the tooltip is shown. There is also another number in that file, but that is the time until the tooltip is shown whenever you hover over the trayicon.
Hope this is interesting for somebody.
_________________
samuel.
'Do not let one girding on boast about himself like one unfastening'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum