aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-label.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 /addressbook/gui/widgets/e-minicard-label.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 'addressbook/gui/widgets/e-minicard-label.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 5b528d6190..3f6a80a890 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -25,6 +25,7 @@
#include "e-text.h"
#include "e-canvas.h"
#include "e-util.h"
+#include "e-canvas-utils.h"
static void e_minicard_label_init (EMinicardLabel *card);
static void e_minicard_label_class_init (EMinicardLabelClass *klass);
static void e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
@@ -238,8 +239,6 @@ e_minicard_label_realize (GnomeCanvasItem *item)
e_minicard_label->fieldname =
gnome_canvas_item_new( group,
e_text_get_type(),
- "x", (double) 2,
- "y", (double) 1,
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( e_minicard_label->width / 2 - 4 ),
"clip_height", (double) 1,
@@ -248,6 +247,7 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"font_gdk", font,
"fill_color", "black",
NULL );
+ e_canvas_item_move_absolute(e_minicard_label->fieldname, 2, 1);
if ( e_minicard_label->fieldname_text )
{
gnome_canvas_item_set( e_minicard_label->fieldname,
@@ -263,8 +263,6 @@ e_minicard_label_realize (GnomeCanvasItem *item)
e_minicard_label->field =
gnome_canvas_item_new( group,
e_text_get_type(),
- "x", (double) ( e_minicard_label->width / 2 + 2 ),
- "y", (double) 1,
"anchor", GTK_ANCHOR_NW,
"clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ),
"clip_height", (double) 1,
@@ -274,6 +272,7 @@ e_minicard_label_realize (GnomeCanvasItem *item)
"fill_color", "black",
"editable", TRUE,
NULL );
+ e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
if ( e_minicard_label->field_text )
{
gnome_canvas_item_set( e_minicard_label->field,
@@ -443,9 +442,9 @@ update_label( EMinicardLabel *e_minicard_label )
"clip_width", (double) ( e_minicard_label->width / 2 - 4 ),
NULL );
gnome_canvas_item_set( e_minicard_label->field,
- "x", (double) ( e_minicard_label->width / 2 + 2 ),
"clip_width", (double) ( ( e_minicard_label->width + 1 ) / 2 - 4 ),
NULL );
+ e_canvas_item_move_absolute(e_minicard_label->field, ( e_minicard_label->width / 2 + 2), 1);
if (old_height != e_minicard_label->height)
gtk_signal_emit_by_name (GTK_OBJECT (e_minicard_label), "resize");
@@ -454,9 +453,9 @@ update_label( EMinicardLabel *e_minicard_label )
}
-
static void
resize( GtkObject *object, gpointer data )
{
update_label(E_MINICARD_LABEL(data));
}
+