[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KGlobalAccel probs
From:       Ellis Whitehead <kde () ellisw ! net>
Date:       2001-10-29 18:47:23
[Download RAW message or body]

I just looked up a previous post from you:
    keys->insertItem (i18n("Next Track in Playlist"), "Next track", "F21", 0);
    keys->insertItem (i18n("Previous Track in Playlist"), "Prev", "F23", 0);
    keys->insertItem (i18n("Start playing"), "Play", "F20", 0);
    keys->insertItem (i18n("Pause playing"), "Pause", "F22", 0);
    
    keys->connectItem ("prev", this, SLOT(back ()));
    keys->connectItem ("next", this, SLOT(skip ()));
    keys->connectItem ("pause", this, SLOT(pause ()));
    keys->connectItem ("play", this, SLOT(play ()));

In this case, the problem is that the name is case-sensitive, so where you 
insert "Prev" and connect to "prev", the connection won't be made.  
connectItem() SHOULD indeed return a bool.  I'll be commiting a new 
KGlobalAccel class in mid-November that fixes that for KDE 3.0.

If fixing that doesn't work:
Run kdebugdialog and select 125 KAccel.  This will give you KGlobalAccel 
status output to let you know what's happening.  Send me the output then to 
look at.  Could you post your current connectItem() calls, too?

On Monday 29 October 2001 08:42 am, Marcos Dione wrote:
> On Friday 26 de October de 2001 10:19, Lubos Lunak wrote:
> >  What is this 'this' ? If it's not a QWidget derived class, it gets
> > converted to bool and this bool tells KGlobalAccel not to grab the keys.
> > I
>
> 	ok, it *was* a KMMSApplet, which comes from a KPAnelApplet, which comes
> from QFrame, which comes from QWidget directly. so, "this" was right... and
> I tried changing it to parent, where parent is defined in:
>
> KMMSApplet::KMMSApplet( const QString& configFile, Type type, int actions,
> 			QWidget *parent, const char *name )
>
> 	and it still doesn't work... any hint how to debug? I tried using
> appletproxy and some kdDebugs, but no answer... I also tried to don't pass
> anything to KGlobalAccel as in
>
>     keys= new KGlobalAccel ();
>     test= keys->insertItem (i18n("Next"), "Next track","F21", 0);
>     kdDebug () << "next= " << test << endl;
>
> 	next= true is printed when using appletproxy, but it sill don't respond to
> key presses! can anybody shade any light on this?
>
> 	I also noticed that connectItem is void, so I guess this would never fail,
> right?
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic