TOPIC

A very simple and incomplete introduction to Galeon code architecture.
Galeon is written in C but it's widely using GObject. We use C++ for the
mozilla interaction code.

LIBRARIES

Galeon use many of the libraries distributed with Gnome 2.

gtk+-2.0		Provide the native widgets galeon user interface is built with.
libxml-2.0		Used mainly to store data (history, mime database ...)
libglade-2.0		Nearly all galeon dialogs are designed using glade. The library
			take care of reading the xml description produced by the editor
			and build the interface using gtk.
gnome-vfs-2.0		Access to Gnome mime database and urls manipulation.
gconf-2.0		Store user preferences.
libbonoboui-2.0		Main window and bookmarks editor toolbar/menu

It uses also the mozilla embedding libraries to provide
web pages rendering and networking services.

AUTOMATION

Galeon is activated by a Corba interface that communicate with already
existing processes to open new windows/tabs, add bookmarks ...
Currently no more than one process is allowed to run at the same time.
See galeon/idl/GaleonAutomation.idl.

USER INTERFACE

The main window is built using bonoboui. Xml descriptions are stored
in galeon/ui/galeon-ui.xml.in.

GaleonWindow (see galeon/src/galeon-window.c):
-----------------------------------
- Construct the interface elements contained in the main window: toolbar,
  menubar, statusbar, sidebar, location.
- Construct the popups factory (browser popups)
- Update the interfaces elements when requested by the active GaleonTab
- Fullscreen
- Chromes handling and persisting
- Tabs (add, remove, jump to)

Toolbar (galeon/src/toolbar.c)
Statusbar (galeon/src/statusbar.c)

GaleonTab
---------

Keeps the information related to a single tab (location, status, parent window,
size...) and send requests to update the interface to the main window.
Ex. When a tab stop to load a page it will send GaleonWindow a request to
update the spinner status. GaleonWindow will iterate through the list of
tabs, get their status and if no one of them will be loading a page 
the spinner will be stopped.

GaleonSpinner
------------

This widget is based on nautilus bonobo component but it doesnt use
bonobo. It iterates through a set of GtkImages. (There is no support
for mng animations in gtk and we wanted to keep compatibility with
nautilus spinners).
It's possible to start/stop it, set it to small mode to deal with
toolbars without text. You can even get a list of the available
spinners (both nautilus and galeon spinners). The path specified
by a gconf pref will be used to retrieve the images. Changes to the pref
are applied on the fly.

PrefsDialog
-----------

Implements the prefs dialog pages shell and provide the ability to show
a specific page. Each page is described by a glade xml file and implemented 
as a subclass of GaleonDialog. (Ex. galeon/src/appearance-prefs.c) 
This means adding a pref is just matter of editing the interface with glade 
and adding an element to a struct like:

static const
GaleonDialogProperty network_properties [] =
{
        { PROXYTYPE_PROP, "proxytype_radiobutton", CONF_NETWORK_PROXY_MODE, PT_AUTOAPPLY, proxy_sg },
}

PROXYTYPE_PROP: integer identifier
"proxytype_radiobutton": glade control name
CONF_NETWORK_PROXY_MODE: pref path
proxy_sg: sensitivity group (optional)

GaleonShell
-----------

It's a singleton, accessible through a global variable (galeon_shell),
It makes some global services available: session manager, bookmarks set,
favicons cache.
The galeon_shell_new_tab api should be used when opening new windows/tabs instead
of using GaleonWindow and GaleonTab directly.
Use galeon_shell_get_active_window when you need to take an action on a window but it's
not immediately obvious which one to use. Ex. opening a new tab from the command line.
Current implementation just get the first window from the list but we could make it use
the last focused window.


