aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-label.c
diff options
context:
space:
mode:
authorChris Lahey <clahey@src.gnome.org>2000-01-14 06:01:23 +0800
committerChris Lahey <clahey@src.gnome.org>2000-01-14 06:01:23 +0800
commitf5347f59ff008ebc53f456cfcd4b8c58dead29c5 (patch)
tree1bfa9616fde11bbc40d7bf80557caf8f0429a84c /addressbook/gui/widgets/e-minicard-label.c
parent21c698ec023314751227247e4bef1d68a78a21ea (diff)
downloadgsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar.gz
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar.bz2
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar.lz
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar.xz
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.tar.zst
gsoc2013-evolution-f5347f59ff008ebc53f456cfcd4b8c58dead29c5.zip
e_canvas_item_move_absolute is just a helper function not supplied by the
* widgets/e-canvas-utils.c, widgets/e-canvas-utils.h: e_canvas_item_move_absolute is just a helper function not supplied by the gnome_canvas.[ch] I put it here so that multiple items can use it. * widgets/e-reflow.c, widgets/e-reflow.h: This item contains a number of other items and places them into multiple columns. The items contained must support a number of arguments and signals to allow the reflow to interact with them. * widgets/test-reflow.c: This is a test program for e-reflow. * widgets/e-text.c, widgets/e-text.h: Added properly drawn selected text. Added some preliminary code for X selection handling and cut & paste. * widgets/e-minicard.c, widgets/e-minicard.h: Added ARG_HAS_FOCUS handling. Made label display random for more interesting tests of multiple cards. Tweaked sizing information for better display. * widgets/e-minicard-label.c, widgets/e-minicard-label.h: Added ARG_HAS_FOCUS handling. * widgets/Makefile.am: Added the reflow test and reflow files. svn path=/trunk/; revision=1566
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-label.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 9efdd0ba65..a550031123 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -48,6 +48,7 @@ enum {
ARG_0,
ARG_WIDTH,
ARG_HEIGHT,
+ ARG_HAS_FOCUS,
ARG_FIELD,
ARG_FIELDNAME
};
@@ -103,6 +104,8 @@ e_minicard_label_class_init (EMinicardLabelClass *klass)
GTK_ARG_READWRITE, ARG_WIDTH);
gtk_object_add_arg_type ("EMinicardLabel::height", GTK_TYPE_DOUBLE,
GTK_ARG_READABLE, ARG_HEIGHT);
+ gtk_object_add_arg_type ("EMinicardLabel::has_focus", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_HAS_FOCUS);
gtk_object_add_arg_type ("EMinicardLabel::field", GTK_TYPE_STRING,
GTK_ARG_READWRITE, ARG_FIELD);
gtk_object_add_arg_type ("EMinicardLabel::fieldname", GTK_TYPE_STRING,
@@ -148,6 +151,10 @@ e_minicard_label_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
_update_label( e_minicard_label );
gnome_canvas_item_request_update (item);
break;
+ case ARG_HAS_FOCUS:
+ if (e_minicard_label->field && GTK_VALUE_BOOL(*arg))
+ gnome_canvas_item_grab_focus(e_minicard_label->field);
+ break;
case ARG_FIELD:
if ( e_minicard_label->field )
gnome_canvas_item_set( e_minicard_label->field, "text", GTK_VALUE_STRING (*arg), NULL );
@@ -178,6 +185,9 @@ e_minicard_label_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
case ARG_HEIGHT:
GTK_VALUE_DOUBLE (*arg) = e_minicard_label->height;
break;
+ case ARG_HAS_FOCUS:
+ GTK_VALUE_BOOL (*arg) = e_minicard_label->has_focus;
+ break;
case ARG_FIELD:
if ( e_minicard_label->field )
{
@@ -317,6 +327,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
"outline_color", "grey50",
"fill_color", "grey90",
NULL );
+ e_minicard_label->has_focus = TRUE;
}
else
{
@@ -324,6 +335,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
"outline_color", NULL,
"fill_color", NULL,
NULL );
+ e_minicard_label->has_focus = FALSE;
}
}
break;