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

List:       kde-core-devel
Subject:    Kicker extension
From:       Michael Goffioul <goffioul () imec ! be>
Date:       2001-08-22 13:53:14
[Download RAW message or body]

Following an idea I had, I implemented an dynamic extension mechanism to
kicker. Basically, this mechanism allows to add menu entries to the K-menu
using dynamically loaded libraries (kind of plugins). I applied it to the
integration of kdeprint into kicker and you can see the result here:
http://users.swing.be/kdeprint/kicker_ext.png (note: when you select a
printer, the job viewer is started with that printer).

Technically:
- defined a PanelXMenu class that inherits PanelMenu
- added 2 virtual functions "pixmap()" and "title()" that are used
  when inserting the entry into the K-menu
- modified k_mnu.cpp to read the "Extensions" key from the config
  file (in "menus" group), to know which extensions need to be loaded,
  then load the extensions and add the menu entry
- you can also think about associating those dynamic menus with
  PanelPopupButton to add specialized buttons to the panel (not done
  however).

This allows to build tools like "quickbrowser" except that it is dynamically
loaded.

Now come the questions:
- do you find it useful? (I do as it gives kicker greater flexibility, and
  you can also put some code into libraires, reducing kicker's size)
- what should I do with it? Now, everything is in kicker directory, but I
  guess the base class should be moved to kdeui, which would implies some
  changes in the code.

Comments are welcome.
Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------

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

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