From miguel@nuclecu.unam.mx  Thu May 11 19:23:31 2000
Received: (qmail 26636 invoked from network); 16 Aug 1997 03:21:47 -0000
Received: from athena.nuclecu.unam.mx (132.248.29.9)
  by mail2.redhat.com with SMTP; 16 Aug 1997 03:21:47 -0000
Received: (from miguel@localhost)
	by athena.nuclecu.unam.mx (8.8.5/8.8.5) id WAA32598;
	Fri, 15 Aug 1997 22:19:34 -0500
Date: Fri, 15 Aug 1997 22:19:34 -0500
Message-Id: <199708160319.WAA32598@athena.nuclecu.unam.mx>
From: Miguel de Icaza < miguel@nuclecu.unam.mx>
To: gtk-list@redhat.com, kde@fiwi02.wiwi.uni-tuebingen.de, guile@cygnus.com
Reply-To: gnome@nuclecu.unam.mx
Subject: The GNOME Desktop project.


  		       The GNOME Desktop project
   	        (GNU Network Object Model Environment)
		http://bananoid.nuclecu.unam.mx/gnome


* Goals

We want to develop a free and complete set of user friendly
applications and desktop tools, similar to CDE and KDE but based
entirely on free software:

	- We want the applications to have a common look and feel, and
	  to share as many visual elements and UI concepts as possible.

	- We want to use the GTK toolkit as our toolkit for writing
	  the applications.  

	  The GTK toolkit (http://www.cs.umn.edu/~amundson/gtk and
	  http://levien.com/~slow/gtk/) is the toolkit written by
	  Peter Mattis, Spencer Kimball, Josh MacDonald, for the GNU
	  Image Manipulation Program (GIMP) project
	  (http://scam.xcf.berkeley.edu/~gimp).
	
	- We want to encourage people to contribute code and to test
	  the code, so that the software will compile out of the box
	  by using GNU's tools for automatic source configuration.

	- We plan to export the GTK API through a procedural database
	  (which will in fact be an object database) to allow easy
	  integration with scripting languages and modules written in
	  other languages.

        - We plan to use GTK/Scheme bindings for coding small
	  utilities and applications.  When these bindings are more
	  mature, it should be possible to write complete applications
	  in Scheme.	

* Some common questions regarding the project

Why don't you just use/contribute to KDE?

    KDE is a nice project; they have good hackers working on it and
    they have done a very good job.  Unfortunately, they selected the
    non-free Qt toolkit as the foundation for the project, which poses
    legal problems for those desiring to redistribute the software.

Why not write a free Qt replacement instead?

    The KDE project -in its current form- has about 89,000 lines of
    code, on the other hand, the source code for the Qt library has
    about 91,000 lines.

    Qt also forces the programmer to write his code in C++ or Python.
    Gtk can be used in C, Scheme, Python, C++, Objective-C and Perl. 

    Also, we believe that KDE has some design problems (they have lots
    of good ideas though) that we plan to fix.

Under what license does the GNOME fall?

    As most GNU software, GNOME application code will be released
    under the GNU GPL.  GNOME specific libraries will be released
    under the terms of the GNU LGPL.

Will you rewrite everything from scratch?

    No.  We will try to reuse the existing code for GNU programs as
    much as possible, while adhering to the guidelines of the project.
    Putting nice and consistent user interfaces over all-time
    favorites will be one of the projects.

    We plan on reusing code from KDE as well.

* Joining the GNOME mailing list:

We have created a mailing list for people interested in discussing
the development of this project.  To subscribe, use this command:

   echo 'subscribe gnome' | mail majordomo@nuclecu.unam.mx

From federico@nuclecu.unam.mx
Received: (qmail 8555 invoked from network); 27 Oct 1997 20:47:51 -0000
Received: from sphinx.nuclecu.unam.mx (132.248.29.8)
  by mail2.redhat.com with SMTP; 27 Oct 1997 20:47:51 -0000
Received: (from federico@localhost) by sphinx.nuclecu.unam.mx 
(8.6.12/8.6.11) id OAA14073; Mon, 27 Oct 1997 14:47:37 -0600
Date: Mon, 27 Oct 1997 14:47:37 -0600
Message-Id: <199710272047.OAA14073@sphinx.nuclecu.unam.mx>
From: Federico Mena <federico@nuclecu.unam.mx>
To: gtk-list@redhat.com
Subject: Problem in the Gnome panel
Reply-to: federico@nuclecu.unam.mx

Hello, all

I am having some problems with widget allocations in the Gnome panel.
The way the panel works is more or less like this:

	- The panel's main window and GtkFixed containers are created.

	- Applet modules are intialized.

	- The panel reads the user configuration file.  From there it
	  decides which applets to launch (i.e. create instances of).

	- When an applet is asked to create an instance of itself, the
	  applet module creates the applet's widget and asks the panel
	  to add that widget as an applet.

	- The panel is responsible for positioning the applet in a
	  place where it will not overlap other applets.

	- When all initialization is done, gtk_main() is called.

I am using a simple first-fit algorithm to find a suitable position
for the applets.  I need to query the position of the already-inserted
applets (by looking at their allocation field).  The problem is that
the applets may not have an allocation at the time I need to look at
it.

This is the code that registers an applet on the panel.  I would be
grateful if anyone has any suggestions about how to query the applets
about their position/size.

  Quartic

----------------------------------------------------------------------
static void
sort_applet_by_pos(GtkWidget *applet, gpointer data)
{
	GList     **list;
	GtkWidget *w;
	int        pos;

	list = data;
	pos  = 0;

	while (*list) {
		w = (*list)->data;
		
		if (applet->allocation.x < w->allocation.x)
			break;

		pos++;
		*list = (*list)->next;
	}

	*list = g_list_insert(*list, applet, pos);
}

static void
fix_applet_position(GtkWidget *applet, int *xpos, int *ypos)
{
	GList         *applets;
	GtkWidget     *w;
	GtkRequisition requisition;
	int            req_width;
	int            found;
	int            x;
	int            size;
	int            largest;
	int            x_for_largest;
	
	/* FIXME!!!  This is not working at all --- the widgets have
         * no allocation when I need them to :-(
	 */

	/* FIXME: This routine currently only handles the horizontal case of the panel */
	
	if ((*xpos != PANEL_UNKNOWN_APPLET_POSITION) &&
	    (*ypos != PANEL_UNKNOWN_APPLET_POSITION))
		return;

	*ypos = 0;

	applets = NULL;
	gtk_container_foreach(GTK_CONTAINER(the_panel->fixed),
			      sort_applet_by_pos,
			      &applets);

	gtk_widget_size_request(applet, &requisition);
	req_width = requisition.width;

	/* Find first fit */

	found         = FALSE;
	x             = 0;
	largest       = 0;
	x_for_largest = 0;

	for (; applets; applets = applets->next) {
		w = applets->data;

		size = w->allocation.x - x;

		if (size >= req_width) {
			found = TRUE;
			break;
		}

		if (size > largest) {
			largest = size;
			x_for_largest = x;
		}

		x = w->allocation.x + w->allocation.width;
	}

	if (found)
		*xpos = x;
	else {
		size = gdk_screen_width() - x;

		if (size >= req_width)
			*xpos = x;
		else
			*xpos = x_for_largest;
	}

	g_list_free(applets);
}


static void
register_toy(GtkWidget *applet, char *id, int xpos, int ypos, long flags)
{
	GtkWidget *eventbox;
	
	g_assert(applet != NULL);
	g_assert(id != NULL);

	/* We wrap the applet in a GtkEventBox so that we can capture events over it */

	eventbox = gtk_event_box_new();
	gtk_container_add(GTK_CONTAINER(eventbox), applet);

	gtk_widget_set_events(eventbox, gtk_widget_get_events(eventbox) | 
	APPLET_EVENT_MASK);
	gtk_signal_connect(GTK_OBJECT(eventbox), "event", (GtkSignalFunc) 
	panel_applet_event, NULL);
	bind_applet_events(applet, NULL);
	
	/* Attach our private data to the applet */

	gtk_object_set_data(GTK_OBJECT(eventbox), 
	APPLET_CMD_FUNC, get_applet_cmd_func(id));
	gtk_object_set_data(GTK_OBJECT(eventbox), 
	APPLET_FLAGS, (gpointer) flags);

	fix_applet_position(eventbox, &xpos, &ypos);

	gtk_fixed_put(GTK_FIXED(the_panel->fixed), eventbox, xpos, ypos);
	gtk_widget_show(eventbox);
	gtk_widget_show(applet);
}
----------------------------------------------------------------------

From miguel@nuclecu.unam.mx
Received: (qmail 4701 invoked from network); 23 Dec 1997 04:57:00 -0000
Received: from athena.nuclecu.unam.mx (132.248.29.9)
  by mail2.redhat.com with SMTP; 23 Dec 1997 04:57:00 -0000
Received: (from miguel@localhost)
	by athena.nuclecu.unam.mx (8.8.7/8.8.7) id WAA06955;
	Mon, 22 Dec 1997 22:55:17 -0600
Date: Mon, 22 Dec 1997 22:55:17 -0600
Message-Id: <199712230455.WAA06955@athena.nuclecu.unam.mx>
From: Miguel de Icaza <miguel@nuclecu.unam.mx>
To: gnome@athena.nuclecu.unam.mx
CC: ripley@xs4all.nl, gtk-list@redhat.com
Subject: More Gtk/XmHTML success!
X-Windows: Live the nightmare.


Hello guys,

   Gtk/XmHTML port source on the CVS repository now:

	- Scrolls.
	- displays GIFs, animated GIFs.
	- JPEGs.
	- Colors work (yes, gdk_color_context code is functional).
	- PNG are kind of strange.

   I cant believe the port is behaving so well.  It is rock solid, the
XmHTML engine is amazingly nice, it renders most of the stuff we have
thrown at it (modulo frames and tables, as I have not yet merged the
table code from Koen and have avoided doing the frame bits so far).

Best wishes,
Miguel.