Trinity Control Center Modules
Prev
Next

Chapter 6. Trinity Control Center Modules

PyTDE Extensions can also help create modules for the Trinity Control Center. C++ glue code is needed when writing in module in Python. Fortunately PyTDE Extensions can generate this glue for you automatically.

The best way to start learning about creating modules is to read the TDEConfig Module HOWTO. It is written for C++, but the concepts are the same for Python.

In your setup.py file you can specify the list of kcontrol modules that need to be installed.

    kcontrol_modules = [ ('src/kcontrol_module.desktop','kcontrol_module.py')] )
This is just a list of tuples. The first item is name of the .desktop file that you've made for your module. The second item is the name of the Python program to run when the user views the module in kcontrol. This program is expected to be in the application's data files directory.

The KControl Module Guidelines provides useful information about how to design a KControl module that fits into the rest of TDE.

Tip

PyTDE Extensions typically installs the .desktop file into the /usr/share/applications/tde/ directory. This is normally enough to make the module appear in the Trinity Control Center. But for some distributions, most notably Mandriva but probably others too, this isn't enough. Mandriva in particular uses the Debian menu system for managing the TDE menu and also for KControl modules. In order to get a module to appear in the kcontrol it is best to createa a .menu file and copy it into /usr/lib/menu, and then use update-menus as root to update all of the menus and the list of kcontrol modules.

Note

Right now there is no support for "module-testing" or "X-TDE-Test-Module=true" features in .desktop files.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team