diff --git a/.gitignore b/.gitignore index c1dc41a..5d966fa 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ gnome-disk-utility-2.30.1.tar.bz2 /gnome-disk-utility-3.16.0.tar.xz /gnome-disk-utility-3.16.1.tar.xz /gnome-disk-utility-3.17.2.tar.xz +/gnome-disk-utility-3.17.3.tar.xz diff --git a/gnome-disk-utility-3.16.2-fix-benchmark-dialog-font-rendering.patch b/gnome-disk-utility-3.16.2-fix-benchmark-dialog-font-rendering.patch deleted file mode 100644 index 5d16b0a..0000000 --- a/gnome-disk-utility-3.16.2-fix-benchmark-dialog-font-rendering.patch +++ /dev/null @@ -1,138 +0,0 @@ -From e7fa99bbd9ab3d854e11cfa43813c84f37a0c597 Mon Sep 17 00:00:00 2001 -From: David King -Date: Tue, 2 Jun 2015 11:03:31 +0100 -Subject: [PATCH] Fix font rendering in benchmark dialog - -Use Pango to render text around the benchmark graph, rather than the toy -Cairo text API. - -https://bugzilla.gnome.org/show_bug.cgi?id=656864 ---- - src/disks/gdubenchmarkdialog.c | 61 +++++++++++++++++++++++++++--------------- - 1 file changed, 39 insertions(+), 22 deletions(-) - -diff --git a/src/disks/gdubenchmarkdialog.c b/src/disks/gdubenchmarkdialog.c -index 22fe98a..93f1987 100644 ---- a/src/disks/gdubenchmarkdialog.c -+++ b/src/disks/gdubenchmarkdialog.c -@@ -248,6 +248,10 @@ on_drawing_area_draw (GtkWidget *widget, - gdouble access_time_max = 0.0; - gdouble prev_x; - gdouble prev_y; -+ GtkStyleContext *context; -+ PangoFontDescription *font_desc; -+ GdkRGBA fg; -+ PangoLayout *layout; - - G_LOCK (bm_lock); - -@@ -342,9 +346,6 @@ on_drawing_area_draw (GtkWidget *widget, - width = allocation.width; - height = allocation.height; - -- cairo_select_font_face (cr, "sans", -- CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); -- cairo_set_font_size (cr, 8.0); - cairo_set_line_width (cr, 1.0); - - #if 0 -@@ -409,23 +410,35 @@ on_drawing_area_draw (GtkWidget *widget, - gh -= needed; - } - -+ context = gtk_widget_get_style_context (widget); -+ gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fg); -+ gtk_style_context_get (context, -+ GTK_STATE_FLAG_NORMAL, -+ GTK_STYLE_PROPERTY_FONT, -+ &font_desc, -+ NULL); -+ pango_font_description_set_size (font_desc, 0.8 * 8 * PANGO_SCALE); -+ layout = pango_cairo_create_layout (cr); -+ pango_layout_set_font_description (layout, font_desc); -+ pango_font_description_free (font_desc); -+ - /* draw x markers ("%d%%") + vertical grid */ - for (n = 0; n <= 10; n++) - { -- cairo_text_extents_t te; -+ PangoRectangle extents; - - x = gx + ceil (n * gw / 10.0); - y = gy + gh + x_marker_height/2.0; - - s = g_strdup_printf ("%u%%", n * 10); - -- cairo_text_extents (cr, s, &te); -- -+ pango_layout_set_text (layout, s, -1); -+ pango_layout_get_extents (layout, NULL, &extents); - cairo_move_to (cr, -- x - te.x_bearing - te.width/2, -- y - te.y_bearing - te.height/2); -- cairo_set_source_rgb (cr, 0, 0, 0); -- cairo_show_text (cr, s); -+ x - extents.width/PANGO_SCALE/2, -+ y - extents.height/PANGO_SCALE/2); -+ gdk_cairo_set_source_rgba (cr, &fg); -+ pango_cairo_show_layout (cr, layout); - - g_free (s); - } -@@ -433,37 +446,41 @@ on_drawing_area_draw (GtkWidget *widget, - /* draw left y markers ("%d MB/s") */ - for (n = 0; n <= num_y_markers; n++) - { -- cairo_text_extents_t te; -+ PangoRectangle extents; - - x = gx/2.0; - y = gy + gh - gh * n / num_y_markers; - - s = y_left_markers[n]; -- cairo_text_extents (cr, s, &te); -+ pango_layout_set_text (layout, s, -1); -+ pango_layout_get_extents (layout, NULL, &extents); - cairo_move_to (cr, -- x - te.x_bearing - te.width/2, -- y - te.y_bearing - te.height/2); -- cairo_set_source_rgb (cr, 0, 0, 0); -- cairo_show_text (cr, s); -+ x - extents.width/PANGO_SCALE/2, -+ y - extents.height/PANGO_SCALE/2); -+ gdk_cairo_set_source_rgba (cr, &fg); -+ pango_cairo_show_layout (cr, layout); - } - - /* draw right y markers ("%d ms") */ - for (n = 0; n <= num_y_markers; n++) - { -- cairo_text_extents_t te; -+ PangoRectangle extents; - - x = gx + gw + (width - (gx + gw))/2.0; - y = gy + gh - gh * n / num_y_markers; - - s = y_right_markers[n]; -- cairo_text_extents (cr, s, &te); -+ pango_layout_set_text (layout, s, -1); -+ pango_layout_get_extents (layout, NULL, &extents); - cairo_move_to (cr, -- x - te.x_bearing - te.width/2, -- y - te.y_bearing - te.height/2); -- cairo_set_source_rgb (cr, 0, 0, 0); -- cairo_show_text (cr, s); -+ x - extents.width/PANGO_SCALE/2, -+ y - extents.height/PANGO_SCALE/2); -+ gdk_cairo_set_source_rgba (cr, &fg); -+ pango_cairo_show_layout (cr, layout); - } - -+ g_object_unref (layout); -+ - /* fill graph area */ - cairo_set_source_rgb (cr, 1, 1, 1); - cairo_rectangle (cr, gx + 0.5, gy + 0.5, gw, gh); --- -2.4.2 - diff --git a/gnome-disk-utility.spec b/gnome-disk-utility.spec index 4d98481..55e27bf 100644 --- a/gnome-disk-utility.spec +++ b/gnome-disk-utility.spec @@ -4,16 +4,14 @@ %define enable_autoreconf 0 Name: gnome-disk-utility -Version: 3.17.2 -Release: 3%{?dist} +Version: 3.17.3 +Release: 1%{?dist} Summary: Disks Group: Applications/System License: GPLv2+ URL: https://git.gnome.org/browse/gnome-disk-utility Source0: https://download.gnome.org/sources/%{name}/3.17/%{name}-%{version}.tar.xz -# https://bugzilla.redhat.com/show_bug.cgi?id=598277 -Patch0: gnome-disk-utility-3.16.2-fix-benchmark-dialog-font-rendering.patch BuildRequires: /usr/bin/appstream-util BuildRequires: desktop-file-utils @@ -69,7 +67,7 @@ rm -f %{buildroot}%{_libdir}/gnome-settings-daemon-3.0/*.a %check -appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/gnome-disks.appdata.xml +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/org.gnome.DiskUtility.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop @@ -97,7 +95,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %license COPYING %{_bindir}/gnome-disks %{_bindir}/gnome-disk-image-mounter -%{_datadir}/appdata/gnome-disks.appdata.xml +%{_datadir}/appdata/org.gnome.DiskUtility.appdata.xml %{_datadir}/applications/org.gnome.DiskUtility.desktop %{_datadir}/applications/gnome-disk-image-mounter.desktop %{_datadir}/applications/gnome-disk-image-writer.desktop @@ -111,6 +109,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jun 21 2015 David King - 3.17.3-1 +- Update to 3.17.3 + * Wed Jun 17 2015 Fedora Release Engineering - 3.17.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 5947616..9c86238 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d49b7594dc85f2c969299f39e59a8d4 gnome-disk-utility-3.17.2.tar.xz +7360fdaa7e8e303748dff0ec5fac5220 gnome-disk-utility-3.17.3.tar.xz