Bug:GnomeIconTextItem doesn't move with the group it's on.
- From: Agustín Ferrín Pozuelo <ferrin arrakis es>
- To: <gnome-devel-list gnome org>
- Subject: Bug:GnomeIconTextItem doesn't move with the group it's on.
- Date: Tue, 13 Feb 2001 23:06:43 +0100
Sorry I'm not on the gnome-devel-list.
I'm just reporting this bug as I was told in [gtkmm-main-list] where I
'belong'.
I found out that GnomeIconTextItem doesn't move when I move the group it's
on.
I already put the bug to bugzilla, but I'm not sure if I did it well.
The compilable code below shows what I mean.
/// Begin of sample code -------------------------------------------
GnomeApp *app;
GtkWidget *canvas;
GnomeCanvasItem *group;
GnomeCanvasItem *rect;
GnomeIconTextItem *icontext;
gint moving(GdkEvent *e)
{
// This moves the group IconText is on:
gnome_canvas_item_move(group,1,1);
// Only effective for GnomeIconTextItem when
// gnome_icon_text_item_setxy(icontext,0,0);
return TRUE;
}
int main(int argc, char* argv[])
{
gnome_init("Sample","0.1",argc, argv);
app=GNOME_APP(gnome_app_new("Sample","Sample"));
canvas=gnome_canvas_new();
group=gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)),
GNOME_TYPE_CANVAS_GROUP,
"x", 0.0,"y", 0.0, NULL);
rect=gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
GNOME_TYPE_CANVAS_RECT,
"x1", (gdouble) -20, "y1", (gdouble) -20,
"x2", (gdouble) 20, "y2", (gdouble) 20,
"width_pixels", (guint) 2, "outline_color", "black",
"fill_color", "white", NULL);
icontext=GNOME_ICON_TEXT_ITEM(gnome_canvas_item_new(GNOME_CANVAS_GROUP(group
),
GNOME_TYPE_ICON_TEXT_ITEM,NULL));
gnome_icon_text_item_configure(GNOME_ICON_TEXT_ITEM(icontext),0,0,100,
("-*-clean-medium-r-normal-*-14-*-*-*-*-*-*"),
("IconText"),FALSE,FALSE);
// Should move group when children receive events
gtk_signal_connect (GTK_OBJECT(group), "event",
GTK_SIGNAL_FUNC (moving), NULL);
gnome_app_set_contents(app,canvas);
gtk_widget_show_all(GTK_WIDGET(app));
gtk_main();
return 0;
}
//// End of Sample code -------------------------------------------
--
Agustin Ferrin Pozuelo
ferrin arrakis es
http://www.arrakis.es/~ferrin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]