updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / gimp-studio / gimp-splash-giniu-fix-20100209.diff
blob754d6398aaf8d269b1a9290c32210154c458ddec
1 --- app/gui/splash.c.orig 2010-02-09 20:01:25.000000000 +0100
2 +++ app/gui/splash.c 2010-02-09 20:41:11.000000000 +0100
3 @@ -37,6 +37,8 @@
5 /* #define STARTUP_TIMER 1 */
7 +static const gchar const *version_text = "Version PKGVER (Gimp GIMPVER)";
8 +static const gint version_correction = VERT_CORRECTION;
10 typedef struct
12 @@ -46,6 +48,9 @@
13 gint height;
14 GtkWidget *progress;
15 GdkGC *gc;
16 + PangoLayout *version;
17 + gint version_x;
18 + gint version_y;
19 PangoLayout *upper;
20 gint upper_x;
21 gint upper_y;
22 @@ -157,6 +162,7 @@
23 gtk_widget_set_size_request (splash->area, splash->width, splash->height);
25 /* create the pango layouts */
26 + splash->version = gtk_widget_create_pango_layout (splash->area, "");
27 splash->upper = gtk_widget_create_pango_layout (splash->area, "");
28 splash->lower = gtk_widget_create_pango_layout (splash->area, "");
29 gimp_pango_layout_set_scale (splash->lower, PANGO_SCALE_SMALL);
30 @@ -212,6 +218,7 @@
31 gtk_widget_destroy (splash->window);
33 g_object_unref (splash->gc);
34 + g_object_unref (splash->version);
35 g_object_unref (splash->upper);
36 g_object_unref (splash->lower);
38 @@ -266,6 +273,9 @@
39 gdk_gc_set_clip_region (splash->gc, event->region);
41 gdk_draw_layout (widget->window, splash->gc,
42 + splash->version_x, splash->version_y, splash->version);
44 + gdk_draw_layout (widget->window, splash->gc,
45 splash->upper_x, splash->upper_y, splash->upper);
47 gdk_draw_layout (widget->window, splash->gc,
48 @@ -284,6 +294,20 @@
49 PangoRectangle ink;
50 PangoRectangle logical;
52 + pango_layout_get_pixel_extents (splash->version, &ink, NULL);
54 + if (area)
55 + splash_rectangle_union (area, &ink, splash->version_x, splash->version_y);
57 + pango_layout_set_text (splash->version, version_text, -1);
58 + pango_layout_get_pixel_extents (splash->version, &ink, &logical);
60 + splash->version_x = (splash->width - logical.width) / 2;
61 + splash->version_y = splash->height/2 + version_correction;
63 + if (area)
64 + splash_rectangle_union (area, &ink, splash->version_x, splash->version_y);
66 if (text1)
68 pango_layout_get_pixel_extents (splash->upper, &ink, NULL);