Commit f6f1ce01 authored by PST 1998 Shawn T. Amundson's avatar PST 1998 Shawn T. Amundson Committed by Shawn Amundson

Required changes for version change to 0.99.4

Sun Mar  1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>

        * Required changes for version change to 0.99.4

        * gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
        * gtk/testgtk.c: added test here from J. Bolliet, removed testtree

        * gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
          and gtk_clist_set_pixtext to not require a mask

        * gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
          adds gdk_draw_lines and fixes some things about
          gdk_draw_polygon
parent 80fd0a0c
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Sun Mar 1 15:18:38 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Required changes for version change to 0.99.4
* gtk/gtktree.[ch]: patch from J. Bolliet to correct some bugs
* gtk/testgtk.c: added test here from J. Bolliet, removed testtree
* gtk/clist: gtk-abilleira-981602-0, allows gtk_clist_set_pixmap
and gtk_clist_set_pixtext to not require a mask
* gdk/gdkdraw.c,gdk.h: gtk-trow-980217-0
adds gdk_draw_lines and fixes some things about
gdk_draw_polygon
Sun Mar 1 17:40:58 1998 Owen Taylor <owt1@cornell.edu>
* gdk/gdkpixmap.c: Make sure either the window or
......
Forthcoming Changes for GTK+ 0.99.4:
Overview of Changes in GTK+ 0.99.4:
* Reference counting revolution integrated.
Refer to docs/refcounting.txt on this issue.
......@@ -23,6 +23,10 @@ Forthcoming Changes for GTK+ 0.99.4:
* Many enhancements to GtkNotebook.
* New widget GtkSpinButton, check out testgtk.
* New widget GtkTipsQuery for letting the user query tooltips of widgets.
* Addition of gtkeditable base widget to encapsulate selection and
clipboard handling (Entry and Text use this)
* Text widget more complete
* Additions to GtkStatusBar to make it complete.
* Gdk now supports regions.
* Access masks for widget arguments (GTK_ARG_READABLE/GTK_ARG_WRITABLE).
* Function replacements:
......@@ -32,7 +36,8 @@ Forthcoming Changes for GTK+ 0.99.4:
* Support for quit handlers in gtk_main().
* Motif window mangaer hints support.
* Widget arguments are now flagged for readability/writability.
* Various FAQ updates.
* Additions to documentation.
* Various FAQ updates. (FAQ now included)
* Clean ups and many many bug fixes by a lot of people all over the place.
* New, long and descriptive ChangeLog entries for bored readers ;)
......
This is GTK+ version 0.99.3. GTK, which stands for the Gimp ToolKit,
This is GTK+ version 0.99.4. GTK, which stands for the Gimp ToolKit,
is a library for creating graphical user interfaces.
The official ftp site is:
ftp://ftp.gimp.org/pub/gtk
The official web site is:
http://www.gimp.org/gtk
Patches can be uploaded to:
ftp://ftp.gimp.org/incoming
......
......@@ -6,7 +6,7 @@ cflags_set=${CFLAGS+set}
GTK_MAJOR_VERSION=0
GTK_MINOR_VERSION=99
GTK_MICRO_VERSION=3
GTK_MICRO_VERSION=4
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
# For automake.
......
......@@ -696,6 +696,60 @@ uses glib (see below), it will be more portable and safer to use on multiple pla
<!-- Examples, anybody? I've been mulling some over. NF -->
<sect1>How do I use color allocation?
<p>
One of the nice things about GDK is that it's based on top of Xlib; this is also
a problem, especially in the area of color management. If you want to use color
in your program (drawing a rectangle or such, your code should look something like
this:
<tscreen>
<verb>
{
GdkColor *color;
int width, height;
GtkWidget *widget;
...
/* first, create a GC to draw on */
gc = gdk_gc_new(widget->window);
/* find proper dimensions for rectangle */
gdk_window_get_size(widget->window, &width, &height);
/* the color we want to use */
color = (GdkColor *)malloc(sizeof(GdkColor));
/* red, green, and blue are passed values, indicating the RGB triple
* of the color we want to draw. Note that the values of the RGB components
* within the GdkColor are taken from 0 to 65535, not 0 to 255.
*/
color->red = red * (65535/255);
color->green = green * (65535/255);
color->blue = blue * (65535/255);
/* the pixel value indicates the index in the colormap of the color.
* it is simply a combination of the RGB values we set earlier
*/
color->pixel = (gulong)(red*65536 + green*256 + blue);
/* However, the pixel valule is only truly valid on 24-bit (TrueColor)
* displays. Therefore, this call is required so that GDK and X can
* give us the closest color available in the colormap
*/
gdk_color_alloc(gtk_widget_get_colormap(widget), color);
/* set the foreground to our color */
gdk_gc_set_foreground(gc, color);
/* draw the rectangle */
gdk_draw_rectangle(widget->window, gc, 1, 0, 0, width, height);
...
}
</verb>
</tscreen>
<!-- ***************************************************************** -->
<sect>About glib
<!-- ***************************************************************** -->
......
......@@ -696,6 +696,60 @@ uses glib (see below), it will be more portable and safer to use on multiple pla
<!-- Examples, anybody? I've been mulling some over. NF -->
<sect1>How do I use color allocation?
<p>
One of the nice things about GDK is that it's based on top of Xlib; this is also
a problem, especially in the area of color management. If you want to use color
in your program (drawing a rectangle or such, your code should look something like
this:
<tscreen>
<verb>
{
GdkColor *color;
int width, height;
GtkWidget *widget;
...
/* first, create a GC to draw on */
gc = gdk_gc_new(widget->window);
/* find proper dimensions for rectangle */
gdk_window_get_size(widget->window, &width, &height);
/* the color we want to use */
color = (GdkColor *)malloc(sizeof(GdkColor));
/* red, green, and blue are passed values, indicating the RGB triple
* of the color we want to draw. Note that the values of the RGB components
* within the GdkColor are taken from 0 to 65535, not 0 to 255.
*/
color->red = red * (65535/255);
color->green = green * (65535/255);
color->blue = blue * (65535/255);
/* the pixel value indicates the index in the colormap of the color.
* it is simply a combination of the RGB values we set earlier
*/
color->pixel = (gulong)(red*65536 + green*256 + blue);
/* However, the pixel valule is only truly valid on 24-bit (TrueColor)
* displays. Therefore, this call is required so that GDK and X can
* give us the closest color available in the colormap
*/
gdk_color_alloc(gtk_widget_get_colormap(widget), color);
/* set the foreground to our color */
gdk_gc_set_foreground(gc, color);
/* draw the rectangle */
gdk_draw_rectangle(widget->window, gc, 1, 0, 0, width, height);
...
}
</verb>
</tscreen>
<!-- ***************************************************************** -->
<sect>About glib
<!-- ***************************************************************** -->
......
......@@ -563,6 +563,12 @@ void gdk_draw_segments (GdkDrawable *drawable,
GdkGC *gc,
GdkSegment *segs,
gint nsegs);
void gdk_draw_lines (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
gint npoints);
/* Selections
......
......@@ -142,6 +142,9 @@ gdk_draw_polygon (GdkDrawable *drawable,
{
GdkWindowPrivate *drawable_private;
GdkGCPrivate *gc_private;
GdkPoint *local_points = points;
gint local_npoints = npoints;
gint local_alloc = 0;
g_return_if_fail (drawable != NULL);
g_return_if_fail (gc != NULL);
......@@ -158,14 +161,24 @@ gdk_draw_polygon (GdkDrawable *drawable,
}
else
{
XDrawLines (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc, (XPoint*) points, npoints, CoordModeOrigin);
if ((points[0].x != points[npoints-1].x) ||
(points[0].y != points[npoints-1].y))
XDrawLine (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc, points[npoints-1].x, points[npoints-1].y,
points[0].x, points[0].y);
(points[0].y != points[npoints-1].y))
{
local_alloc = 1;
++local_npoints;
local_points = (GdkPoint*) g_malloc (local_npoints * sizeof(GdkPoint));
memcpy (local_points, points, npoints * sizeof(GdkPoint));
local_points[npoints].x = points[0].x;
local_points[npoints].y = points[0].y;
}
XDrawLines (drawable_private->xdisplay, drawable_private->xwindow,
gc_private->xgc,
(XPoint*) local_points, local_npoints,
CoordModeOrigin);
if (local_alloc)
g_free (local_points);
}
}
......@@ -401,3 +414,30 @@ gdk_draw_segments (GdkDrawable *drawable,
(XSegment *) segs,
nsegs);
}
void
gdk_draw_lines (GdkDrawable *drawable,
GdkGC *gc,
GdkPoint *points,
gint npoints)
{
GdkWindowPrivate *drawable_private;
GdkGCPrivate *gc_private;
if (npoints <= 0)
return;
g_return_if_fail (drawable != NULL);
g_return_if_fail (points != NULL);
g_return_if_fail (gc != NULL);
drawable_private = (GdkWindowPrivate*) drawable;
gc_private = (GdkGCPrivate*) gc;
XDrawLines (drawable_private->xdisplay,
drawable_private->xwindow,
gc_private->xgc,
(XPoint *) points,
npoints,
CoordModeOrigin);
}
......@@ -5,7 +5,7 @@ AC_INIT(glist.c)
cflags_set=${CFLAGS+set}
dnl Initialize automake stuff
AM_INIT_AUTOMAKE(glib, 0.99.3)
AM_INIT_AUTOMAKE(glib, 0.99.4)
# Specify a configuration file
AM_CONFIG_HEADER(glibconfig.h)
......
......@@ -220,7 +220,7 @@ EXTRA_DIST = \
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/glib @x_cflags@
noinst_PROGRAMS = testgtk testinput testselection simple testtree
noinst_PROGRAMS = testgtk testinput testselection simple
testgtk_LDADD = \
libgtk.la \
$(top_builddir)/gdk/libgdk.la \
......@@ -253,14 +253,6 @@ simple_LDADD = \
$(top_builddir)/glib/libglib.la \
-lm
testtree_LDADD = \
libgtk.la \
$(top_builddir)/gdk/libgdk.la \
@x_ldflags@ \
@x_libs@ \
$(top_builddir)/glib/libglib.la \
-lm
DEPS = \
$(top_builddir)/gtk/libgtk.la \
$(top_builddir)/gdk/libgdk.la \
......@@ -270,7 +262,6 @@ testgtk_DEPENDENCIES = $(DEPS)
testinput_DEPENDENCIES = $(DEPS)
testselection_DEPENDENCIES = $(DEPS)
simple_DEPENDENCIES = $(DEPS)
testtree_DEPENDENCIES = $(DEPS)
.PHONY: files
......
......@@ -986,7 +986,9 @@ gtk_clist_set_pixmap (GtkCList * clist,
clist_row = (g_list_nth (clist->row_list, row))->data;
gdk_pixmap_ref (pixmap);
gdk_pixmap_ref (mask);
if (mask) gdk_pixmap_ref (mask);
cell_set_pixmap (clist, clist_row, column, pixmap, mask);
/* redraw the list if it's not frozen */
......@@ -1019,9 +1021,11 @@ gtk_clist_get_pixmap (GtkCList * clist,
return 0;
if (pixmap)
{
*pixmap = GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap;
if (mask)
// mask can be NULL
*mask = GTK_CELL_PIXMAP (clist_row->cell[column])->mask;
}
return 1;
}
......@@ -1047,7 +1051,7 @@ gtk_clist_set_pixtext (GtkCList * clist,
clist_row = (g_list_nth (clist->row_list, row))->data;
gdk_pixmap_ref (pixmap);
gdk_pixmap_ref (mask);
if (mask) gdk_pixmap_ref (mask);
cell_set_pixtext (clist, clist_row, column, text, spacing, pixmap, mask);
/* redraw the list if it's not frozen */
......@@ -1087,8 +1091,9 @@ gtk_clist_get_pixtext (GtkCList * clist,
*spacing = GTK_CELL_PIXTEXT (clist_row->cell[column])->spacing;
if (pixmap)
*pixmap = GTK_CELL_PIXTEXT (clist_row->cell[column])->pixmap;
if (mask)
*mask = GTK_CELL_PIXTEXT (clist_row->cell[column])->mask;
// mask can be NULL
*mask = GTK_CELL_PIXTEXT (clist_row->cell[column])->mask;
return 1;
}
......@@ -2536,9 +2541,11 @@ draw_row (GtkCList * clist,
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
clist_row->cell[i].vertical;
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXMAP (clist_row->cell[i])->mask);
gdk_gc_set_clip_origin (fg_gc, xdest, ydest);
if (GTK_CELL_PIXMAP (clist_row->cell[i])->mask)
{
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXMAP (clist_row->cell[i])->mask);
gdk_gc_set_clip_origin (fg_gc, xdest, ydest);
}
gdk_draw_pixmap (clist->clist_window,
fg_gc,
GTK_CELL_PIXMAP (clist_row->cell[i])->pixmap,
......@@ -2547,8 +2554,11 @@ draw_row (GtkCList * clist,
ydest,
pixmap_width, height);
gdk_gc_set_clip_origin (fg_gc, 0, 0);
gdk_gc_set_clip_mask (fg_gc, NULL);
if (GTK_CELL_PIXMAP (clist_row->cell[i])->mask)
{
gdk_gc_set_clip_origin (fg_gc, 0, 0);
gdk_gc_set_clip_mask (fg_gc, NULL);
}
break;
case GTK_CELL_PIXTEXT:
......@@ -2559,9 +2569,12 @@ draw_row (GtkCList * clist,
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
clist_row->cell[i].vertical;
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXTEXT (clist_row->cell[i])->mask);
gdk_gc_set_clip_origin (fg_gc, xdest, ydest);
if (GTK_CELL_PIXTEXT (clist_row->cell[i])->mask)
{
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXTEXT (clist_row->cell[i])->mask);
gdk_gc_set_clip_origin (fg_gc, xdest, ydest);
}
gdk_draw_pixmap (clist->clist_window,
fg_gc,
GTK_CELL_PIXTEXT (clist_row->cell[i])->pixmap,
......@@ -3495,13 +3508,15 @@ cell_empty (GtkCList * clist,
case GTK_CELL_PIXMAP:
gdk_pixmap_unref (GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap);
gdk_bitmap_unref (GTK_CELL_PIXMAP (clist_row->cell[column])->mask);
if (GTK_CELL_PIXMAP (clist_row->cell[column])->mask)
gdk_bitmap_unref (GTK_CELL_PIXMAP (clist_row->cell[column])->mask);
break;
case GTK_CELL_PIXTEXT:
g_free (GTK_CELL_PIXTEXT (clist_row->cell[column])->text);
gdk_pixmap_unref (GTK_CELL_PIXTEXT (clist_row->cell[column])->pixmap);
gdk_bitmap_unref (GTK_CELL_PIXTEXT (clist_row->cell[column])->mask);
if (GTK_CELL_PIXTEXT (clist_row->cell[column])->mask)
gdk_bitmap_unref (GTK_CELL_PIXTEXT (clist_row->cell[column])->mask);
break;
case GTK_CELL_WIDGET:
......@@ -3539,10 +3554,11 @@ cell_set_pixmap (GtkCList * clist,
{
cell_empty (clist, clist_row, column);
if (pixmap && mask)
if (pixmap)
{
clist_row->cell[column].type = GTK_CELL_PIXMAP;
GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap = pixmap;
// We set the mask even if it is NULL
GTK_CELL_PIXMAP (clist_row->cell[column])->mask = mask;
}
}
......@@ -3558,7 +3574,7 @@ cell_set_pixtext (GtkCList * clist,
{
cell_empty (clist, clist_row, column);
if (text && pixmap && mask)
if (text && pixmap)
{
clist_row->cell[column].type = GTK_CELL_PIXTEXT;
GTK_CELL_PIXTEXT (clist_row->cell[column])->text = g_strdup (text);
......
......@@ -578,7 +578,9 @@ gtk_tree_motion_notify (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_TREE (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
#ifdef TREE_DEBUG
g_print("gtk_tree_motion_notify\n");
#endif /* TREE_DEBUG */
return FALSE;
}
......@@ -635,6 +637,20 @@ gtk_tree_remove_item (GtkTree *container,
g_list_free (item_list);
}
/* used by gtk_tree_remove_items to make the function independant of
order in list of items to remove.
Sort item bu depth in tree */
static gint
gtk_tree_sort_item_by_depth(GtkWidget* a, GtkWidget* b)
{
if((GTK_TREE(a->parent)->level) < (GTK_TREE(b->parent)->level))
return 1;
if((GTK_TREE(a->parent)->level) > (GTK_TREE(b->parent)->level))
return -1;
return 0;
}
void
gtk_tree_remove_items (GtkTree *tree,
GList *items)
......@@ -642,40 +658,96 @@ gtk_tree_remove_items (GtkTree *tree,
GtkWidget *widget;
GList *selected_widgets;
GList *tmp_list;
GtkTree *real_tree, *root_tree;
GList *sorted_list;
GtkTree *real_tree;
GtkTree *root_tree;
g_return_if_fail (tree != NULL);
g_return_if_fail (GTK_IS_TREE (tree));
#ifdef TREE_DEBUG
g_print("+ gtk_tree_remove_items [ tree %#x items list %#x ]\n", (int)tree, (int)items);
#endif /* TREE_DEBUG */
root_tree = GTK_TREE(GTK_TREE_ROOT_TREE(tree));
tmp_list = items;
selected_widgets = NULL;
sorted_list = NULL;
widget = NULL;
#ifdef TREE_DEBUG
g_print("* sort list by depth\n");
#endif /* TREE_DEBUG */
while(tmp_list)
{
#ifdef TREE_DEBUG
g_print("* item [%#x] depth [%d]\n",
(int)tmp_list->data,
(int)GTK_TREE(GTK_WIDGET(tmp_list->data)->parent)->level);
#endif /* TREE_DEBUG */
sorted_list = g_list_insert_sorted(sorted_list,
tmp_list->data,
(GCompareFunc)gtk_tree_sort_item_by_depth);
tmp_list = g_list_next(tmp_list);
}
#ifdef TREE_DEBUG
/* print sorted list */
g_print("* sorted list result\n");
tmp_list = sorted_list;
while(tmp_list)
{
g_print("* item [%#x] depth [%d]\n",
(int)tmp_list->data,
(int)GTK_TREE(GTK_WIDGET(tmp_list->data)->parent)->level);
tmp_list = g_list_next(tmp_list);
}
#endif /* TREE_DEBUG */
#ifdef TREE_DEBUG
g_print("* scan sorted list\n");
#endif /* TREE_DEBUG */
tmp_list = sorted_list;
while (tmp_list)
{
widget = tmp_list->data;
tmp_list = tmp_list->next;
#ifdef TREE_DEBUG
g_print("* item [%#x] subtree [%#x]\n",
(int)widget, (int)GTK_TREE_ITEM_SUBTREE(widget));
#endif /* TREE_DEBUG */
/* get real owner of this widget */
real_tree = GTK_TREE(widget->parent);
#ifdef TREE_DEBUG
g_print("* subtree having this widget [%#x]\n", (int)real_tree);
#endif /* TREE_DEBUG */
if (widget->state == GTK_STATE_SELECTED)
selected_widgets = g_list_prepend (selected_widgets, widget);
{
selected_widgets =