diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-marshal.list | 1 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 20 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.h | 2 |
3 files changed, 23 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-marshal.list b/addressbook/gui/widgets/e-addressbook-marshal.list index 8f97e48e86..2b34707dbb 100644 --- a/addressbook/gui/widgets/e-addressbook-marshal.list +++ b/addressbook/gui/widgets/e-addressbook-marshal.list @@ -2,6 +2,7 @@ INT:POINTER NONE:NONE NONE:BOOL NONE:POINTER +NONE:OBJECT NONE:ENUM NONE:INT,INT NONE:INT diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 8bebb4cdb0..15ecbf05f3 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -52,6 +52,7 @@ static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event); static void e_minicard_realize (GnomeCanvasItem *item); static void e_minicard_unrealize (GnomeCanvasItem *item); static void e_minicard_reflow ( GnomeCanvasItem *item, int flags ); +static void e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style); static void e_minicard_resize_children( EMinicard *e_minicard ); static void remodel( EMinicard *e_minicard ); @@ -95,6 +96,7 @@ enum { enum { SELECTED, DRAG_BEGIN, + STYLE_SET, LAST_SIGNAL }; @@ -135,6 +137,8 @@ e_minicard_class_init (EMinicardClass *klass) object_class->dispose = e_minicard_dispose; object_class->finalize = e_minicard_finalize; + klass->style_set = e_minicard_style_set; + parent_class = gtk_type_class (gnome_canvas_group_get_type ()); g_object_class_install_property (object_class, PROP_WIDTH, @@ -206,6 +210,16 @@ e_minicard_class_init (EMinicardClass *klass) e_addressbook_marshal_INT__POINTER, G_TYPE_INT, 1, G_TYPE_POINTER); + e_minicard_signals [STYLE_SET] = + g_signal_new ("style_set", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EMinicardClass, style_set), + NULL, NULL, + e_addressbook_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + GTK_TYPE_STYLE); + /* GnomeCanvasItem method overrides */ item_class->realize = e_minicard_realize; item_class->unrealize = e_minicard_unrealize; @@ -432,6 +446,12 @@ e_minicard_finalize (GObject *object) } static void +e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style) +{ + set_selected (minicard, minicard->selected); +} + +static void e_minicard_realize (GnomeCanvasItem *item) { EMinicard *e_minicard; diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 37d5407ad1..ac0f82e46c 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -104,6 +104,8 @@ struct _EMinicardClass gint (* selected) (EMinicard *minicard, GdkEvent *event); gint (* drag_begin) (EMinicard *minicard, GdkEvent *event); + + void (* style_set) (EMinicard *minicard, GtkStyle *previous_style); }; |