From 9b38242f329843f8e5a5f92682fd78e1efe1e798 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 08 2022 06:50:06 +0000 Subject: import libtimezonemap-0.4.5.1-4.el8 --- diff --git a/SOURCES/0001-Remove-regions-from-the-map-2097833.patch b/SOURCES/0001-Remove-regions-from-the-map-2097833.patch new file mode 100644 index 0000000..23cee16 --- /dev/null +++ b/SOURCES/0001-Remove-regions-from-the-map-2097833.patch @@ -0,0 +1,4253 @@ +From c2b366b910a3815eea14679707c8bd7c7e3515d8 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Mon, 20 Jun 2022 15:14:56 +0200 +Subject: [PATCH] Remove regions from the map (#2097833) + +Resolves: rhbz#2097833 +--- + src/cc-timezone-map.c | 74 - + src/data/time_zones_countryInfo-orig.svg | 4122 +++++++++++++++++++++- + 2 files changed, 4121 insertions(+), 75 deletions(-) + +diff --git a/src/cc-timezone-map.c b/src/cc-timezone-map.c +index d7c99d5..e2b6c97 100644 +--- a/src/cc-timezone-map.c ++++ b/src/cc-timezone-map.c +@@ -228,71 +228,6 @@ cc_timezone_map_get_preferred_height (GtkWidget *widget, + *natural = 173; + } + +-/* Call whenever the allocation or offset changes */ +-static void +-render_highlight (CcTimezoneMap *cc) +-{ +- CcTimezoneMapPrivate *priv = cc->priv; +- GtkAllocation alloc; +- RsvgDimensionData svg_dimensions; +- gdouble scale_x, scale_y; +- cairo_surface_t *surface; +- cairo_t *cr; +- gchar *layer_name; +- gdouble *hash_key; +- +- /* The reference to the cairo_pattern_t object is held by highlight_table */ +- +- /* If no highlight is displayed, just unset the pointer */ +- if (!priv->show_offset) +- { +- if (priv->highlight) +- { +- priv->highlight = NULL; +- } +- +- return; +- } +- +- /* Check if the highlight has already been rendered */ +- priv->highlight = g_hash_table_lookup (priv->highlight_table, +- &priv->selected_offset); +- if (priv->highlight) +- return; +- +- layer_name = g_strdup_printf("#%c%g", +- priv->selected_offset > 0 ? 'p' : 'm', +- fabs(priv->selected_offset)); +- gtk_widget_get_allocation (GTK_WIDGET (cc), &alloc); +- +- /* Use the size of the background layer as the scale */ +- rsvg_handle_get_dimensions_sub (priv->map_svg, &svg_dimensions, "#background"); +- scale_x = (double)alloc.width / svg_dimensions.width; +- scale_y = (double)alloc.height / svg_dimensions.height; +- +- surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, +- alloc.width, +- alloc.height); +- cr = cairo_create (surface); +- +- cairo_scale (cr, scale_x, scale_y); +- rsvg_handle_render_cairo_sub (priv->map_svg, cr, layer_name); +- g_free(layer_name); +- cairo_surface_flush (surface); +- +- priv->highlight = cairo_pattern_create_for_surface (surface); +- +- cairo_surface_destroy (surface); +- cairo_destroy (cr); +- +- /* Save the pattern in the hash table */ +- hash_key = g_malloc (sizeof (gdouble)); +- *hash_key = priv->selected_offset; +- g_hash_table_insert (priv->highlight_table, +- hash_key, +- priv->highlight); +-} +- + /* Update the cached map patterns when the widget allocation changes */ + static void + cc_timezone_map_size_allocate (GtkWidget *widget, +@@ -333,7 +268,6 @@ cc_timezone_map_size_allocate (GtkWidget *widget, + + /* Invalidate the highlight cache and render the current one */ + g_hash_table_remove_all (priv->highlight_table); +- render_highlight (CC_TIMEZONE_MAP(widget)); + } + + static void +@@ -458,12 +392,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS + cairo_stroke(cr); + } + +- if (priv->highlight) +- { +- cairo_set_source (cr, priv->highlight); +- cairo_paint_with_alpha (cr, alpha); +- } +- + if (!priv->location) { + return TRUE; + } +@@ -606,7 +534,6 @@ set_location (CcTimezoneMap *map, + unsetenv("TZ"); + } + +- render_highlight (map); + gtk_widget_queue_draw (GTK_WIDGET (map)); + + +@@ -1051,6 +978,5 @@ void cc_timezone_map_set_selected_offset (CcTimezoneMap *map, gdouble offset) + map->priv->selected_offset = offset; + map->priv->show_offset = TRUE; + g_object_notify(G_OBJECT(map), "selected-offset"); +- render_highlight (map); + gtk_widget_queue_draw (GTK_WIDGET (map)); + } +diff --git a/src/data/time_zones_count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++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +2.36.1 + diff --git a/SOURCES/0001-Remove-regions-from-the-map-2100452.patch b/SOURCES/0001-Remove-regions-from-the-map-2100452.patch deleted file mode 100644 index 802a06c..0000000 --- a/SOURCES/0001-Remove-regions-from-the-map-2100452.patch +++ /dev/null @@ -1,4253 +0,0 @@ -From 5a3060281d29e4d97f6f3fec3c969e71520d9ba5 Mon Sep 17 00:00:00 2001 -From: Jiri Konecny -Date: Mon, 20 Jun 2022 15:14:56 +0200 -Subject: [PATCH] Remove regions from the map (#2100452) - -Resolves: rhbz#2100452 ---- - src/cc-timezone-map.c | 74 - - src/data/time_zones_countryInfo-orig.svg | 4122 +++++++++++++++++++++- - 2 files changed, 4121 insertions(+), 75 deletions(-) - -diff --git a/src/cc-timezone-map.c b/src/cc-timezone-map.c -index d7c99d5..e2b6c97 100644 ---- a/src/cc-timezone-map.c -+++ b/src/cc-timezone-map.c -@@ -228,71 +228,6 @@ cc_timezone_map_get_preferred_height (GtkWidget *widget, - *natural = 173; - } - --/* Call whenever the allocation or offset changes */ --static void --render_highlight (CcTimezoneMap *cc) --{ -- CcTimezoneMapPrivate *priv = cc->priv; -- GtkAllocation alloc; -- RsvgDimensionData svg_dimensions; -- gdouble scale_x, scale_y; -- cairo_surface_t *surface; -- cairo_t *cr; -- gchar *layer_name; -- gdouble *hash_key; -- -- /* The reference to the cairo_pattern_t object is held by highlight_table */ -- -- /* If no highlight is displayed, just unset the pointer */ -- if (!priv->show_offset) -- { -- if (priv->highlight) -- { -- priv->highlight = NULL; -- } -- -- return; -- } -- -- /* Check if the highlight has already been rendered */ -- priv->highlight = g_hash_table_lookup (priv->highlight_table, -- &priv->selected_offset); -- if (priv->highlight) -- return; -- -- layer_name = g_strdup_printf("#%c%g", -- priv->selected_offset > 0 ? 'p' : 'm', -- fabs(priv->selected_offset)); -- gtk_widget_get_allocation (GTK_WIDGET (cc), &alloc); -- -- /* Use the size of the background layer as the scale */ -- rsvg_handle_get_dimensions_sub (priv->map_svg, &svg_dimensions, "#background"); -- scale_x = (double)alloc.width / svg_dimensions.width; -- scale_y = (double)alloc.height / svg_dimensions.height; -- -- surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, -- alloc.width, -- alloc.height); -- cr = cairo_create (surface); -- -- cairo_scale (cr, scale_x, scale_y); -- rsvg_handle_render_cairo_sub (priv->map_svg, cr, layer_name); -- g_free(layer_name); -- cairo_surface_flush (surface); -- -- priv->highlight = cairo_pattern_create_for_surface (surface); -- -- cairo_surface_destroy (surface); -- cairo_destroy (cr); -- -- /* Save the pattern in the hash table */ -- hash_key = g_malloc (sizeof (gdouble)); -- *hash_key = priv->selected_offset; -- g_hash_table_insert (priv->highlight_table, -- hash_key, -- priv->highlight); --} -- - /* Update the cached map patterns when the widget allocation changes */ - static void - cc_timezone_map_size_allocate (GtkWidget *widget, -@@ -333,7 +268,6 @@ cc_timezone_map_size_allocate (GtkWidget *widget, - - /* Invalidate the highlight cache and render the current one */ - g_hash_table_remove_all (priv->highlight_table); -- render_highlight (CC_TIMEZONE_MAP(widget)); - } - - static void -@@ -458,12 +392,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS - cairo_stroke(cr); - } - -- if (priv->highlight) -- { -- cairo_set_source (cr, priv->highlight); -- cairo_paint_with_alpha (cr, alpha); -- } -- - if (!priv->location) { - return TRUE; - } -@@ -606,7 +534,6 @@ set_location (CcTimezoneMap *map, - unsetenv("TZ"); - } - -- render_highlight (map); - gtk_widget_queue_draw (GTK_WIDGET (map)); - - -@@ -1051,6 +978,5 @@ void cc_timezone_map_set_selected_offset (CcTimezoneMap *map, gdouble offset) - map->priv->selected_offset = offset; - map->priv->show_offset = TRUE; - g_object_notify(G_OBJECT(map), "selected-offset"); -- render_highlight (map); - gtk_widget_queue_draw (GTK_WIDGET (map)); - } -diff --git a/src/data/time_zones_countryInfo-orig.svg b/src/data/time_zones_countryInfo-orig.svg -index aa288a2..4be8a12 100644 ---- a/src/data/time_zones_countryInfo-orig.svg -+++ b/src/data/time_zones_countryInfo-orig.svg -@@ -1 +1,4121 @@ -- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+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-+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ --- -2.36.1 - diff --git a/SPECS/libtimezonemap.spec b/SPECS/libtimezonemap.spec index 6bbbb45..b96e807 100644 --- a/SPECS/libtimezonemap.spec +++ b/SPECS/libtimezonemap.spec @@ -1,6 +1,6 @@ Name: libtimezonemap Version: 0.4.5.1 -Release: 3%{?dist}.1 +Release: 4%{?dist} Summary: Time zone map widget for Gtk+ Group: System Environment/Libraries @@ -8,8 +8,8 @@ License: GPLv3 URL: https://launchpad.net/timezonemap Source0: https://github.com/dashea/timezonemap/archive/%{version}.tar.gz -# https://bugzilla.redhat.com/show_bug.cgi?id=2100452 -Patch0: 0001-Remove-regions-from-the-map-2100452.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2097833 +Patch0: 0001-Remove-regions-from-the-map-2097833.patch BuildRequires: glib2-devel >= 2.26 BuildRequires: gtk3-devel >= 3.1.4 @@ -67,9 +67,9 @@ rm -f %{buildroot}%{_libdir}/*.la %{_datadir}/glade/catalogs/TimezoneMap.xml %changelog -* Thu Jun 23 2022 Jiri Konecny - 0.4.5.1-3.1 +* Wed Jun 22 2022 Jiri Konecny - 0.4.5.1-4 - Remove regions from the map - Resolves: rhbz#2100452 + Resolves: rhbz#2097833 * Fri Feb 09 2018 Igor Gnatenko - 0.4.5.1-3 - Escape macros in %%changelog