'Next wallpaper' functionality for image plugin?

Yuen Hoe Lim yuenhoe86 at gmail.com
Sat Oct 10 20:13:05 CEST 2009


Thought I'd post a quick question here since I'm not making much
headway with pinning down exactly where I should be injecting code to
add a contextual menu item. I've been putting kDebug() statements into
places like contextMenuEvent() in Plasma::Containment and somehow it's
looking like the default Containment method implementations never get
called when I right click the desktop (the debug messages don't show
up - and they do when I right click the, for example, panel instead).
The desktop is just a containment, correct? So it looks to me like
whatever exact containment (subclass?) the desktop is using is
overriding the default containment context menu methods.

Is this the case? If so, I can't seem to find what or where this
subclass is. If not, well, might someone know what I'm doing/figuring
wrong? :)

Thanks.

On 9/29/09, Chani <chanika at gmail.com> wrote:
> On September 26, 2009 11:03:37 Aaron J. Seigo wrote:
>> On September 26, 2009, Yuen Hoe Lim wrote:
>> > the wallpaper plugin doesn't have control over the right-click-desktop
>> > context menu, and it will be inappropriate to hack the functionality
>> > into the core desktop code.
>>
>> that's correct; but we already have a way to add context menu items from
>> applets and what not. the containment is in complete control here, and the
>> containment is also what knows about the wallpaper. so it could ask the
>> wallpaper if it has anything to add actions to add to the context menu.
>>  should be easy to add some mechanism to the Wallpaper plugin API for
>> this.
>>
>
> heck yeah. add a contextualActions function and have the default
> implementation of Containment::contextualActions call it if wallpaper
> exists.
>
> con: custom desktop containments might break that unintentionally
> pro: custom desktop containments can intentionally stop it if they want to.
>
> if we don't think the containment plugin should be allowed to block
> wallpaper
> actions then just add a separate function in Containment,
> wallpaperContextualActions, and have the contextmenu plugin draw from that
> too. or if ContainmentActions plugins can access the containment's wallpaper
> object directly we don't need a function to forward the data. :)
>
>
> --
> This message brought to you by eevil bananas and the number 3.
> www.chani3.com
>


-- 
----
Jason "moofang" Lim Yuen Hoe
http://yuenhoe.co.cc/


More information about the Plasma-devel mailing list