

You are welcome to participate at gpe and gpe-conf.

-> How serial device setup works

There is a serial device config directory /etc/gpe/gpe-conf-serial that contains serial config scripts 
and data files. There is one script and one config file for every item (e.g. getty, gpsd, keyboard...).
The construction of these is simple:

- The script has three parameters: "enable", "disable", "reconfigure"
  The first two parameters are used to enable/disable the configured software/device using the serial
  port. The "reconfigure" parameter is used to configure the software/device with the data given by
  the configuration data file.
- Naming of the file should be done in this way: <item-name>-config.sh and <item-name>-data.
- The data file contains simple variable settings to be included by the config script.
- The GUI layout for these options is set be special commets:
  To start a new section you would use
  
  ##<section>
  
  The displayed text and kind of setting is given in this way
  
  #<title><bool>|<int:min-max|v1,v2,v3...>|<char>|<file>
  
  e.g. 
  #<My Setting><int:1-20>
  MY_SETTING=15
  
  All changes that are made by calling this script should be permanent and should apply instantly.

  These values should be set by every config file: 
  
  ITEMNAME : Name to be displayed in GUI.
  TITLETEXT : Describing text to be displayed above configuration widgets.
  ENABLED : Guess..
  EXCLUSIVE : 


-> Here are some instruction to add a new module (Applet) to gpe conf.

* An applet should provide at least one function:


  GtkWidget *AppletName_Build_Objects();

	In this you build all you interface, declare Callbacks, etc
	You must return the (GtkWidget * )containing the interface.
	The Widget is then integrated automaticaly in the gpe-conf interface

* An applet may provide these functions:

  void AppletName_Save()

	This callback is called when the Save button is clicked.
	This button should make your applet *Save* the changes on the "Harddisk"
	This is not an apply button, changes should been made on the fly (they take effect immediately).

  void AppletName_Restore()

	This callback is called when the Cancel button is clicked.
	It should restore the saved changes, to the widget.

  void AppletName_Free_Objects()
	Used for free ing the object you may have reserved.
	Dont release the widgets childs of the Widget you return in Build_Objects, they are freed by the core

If you do not provide these functions, the button associated is just hidden.

* Declaring the Applet
  
  You have to declare the applet either in:

  The Makefile:
	Add a line : MEMBERS += yourfile
	note that there is no ".c"

  The main.c:
	add your header: #include "appletname.h" 
	add the line:	
    { &Build_Objects, &Free_Objects, &Save, &Restore , "treeTitle" ,"appletname","Applet Title"},

       -Build_Objects, &Free_Objects, &Save, &Restore are the callback described on the top.
	if you dont provide it, replace by Unimplemented_*

      -treeTitle is the Title drawn in the gtk_tree, when gpe-conf is called in multi applet mode.
	
      -appletname is the name of the applet, used to call the applet in alone mode:
	"gpe-conf appletname"
	it is also used to define the icon of your applet

      -Applet Title is the Title of your applet
	It is used as the label of the gtk_frame parent of your applet.
	It is also used as the title of you applet in the menu ( mmenu or gpe-appmgr )
	As it can appear in the All panel of the Launcher, use an explicit name   

   Icons:
	You have to provide a 48x48 icon in the pixmap dir.
	his name is: gpe-config-appletname.png 

Note that the menu file, is autogenerated by buidmenu.pl the icon automaticaly are copied in dist/usr/share/pixmaps
