diff options
author | Chris Toshok <toshok@ximian.com> | 2003-04-03 09:31:49 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2003-04-03 09:31:49 +0800 |
commit | 04601125b5bf376e65da35c46cf77e690e7c1132 (patch) | |
tree | 4c0465687bd344b686098f8f2beef6b62cd79f66 /addressbook/gui/widgets/e-minicard.c | |
parent | 60ffd0653e90a773b6e646b956b16eb41bd76510 (diff) | |
download | gsoc2013-evolution-04601125b5bf376e65da35c46cf77e690e7c1132.tar.gz gsoc2013-evolution-04601125b5bf376e65da35c46cf77e690e7c1132.tar.zst gsoc2013-evolution-04601125b5bf376e65da35c46cf77e690e7c1132.zip |
add NONE:OBJECT
2003-04-02 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-marshal.list: add NONE:OBJECT
* gui/widgets/e-minicard.c (e_minicard_class_init): add style_set
signal.
(e_minicard_style_set): just call set_selected with the currently
selected flag, so we recolor properly.
* gui/widgets/e-minicard.h (struct _EMinicardClass): add style_set
signal.
svn path=/trunk/; revision=20651
Diffstat (limited to 'addressbook/gui/widgets/e-minicard.c')
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 20 |
1 files changed, 20 insertions, 0 deletions
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; |