diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-02 16:25:03 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-11-02 16:25:03 +0800 |
commit | 9c73777f2268b5bf2622f893e2a3ba7d0f720572 (patch) | |
tree | f81b79f19b87f84b4429d329b3fc0f9ff7946060 /shell/e-shell-about-box.c | |
parent | 236c15d106b4e740d4e3996e0649334ca8e13876 (diff) | |
download | gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.gz gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.tar.zst gsoc2013-evolution-9c73777f2268b5bf2622f893e2a3ba7d0f720572.zip |
First big sync of my GNOME 2 porting work (incomplete, and still
pretty broken).
Weeeeee!
svn path=/trunk/; revision=18503
Diffstat (limited to 'shell/e-shell-about-box.c')
-rw-r--r-- | shell/e-shell-about-box.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index 1e102fa19f..22dd0a7829 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -145,6 +145,7 @@ timeout_callback (void *data) EShellAboutBoxPrivate *priv; GdkRectangle redraw_rect; GtkWidget *widget; + GdkFont *font; int line_height; int first_line; int y; @@ -155,7 +156,8 @@ timeout_callback (void *data) widget = GTK_WIDGET (about_box); - line_height = widget->style->font->ascent + widget->style->font->descent; + font = gtk_style_get_font (widget->style); + line_height = font->ascent + font->descent; if (priv->text_y_offset < TEXT_HEIGHT) { y = TEXT_Y_OFFSET + (TEXT_HEIGHT - priv->text_y_offset); @@ -181,9 +183,9 @@ timeout_callback (void *data) else line = _(priv->permuted_text[first_line + i]); - x = TEXT_X_OFFSET + (TEXT_WIDTH - gdk_string_width (widget->style->font, line)) / 2; + x = TEXT_X_OFFSET + (TEXT_WIDTH - gdk_string_width (font, line)) / 2; - gdk_draw_string (priv->pixmap, widget->style->font, priv->clipped_gc, x, y, line); + gdk_draw_string (priv->pixmap, font, priv->clipped_gc, x, y, line); y += line_height; } @@ -266,7 +268,7 @@ impl_realize (GtkWidget *widget) about_box = E_SHELL_ABOUT_BOX (widget); priv = about_box->priv; - background_pixbuf = gdk_pixbuf_new_from_file (IMAGE_PATH); + background_pixbuf = gdk_pixbuf_new_from_file (IMAGE_PATH, NULL); g_assert (background_pixbuf != NULL); g_assert (gdk_pixbuf_get_width (background_pixbuf) == WIDTH); g_assert (gdk_pixbuf_get_height (background_pixbuf) == HEIGHT); @@ -325,32 +327,22 @@ impl_unrealize (GtkWidget *widget) } } -static void -impl_draw (GtkWidget *widget, - GdkRectangle *area) -{ - EShellAboutBox *about_box; - EShellAboutBoxPrivate *priv; - - if (! GTK_WIDGET_DRAWABLE (widget)) - return; - - about_box = E_SHELL_ABOUT_BOX (widget); - priv = about_box->priv; - - gdk_draw_pixmap (widget->window, widget->style->black_gc, priv->pixmap, - area->x, area->y, - area->x, area->y, area->width, area->height); -} - static int impl_expose_event (GtkWidget *widget, GdkEventExpose *event) { + EShellAboutBoxPrivate *priv; + if (! GTK_WIDGET_DRAWABLE (widget)) return FALSE; - gtk_widget_draw (widget, &event->area); + priv = E_SHELL_ABOUT_BOX (widget)->priv; + + gdk_draw_pixmap (widget->window, widget->style->black_gc, + priv->pixmap, + event->area.x, event->area.y, + event->area.x, event->area.y, + event->area.width, event->area.height); return TRUE; } @@ -369,7 +361,6 @@ class_init (GtkObjectClass *object_class) widget_class->size_request = impl_size_request; widget_class->realize = impl_realize; widget_class->unrealize = impl_unrealize; - widget_class->draw = impl_draw; widget_class->expose_event = impl_expose_event; } |