aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-04-08 12:44:58 +0800
committerChris Toshok <toshok@src.gnome.org>2003-04-08 12:44:58 +0800
commitc5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5 (patch)
tree4eed594a35869c0ec4cf5094cbb689c8cb40455e /addressbook/gui/widgets/e-minicard.c
parentfc5fc4dcf006ff720c73620c233a3655d479c05a (diff)
downloadgsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar.gz
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar.bz2
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar.lz
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar.xz
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.tar.zst
gsoc2013-evolution-c5bab4bb067169afa5ef9ae2c0e2926f9c67c6a5.zip
[ fixes #7103 ] init style_set. and add the signal.
2003-04-07 Chris Toshok <toshok@ximian.com> [ fixes #7103 ] * gui/widgets/e-minicard-label.c (e_minicard_label_class_init): init style_set. and add the signal. (e_minicard_label_realize): include e_minicard_label_construct's code here, and call set_colors after we create the sub-items. (e_minicard_label_unrealize): indent, and remove dead code. (e_minicard_label_event): indent, and call set_colors instead of setting the colors manually. (set_colors): new function, set our colors based on the current style. (e_minicard_label_style_set): new function, just call set_colors. (e_minicard_label_new): e_minicard_label_construct doesn't exist anymore. * gui/widgets/e-minicard-label.h (struct _EMinicardLabelClass): add style_set signal. * gui/widgets/e-minicard.c (set_selected): little tweaks in the coloring. (e_minicard_unrealize): reindent, and remove some unused code. * gui/widgets/e-minicard-view-widget.h (struct _EMinicardViewWidget): add background. * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_class_init): init widget_class->style_class. (e_minicard_view_widget_style_set): new function, just set the background's fill_color_gdk to base[GTK_STATE_NORMAL]. (e_minicard_view_widget_realize): store off the background canvas item so we can set the color later. svn path=/trunk/; revision=20742
Diffstat (limited to 'addressbook/gui/widgets/e-minicard.c')
-rw-r--r--addressbook/gui/widgets/e-minicard.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index bb9234083d..782f5c40a9 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -260,7 +260,7 @@ set_selected (EMinicard *minicard, gboolean selected)
GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas);
if (selected) {
gnome_canvas_item_set (minicard->rect,
- "outline_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
+ "outline_color_gdk", &canvas->style->bg[GTK_STATE_ACTIVE],
NULL);
gnome_canvas_item_set (minicard->header_rect,
"fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED],
@@ -276,7 +276,7 @@ set_selected (EMinicard *minicard, gboolean selected)
"fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
NULL);
gnome_canvas_item_set (minicard->header_text,
- "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL],
+ "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
NULL);
}
minicard->selected = selected;
@@ -506,26 +506,21 @@ e_minicard_realize (GnomeCanvasItem *item)
"pixbuf", e_minicard->list_icon_pixbuf,
NULL);
+ set_selected (e_minicard, e_minicard->selected);
+
remodel(e_minicard);
e_canvas_item_request_reflow(item);
-
- if (!item->canvas->aa) {
- }
}
static void
e_minicard_unrealize (GnomeCanvasItem *item)
{
- EMinicard *e_minicard;
-
- e_minicard = E_MINICARD (item);
+ EMinicard *e_minicard;
- if (!item->canvas->aa)
- {
- }
+ e_minicard = E_MINICARD (item);
- if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)
- (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item);
+ if (GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize)
+ (* GNOME_CANVAS_ITEM_CLASS(parent_class)->unrealize) (item);
}
static void