[gnome-initial-setup/wip/carlosg/flat-timezone-map: 2/3] datetime: Drop timezone highlighting




commit 7670b1390a9f27acbd57938dbd235e608fc50763
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 17 16:20:18 2022 +0200

    datetime: Drop timezone highlighting
    
    In most situations it is sufficient with the hint bubble being
    displayed, or city name search, rely on these.

 .../pages/timezone/cc-timezone-map.c               |  42 -----------
 .../pages/timezone/data/timezone_-1.png            | Bin 8012 -> 0 bytes
 .../pages/timezone/data/timezone_-10.png           | Bin 7783 -> 0 bytes
 .../pages/timezone/data/timezone_-10_dim.png       | Bin 5139 -> 0 bytes
 .../pages/timezone/data/timezone_-11.png           | Bin 8347 -> 0 bytes
 .../pages/timezone/data/timezone_-11_dim.png       | Bin 4815 -> 0 bytes
 .../pages/timezone/data/timezone_-1_dim.png        | Bin 4953 -> 0 bytes
 .../pages/timezone/data/timezone_-2.png            | Bin 4333 -> 0 bytes
 .../pages/timezone/data/timezone_-2_dim.png        | Bin 2670 -> 0 bytes
 .../pages/timezone/data/timezone_-3.5.png          | Bin 740 -> 0 bytes
 .../pages/timezone/data/timezone_-3.5_dim.png      | Bin 995 -> 0 bytes
 .../pages/timezone/data/timezone_-3.png            | Bin 13615 -> 0 bytes
 .../pages/timezone/data/timezone_-3_dim.png        | Bin 8773 -> 0 bytes
 .../pages/timezone/data/timezone_-4.png            | Bin 16851 -> 0 bytes
 .../pages/timezone/data/timezone_-4_dim.png        | Bin 9785 -> 0 bytes
 .../pages/timezone/data/timezone_-5.5.png          | Bin 437 -> 0 bytes
 .../pages/timezone/data/timezone_-5.5_dim.png      | Bin 859 -> 0 bytes
 .../pages/timezone/data/timezone_-5.png            | Bin 19166 -> 0 bytes
 .../pages/timezone/data/timezone_-5_dim.png        | Bin 12224 -> 0 bytes
 .../pages/timezone/data/timezone_-6.png            | Bin 13764 -> 0 bytes
 .../pages/timezone/data/timezone_-6_dim.png        | Bin 8833 -> 0 bytes
 .../pages/timezone/data/timezone_-7.png            | Bin 11977 -> 0 bytes
 .../pages/timezone/data/timezone_-7_dim.png        | Bin 7868 -> 0 bytes
 .../pages/timezone/data/timezone_-8.png            | Bin 6801 -> 0 bytes
 .../pages/timezone/data/timezone_-8_dim.png        | Bin 4261 -> 0 bytes
 .../pages/timezone/data/timezone_-9.5.png          | Bin 437 -> 0 bytes
 .../pages/timezone/data/timezone_-9.5_dim.png      | Bin 859 -> 0 bytes
 .../pages/timezone/data/timezone_-9.png            | Bin 7908 -> 0 bytes
 .../pages/timezone/data/timezone_-9_dim.png        | Bin 4972 -> 0 bytes
 .../pages/timezone/data/timezone_0.png             | Bin 11074 -> 0 bytes
 .../pages/timezone/data/timezone_0_dim.png         | Bin 7074 -> 0 bytes
 .../pages/timezone/data/timezone_1.png             | Bin 15458 -> 0 bytes
 .../pages/timezone/data/timezone_10.5.png          | Bin 421 -> 0 bytes
 .../pages/timezone/data/timezone_10.5_dim.png      | Bin 844 -> 0 bytes
 .../pages/timezone/data/timezone_10.png            | Bin 12829 -> 0 bytes
 .../pages/timezone/data/timezone_10_dim.png        | Bin 8395 -> 0 bytes
 .../pages/timezone/data/timezone_11.5.png          | Bin 446 -> 0 bytes
 .../pages/timezone/data/timezone_11.5_dim.png      | Bin 868 -> 0 bytes
 .../pages/timezone/data/timezone_11.png            | Bin 12113 -> 0 bytes
 .../pages/timezone/data/timezone_11_dim.png        | Bin 6744 -> 0 bytes
 .../pages/timezone/data/timezone_12.75.png         | Bin 409 -> 0 bytes
 .../pages/timezone/data/timezone_12.75_dim.png     | Bin 846 -> 0 bytes
 .../pages/timezone/data/timezone_12.png            | Bin 7130 -> 0 bytes
 .../pages/timezone/data/timezone_12_dim.png        | Bin 3935 -> 0 bytes
 .../pages/timezone/data/timezone_13.png            | Bin 621 -> 0 bytes
 .../pages/timezone/data/timezone_13_dim.png        | Bin 876 -> 0 bytes
 .../pages/timezone/data/timezone_14.png            | Bin 7722 -> 0 bytes
 .../pages/timezone/data/timezone_14_dim.png        | Bin 4150 -> 0 bytes
 .../pages/timezone/data/timezone_1_dim.png         | Bin 10187 -> 0 bytes
 .../pages/timezone/data/timezone_2.png             | Bin 12854 -> 0 bytes
 .../pages/timezone/data/timezone_2_dim.png         | Bin 8709 -> 0 bytes
 .../pages/timezone/data/timezone_3.5.png           | Bin 2142 -> 0 bytes
 .../pages/timezone/data/timezone_3.5_dim.png       | Bin 1781 -> 0 bytes
 .../pages/timezone/data/timezone_3.png             | Bin 17475 -> 0 bytes
 .../pages/timezone/data/timezone_3_dim.png         | Bin 9877 -> 0 bytes
 .../pages/timezone/data/timezone_4.5.png           | Bin 1773 -> 0 bytes
 .../pages/timezone/data/timezone_4.5_dim.png       | Bin 1385 -> 0 bytes
 .../pages/timezone/data/timezone_4.png             | Bin 4954 -> 0 bytes
 .../pages/timezone/data/timezone_4_dim.png         | Bin 2754 -> 0 bytes
 .../pages/timezone/data/timezone_5.5.png           | Bin 5692 -> 0 bytes
 .../pages/timezone/data/timezone_5.5_dim.png       | Bin 3471 -> 0 bytes
 .../pages/timezone/data/timezone_5.75.png          | Bin 2885 -> 0 bytes
 .../pages/timezone/data/timezone_5.75_dim.png      | Bin 1596 -> 0 bytes
 .../pages/timezone/data/timezone_5.png             | Bin 14539 -> 0 bytes
 .../pages/timezone/data/timezone_5_dim.png         | Bin 8117 -> 0 bytes
 .../pages/timezone/data/timezone_6.5.png           | Bin 1609 -> 0 bytes
 .../pages/timezone/data/timezone_6.5_dim.png       | Bin 1675 -> 0 bytes
 .../pages/timezone/data/timezone_6.png             | Bin 7654 -> 0 bytes
 .../pages/timezone/data/timezone_6_dim.png         | Bin 4584 -> 0 bytes
 .../pages/timezone/data/timezone_7.png             | Bin 14412 -> 0 bytes
 .../pages/timezone/data/timezone_7_dim.png         | Bin 7972 -> 0 bytes
 .../pages/timezone/data/timezone_8.75.png          | Bin 13993 -> 0 bytes
 .../pages/timezone/data/timezone_8.75_dim.png      | Bin 7064 -> 0 bytes
 .../pages/timezone/data/timezone_8.png             | Bin 16050 -> 0 bytes
 .../pages/timezone/data/timezone_8_dim.png         | Bin 9378 -> 0 bytes
 .../pages/timezone/data/timezone_9.5.png           | Bin 1959 -> 0 bytes
 .../pages/timezone/data/timezone_9.5_dim.png       | Bin 1611 -> 0 bytes
 .../pages/timezone/data/timezone_9.png             | Bin 14366 -> 0 bytes
 .../pages/timezone/data/timezone_9_dim.png         | Bin 8362 -> 0 bytes
 .../pages/timezone/datetime.gresource.xml          |  78 ---------------------
 80 files changed, 120 deletions(-)
---
diff --git a/gnome-initial-setup/pages/timezone/cc-timezone-map.c 
b/gnome-initial-setup/pages/timezone/cc-timezone-map.c
index 4d10bf91..6b540ad6 100644
--- a/gnome-initial-setup/pages/timezone/cc-timezone-map.c
+++ b/gnome-initial-setup/pages/timezone/cc-timezone-map.c
@@ -50,8 +50,6 @@ struct _CcTimezoneMap
   GdkPixbuf *background;
   GdkPixbuf *pin;
 
-  gdouble selected_offset;
-
   TzDB *tzdb;
   TzLocation *location;
 
@@ -291,12 +289,8 @@ cc_timezone_map_draw (GtkWidget *widget,
                       cairo_t   *cr)
 {
   CcTimezoneMap *map = CC_TIMEZONE_MAP (widget);
-  g_autoptr(GdkPixbuf) orig_hilight = NULL;
   GtkAllocation alloc;
-  g_autofree gchar *file = NULL;
-  g_autoptr(GError) err = NULL;
   gdouble pointx, pointy;
-  char buf[16];
 
   gtk_widget_get_allocation (widget, &alloc);
 
@@ -304,39 +298,6 @@ cc_timezone_map_draw (GtkWidget *widget,
   gdk_cairo_set_source_pixbuf (cr, map->background, 0, 0);
   cairo_paint (cr);
 
-  /* paint hilight */
-  if (gtk_widget_is_sensitive (widget))
-    {
-      file = g_strdup_printf (DATETIME_RESOURCE_PATH "/timezone_%s.png",
-                              g_ascii_formatd (buf, sizeof (buf),
-                                               "%g", map->selected_offset));
-    }
-  else
-    {
-      file = g_strdup_printf (DATETIME_RESOURCE_PATH "/timezone_%s_dim.png",
-                              g_ascii_formatd (buf, sizeof (buf),
-                                               "%g", map->selected_offset));
-
-    }
-
-  orig_hilight = gdk_pixbuf_new_from_resource (file, &err);
-
-  if (!orig_hilight)
-    {
-      g_warning ("Could not load hilight: %s",
-                 (err) ? err->message : "Unknown Error");
-    }
-  else
-    {
-      g_autoptr(GdkPixbuf) hilight = NULL;
-
-      hilight = gdk_pixbuf_scale_simple (orig_hilight, alloc.width,
-                                         alloc.height, GDK_INTERP_BILINEAR);
-      gdk_cairo_set_source_pixbuf (cr, hilight, 0, 0);
-
-      cairo_paint (cr);
-    }
-
   if (map->location)
     {
       pointx = convert_longitude_to_x (map->location->longitude, alloc.width);
@@ -441,9 +402,6 @@ set_location (CcTimezoneMap *map,
 
   info = tz_info_from_location (map->location);
 
-  map->selected_offset = tz_location_get_utc_offset (map->location)
-    / (60.0*60.0) + ((info->daylight) ? -1.0 : 0.0);
-
   g_signal_emit (map, signals[LOCATION_CHANGED], 0, map->location);
 }
 
diff --git a/gnome-initial-setup/pages/timezone/datetime.gresource.xml 
b/gnome-initial-setup/pages/timezone/datetime.gresource.xml
index 144ce167..5a3dbb3e 100644
--- a/gnome-initial-setup/pages/timezone/datetime.gresource.xml
+++ b/gnome-initial-setup/pages/timezone/datetime.gresource.xml
@@ -5,83 +5,5 @@
     <file alias="bg.png">data/bg.png</file>
     <file alias="bg_dim.png">data/bg_dim.png</file>
     <file alias="pin.png">data/pin.png</file>
-    <file alias="timezone_0.png">data/timezone_0.png</file>
-    <file alias="timezone_0_dim.png">data/timezone_0_dim.png</file>
-    <file alias="timezone_-10.png">data/timezone_-10.png</file>
-    <file alias="timezone_-10_dim.png">data/timezone_-10_dim.png</file>
-    <file alias="timezone_10.png">data/timezone_10.png</file>
-    <file alias="timezone_10_dim.png">data/timezone_10_dim.png</file>
-    <file alias="timezone_10.5.png">data/timezone_10.5.png</file>
-    <file alias="timezone_10.5_dim.png">data/timezone_10.5_dim.png</file>
-    <file alias="timezone_-1.png">data/timezone_-1.png</file>
-    <file alias="timezone_-1_dim.png">data/timezone_-1_dim.png</file>
-    <file alias="timezone_1.png">data/timezone_1.png</file>
-    <file alias="timezone_1_dim.png">data/timezone_1_dim.png</file>
-    <file alias="timezone_-11.png">data/timezone_-11.png</file>
-    <file alias="timezone_-11_dim.png">data/timezone_-11_dim.png</file>
-    <file alias="timezone_11.png">data/timezone_11.png</file>
-    <file alias="timezone_11_dim.png">data/timezone_11_dim.png</file>
-    <file alias="timezone_11.5.png">data/timezone_11.5.png</file>
-    <file alias="timezone_11.5_dim.png">data/timezone_11.5_dim.png</file>
-    <file alias="timezone_12.png">data/timezone_12.png</file>
-    <file alias="timezone_12_dim.png">data/timezone_12_dim.png</file>
-    <file alias="timezone_12.75.png">data/timezone_12.75.png</file>
-    <file alias="timezone_12.75_dim.png">data/timezone_12.75_dim.png</file>
-    <file alias="timezone_13.png">data/timezone_13.png</file>
-    <file alias="timezone_13_dim.png">data/timezone_13_dim.png</file>
-    <file alias="timezone_14.png">data/timezone_14.png</file>
-    <file alias="timezone_14_dim.png">data/timezone_14_dim.png</file>
-    <file alias="timezone_-2.png">data/timezone_-2.png</file>
-    <file alias="timezone_-2_dim.png">data/timezone_-2_dim.png</file>
-    <file alias="timezone_2.png">data/timezone_2.png</file>
-    <file alias="timezone_2_dim.png">data/timezone_2_dim.png</file>
-    <file alias="timezone_-3.png">data/timezone_-3.png</file>
-    <file alias="timezone_-3_dim.png">data/timezone_-3_dim.png</file>
-    <file alias="timezone_3.png">data/timezone_3.png</file>
-    <file alias="timezone_3_dim.png">data/timezone_3_dim.png</file>
-    <file alias="timezone_-3.5.png">data/timezone_-3.5.png</file>
-    <file alias="timezone_-3.5_dim.png">data/timezone_-3.5_dim.png</file>
-    <file alias="timezone_3.5.png">data/timezone_3.5.png</file>
-    <file alias="timezone_3.5_dim.png">data/timezone_3.5_dim.png</file>
-    <file alias="timezone_-4.png">data/timezone_-4.png</file>
-    <file alias="timezone_-4_dim.png">data/timezone_-4_dim.png</file>
-    <file alias="timezone_4.png">data/timezone_4.png</file>
-    <file alias="timezone_4_dim.png">data/timezone_4_dim.png</file>
-    <file alias="timezone_4.5.png">data/timezone_4.5.png</file>
-    <file alias="timezone_4.5_dim.png">data/timezone_4.5_dim.png</file>
-    <file alias="timezone_-5.png">data/timezone_-5.png</file>
-    <file alias="timezone_-5_dim.png">data/timezone_-5_dim.png</file>
-    <file alias="timezone_5.png">data/timezone_5.png</file>
-    <file alias="timezone_5_dim.png">data/timezone_5_dim.png</file>
-    <file alias="timezone_-5.5.png">data/timezone_-5.5.png</file>
-    <file alias="timezone_-5.5_dim.png">data/timezone_-5.5_dim.png</file>
-    <file alias="timezone_5.5.png">data/timezone_5.5.png</file>
-    <file alias="timezone_5.5_dim.png">data/timezone_5.5_dim.png</file>
-    <file alias="timezone_5.75.png">data/timezone_5.75.png</file>
-    <file alias="timezone_5.75_dim.png">data/timezone_5.75_dim.png</file>
-    <file alias="timezone_-6.png">data/timezone_-6.png</file>
-    <file alias="timezone_-6_dim.png">data/timezone_-6_dim.png</file>
-    <file alias="timezone_6.png">data/timezone_6.png</file>
-    <file alias="timezone_6_dim.png">data/timezone_6_dim.png</file>
-    <file alias="timezone_6.5.png">data/timezone_6.5.png</file>
-    <file alias="timezone_6.5_dim.png">data/timezone_6.5_dim.png</file>
-    <file alias="timezone_-7.png">data/timezone_-7.png</file>
-    <file alias="timezone_-7_dim.png">data/timezone_-7_dim.png</file>
-    <file alias="timezone_7.png">data/timezone_7.png</file>
-    <file alias="timezone_7_dim.png">data/timezone_7_dim.png</file>
-    <file alias="timezone_-8.png">data/timezone_-8.png</file>
-    <file alias="timezone_-8_dim.png">data/timezone_-8_dim.png</file>
-    <file alias="timezone_8.png">data/timezone_8.png</file>
-    <file alias="timezone_8_dim.png">data/timezone_8_dim.png</file>
-    <file alias="timezone_8.75.png">data/timezone_8.75.png</file>
-    <file alias="timezone_8.75_dim.png">data/timezone_8.75_dim.png</file>
-    <file alias="timezone_-9.png">data/timezone_-9.png</file>
-    <file alias="timezone_-9_dim.png">data/timezone_-9_dim.png</file>
-    <file alias="timezone_9.png">data/timezone_9.png</file>
-    <file alias="timezone_9_dim.png">data/timezone_9_dim.png</file>
-    <file alias="timezone_-9.5.png">data/timezone_-9.5.png</file>
-    <file alias="timezone_-9.5_dim.png">data/timezone_-9.5_dim.png</file>
-    <file alias="timezone_9.5.png">data/timezone_9.5.png</file>
-    <file alias="timezone_9.5_dim.png">data/timezone_9.5_dim.png</file>
   </gresource>
 </gresources>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]