From 95143a12e06797824a809c8e7f7d2b2a67b3cecf Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 9 May 2000 18:11:59 +0000 Subject: Added briefcase.png to get installed. 2000-05-09 Christopher James Lahey * art/Makefile.am: Added briefcase.png to get installed. From addressbook/ChangeLog: 2000-05-09 Christopher James Lahey * contact-editor/e-contact-editor.c: Use new art. svn path=/trunk/; revision=2958 --- ChangeLog | 4 ++ addressbook/ChangeLog | 4 ++ addressbook/contact-editor/e-contact-editor.c | 51 +++++++++++++++++------ addressbook/gui/contact-editor/e-contact-editor.c | 51 +++++++++++++++++------ art/Makefile.am | 1 + 5 files changed, 87 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff676fdec8..cda8affe3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-05-09 Christopher James Lahey + + * art/Makefile.am: Added briefcase.png to get installed. + 2000-05-09 Christopher James Lahey * widgets/e-text/e-text.c: Remove the tooltip callback when diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 7f2cc03970..fb75e739f3 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,7 @@ +2000-05-09 Christopher James Lahey + + * contact-editor/e-contact-editor.c: Use new art. + 2000-05-09 Christopher James Lahey * contact-editor/contact-editor.glade, diff --git a/addressbook/contact-editor/e-contact-editor.c b/addressbook/contact-editor/e-contact-editor.c index b24941bca3..02340ef0d3 100644 --- a/addressbook/contact-editor/e-contact-editor.c +++ b/addressbook/contact-editor/e-contact-editor.c @@ -24,6 +24,8 @@ #include #include "e-contact-editor.h" #include +#include +#include static void e_contact_editor_init (EContactEditor *card); static void e_contact_editor_class_init (EContactEditorClass *klass); @@ -103,22 +105,47 @@ e_contact_editor_class_init (EContactEditorClass *klass) static void _add_image(GtkTable *table, gchar *image, int left, int right, int top, int bottom) { - GtkWidget *pixmap = gnome_pixmap_new_from_file(image); - GtkWidget *alignment = gtk_widget_new(gtk_alignment_get_type(), - "child", pixmap, - "xalign", (double) 0, - "yalign", (double) 0, - "xscale", (double) 0, - "yscale", (double) 0, - NULL); + GdkPixbuf *pixbuf; + double width, height; + GtkWidget *canvas, *alignment; + + pixbuf = gdk_pixbuf_new_from_file(image); + width = gdk_pixbuf_get_width(pixbuf); + height = gdk_pixbuf_get_height(pixbuf); + canvas = gnome_canvas_new_aa(); +#if 0 + gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_rect_get_type(), + "fill_color_gdk", &(gtk_widget_get_style(GTK_WIDGET(canvas))->bg[GTK_STATE_NORMAL]), + "x1", 0.0, + "y1", 0.0, + "x2", width, + "y2", height, + NULL); +#endif + gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_pixbuf_get_type(), + "pixbuf", pixbuf, + NULL); + alignment = gtk_widget_new(gtk_alignment_get_type(), + "child", canvas, + "xalign", (double) 0, + "yalign", (double) 0, + "xscale", (double) 0, + "yscale", (double) 0, + NULL); + gtk_widget_set_usize(canvas, width, height); + gtk_table_attach(table, alignment, left, right, top, bottom, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show(pixmap); + gdk_pixbuf_unref(pixbuf); + + gtk_widget_show(canvas); gtk_widget_show(alignment); } @@ -136,9 +163,9 @@ _add_images(GtkTable *table) static void _add_details_images(GtkTable *table) { - _add_image(table, DATADIR "/evolution/briefcase.png", 0, 1, 0, 2); - _add_image(table, DATADIR "/evolution/head.png", 0, 1, 4, 6); - _add_image(table, DATADIR "/evolution/netfreebusy.png", 0, 1, 7, 9); + _add_image(table, EVOLUTION_IMAGES "/briefcase.png", 0, 1, 0, 2); + _add_image(table, EVOLUTION_IMAGES "/malehead.png", 0, 1, 4, 6); + _add_image(table, EVOLUTION_IMAGES "/globe.png", 0, 1, 7, 9); } static void diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index b24941bca3..02340ef0d3 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -24,6 +24,8 @@ #include #include "e-contact-editor.h" #include +#include +#include static void e_contact_editor_init (EContactEditor *card); static void e_contact_editor_class_init (EContactEditorClass *klass); @@ -103,22 +105,47 @@ e_contact_editor_class_init (EContactEditorClass *klass) static void _add_image(GtkTable *table, gchar *image, int left, int right, int top, int bottom) { - GtkWidget *pixmap = gnome_pixmap_new_from_file(image); - GtkWidget *alignment = gtk_widget_new(gtk_alignment_get_type(), - "child", pixmap, - "xalign", (double) 0, - "yalign", (double) 0, - "xscale", (double) 0, - "yscale", (double) 0, - NULL); + GdkPixbuf *pixbuf; + double width, height; + GtkWidget *canvas, *alignment; + + pixbuf = gdk_pixbuf_new_from_file(image); + width = gdk_pixbuf_get_width(pixbuf); + height = gdk_pixbuf_get_height(pixbuf); + canvas = gnome_canvas_new_aa(); +#if 0 + gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_rect_get_type(), + "fill_color_gdk", &(gtk_widget_get_style(GTK_WIDGET(canvas))->bg[GTK_STATE_NORMAL]), + "x1", 0.0, + "y1", 0.0, + "x2", width, + "y2", height, + NULL); +#endif + gnome_canvas_item_new(gnome_canvas_root(GNOME_CANVAS(canvas)), + gnome_canvas_pixbuf_get_type(), + "pixbuf", pixbuf, + NULL); + alignment = gtk_widget_new(gtk_alignment_get_type(), + "child", canvas, + "xalign", (double) 0, + "yalign", (double) 0, + "xscale", (double) 0, + "yscale", (double) 0, + NULL); + gtk_widget_set_usize(canvas, width, height); + gtk_table_attach(table, alignment, left, right, top, bottom, GTK_FILL, GTK_FILL, 0, 0); - gtk_widget_show(pixmap); + gdk_pixbuf_unref(pixbuf); + + gtk_widget_show(canvas); gtk_widget_show(alignment); } @@ -136,9 +163,9 @@ _add_images(GtkTable *table) static void _add_details_images(GtkTable *table) { - _add_image(table, DATADIR "/evolution/briefcase.png", 0, 1, 0, 2); - _add_image(table, DATADIR "/evolution/head.png", 0, 1, 4, 6); - _add_image(table, DATADIR "/evolution/netfreebusy.png", 0, 1, 7, 9); + _add_image(table, EVOLUTION_IMAGES "/briefcase.png", 0, 1, 0, 2); + _add_image(table, EVOLUTION_IMAGES "/malehead.png", 0, 1, 4, 6); + _add_image(table, EVOLUTION_IMAGES "/globe.png", 0, 1, 7, 9); } static void diff --git a/art/Makefile.am b/art/Makefile.am index eb35364cca..931f54054a 100644 --- a/art/Makefile.am +++ b/art/Makefile.am @@ -7,6 +7,7 @@ images_DATA = \ evolution-notes.png \ evolution-tasks.png \ evolution-today.png \ + briefcase.png \ cellphone.png \ globe.png \ house.png \ -- cgit v1.2.3