aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-minicard/e-minicard.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-08 09:41:47 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-08 09:41:47 +0800
commit6f357b4c2d22d66d81be5ec3f0276ac3393805a1 (patch)
treef8c66838af485a217260dfb3c2e36dc48504af4a /widgets/e-minicard/e-minicard.c
parent0bfae7d16b83458d64b0957fd5e88bc54a131b2a (diff)
downloadgsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar.gz
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar.bz2
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar.lz
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar.xz
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.tar.zst
gsoc2013-evolution-6f357b4c2d22d66d81be5ec3f0276ac3393805a1.zip
Added a "break_characters" argument. It lets you define a set of
2000-03-07 Christopher James Lahey <clahey@helixcode.com> * widgets/e-text/e-text.c, widgets/e-text/e-text.h: Added a "break_characters" argument. It lets you define a set of characters which should cause optional linebreaks to occur. Made setting the "clip_height" argument to -1 mean no height clipping. Moved calling the "resize" signal into an idle handler to avoid reentering the canvas update loop. Made EText recalc bounds if the affine has changed. Fixed up tooltip_count (this counts the number of ENTER and LEAVE events.) * widgets/e-text/e-text-test.c: Got rid of a few warnings. * widgets/e-minicard/e-minicard-label.h: Reindent a few lines. * widgets/e-minicard/e-minicard.c, widgets/e-minicard/e-minicard-label.c: Switch from using "x" and "y" to set the children's position to using e_canvas_item_move_absolute. svn path=/trunk/; revision=2079
Diffstat (limited to 'widgets/e-minicard/e-minicard.c')
-rw-r--r--widgets/e-minicard/e-minicard.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/widgets/e-minicard/e-minicard.c b/widgets/e-minicard/e-minicard.c
index 805c4e78ff..b8d25f5dc6 100644
--- a/widgets/e-minicard/e-minicard.c
+++ b/widgets/e-minicard/e-minicard.c
@@ -26,6 +26,7 @@
#include "e-text.h"
#include "e-canvas.h"
#include "e-util.h"
+#include "e-canvas-utils.h"
static void e_minicard_init (EMinicard *card);
static void e_minicard_class_init (EMinicardClass *klass);
static void e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
@@ -235,8 +236,6 @@ e_minicard_realize (GnomeCanvasItem *item)
e_minicard->header_text =
gnome_canvas_item_new( group,
e_text_get_type(),
- "x", (double) 6,
- "y", (double) 6,
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( e_minicard->width - 12 ),
"clip", TRUE,
@@ -245,6 +244,7 @@ e_minicard_realize (GnomeCanvasItem *item)
"fill_color", "black",
"text", "Chris Lahey",
NULL );
+ e_canvas_item_move_absolute(e_minicard->header_text, 6, 6);
gtk_signal_connect(GTK_OBJECT(e_minicard->header_text),
"resize",
@@ -253,13 +253,12 @@ e_minicard_realize (GnomeCanvasItem *item)
if ( rand() % 2 ) {
new_item = gnome_canvas_item_new( group,
e_minicard_label_get_type(),
- "x", (double) 2,
- "y", e_minicard->height,
"width", e_minicard->width - 4,
"fieldname", "Full Name:",
"field", "Christopher James Lahey",
NULL );
e_minicard->fields = g_list_append( e_minicard->fields, new_item);
+ e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
gtk_signal_connect(GTK_OBJECT(new_item),
"resize",
@@ -270,13 +269,12 @@ e_minicard_realize (GnomeCanvasItem *item)
if (rand() % 2) {
new_item = gnome_canvas_item_new( group,
e_minicard_label_get_type(),
- "x", (double) 2,
- "y", e_minicard->height,
"width", e_minicard->width - 4,
"fieldname", "Address:",
"field", "100 Main St\nHome town, USA",
NULL );
e_minicard->fields = g_list_append( e_minicard->fields, new_item);
+ e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
gtk_signal_connect(GTK_OBJECT(new_item),
"resize",
@@ -287,13 +285,12 @@ e_minicard_realize (GnomeCanvasItem *item)
if (rand() % 2) {
new_item = gnome_canvas_item_new( group,
e_minicard_label_get_type(),
- "x", (double) 2,
- "y", e_minicard->height,
"width", e_minicard->width - 4.0,
"fieldname", "Email:",
"field", "clahey@address.com",
NULL );
e_minicard->fields = g_list_append( e_minicard->fields, new_item);
+ e_canvas_item_move_absolute(new_item, 2, e_minicard->height);
gtk_signal_connect(GTK_OBJECT(new_item),
"resize",
@@ -432,9 +429,7 @@ _update_card( EMinicard *e_minicard )
gtk_object_get (GTK_OBJECT(list->data),
"height", &text_height,
NULL);
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(list->data),
- "y", (double) e_minicard->height,
- NULL);
+ e_canvas_item_move_absolute(GNOME_CANVAS_ITEM(list->data), 2, e_minicard->height);
e_minicard->height += text_height;
}
e_minicard->height += 2;