[cinnamon] update to 2.2.6

leigh123linux leigh123linux at fedoraproject.org
Sat May 10 16:45:25 UTC 2014


commit dc87662f1159081901af41182240459cddfc6dd3
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Sat May 10 17:45:42 2014 +0100

    update to 2.2.6

 .gitignore                                         |    1 +
 ...hen-lowering-font-scale-below-1.0-in-a-no.patch |  130 ++++++++++++++++++++
 cinnamon.spec                                      |    7 +-
 sources                                            |    2 +-
 4 files changed, 138 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e3b9cac..21cbd8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,4 @@
 /Cinnamon-2.2.3.tar.gz
 /Cinnamon-2.2.4.tar.gz
 /Cinnamon-2.2.5.tar.gz
+/Cinnamon-2.2.6.tar.gz
diff --git a/0001-Fix-crash-when-lowering-font-scale-below-1.0-in-a-no.patch b/0001-Fix-crash-when-lowering-font-scale-below-1.0-in-a-no.patch
new file mode 100644
index 0000000..4064559
--- /dev/null
+++ b/0001-Fix-crash-when-lowering-font-scale-below-1.0-in-a-no.patch
@@ -0,0 +1,130 @@
+From 16232cc6fd1dd9fadd3524960870cdaeb32b1b58 Mon Sep 17 00:00:00 2001
+From: Michael Webster <miketwebster at gmail.com>
+Date: Sat, 10 May 2014 12:14:26 -0400
+Subject: [PATCH 1/1] Fix crash when lowering font scale below 1.0 in a normal
+ dpi display environment.
+
+Fixes #3134
+---
+ data/org.cinnamon.gschema.xml.in |  7 +++++++
+ src/cinnamon-global.c            |  1 +
+ src/st/st-texture-cache.c        | 32 +++++++++++++++++++++++---------
+ 3 files changed, 31 insertions(+), 9 deletions(-)
+
+diff --git a/data/org.cinnamon.gschema.xml.in b/data/org.cinnamon.gschema.xml.in
+index d81183c..c0f12a7 100644
+--- a/data/org.cinnamon.gschema.xml.in
++++ b/data/org.cinnamon.gschema.xml.in
+@@ -563,6 +563,13 @@
+       </_description>
+     </key>
+ 
++    <key type="i" name="active-display-scale">
++      <range min="1" max="4" />
++      <default>1</default>
++      <summary>Utility read-only setting used by st library</summary>
++      <description>Current scale factor</description>
++    </key>
++
+   </schema>
+  
+   <schema id="org.cinnamon.theme" path="/org/cinnamon/theme/"
+diff --git a/src/cinnamon-global.c b/src/cinnamon-global.c
+index fd649fd..824fd25 100644
+--- a/src/cinnamon-global.c
++++ b/src/cinnamon-global.c
+@@ -1005,6 +1005,7 @@ update_scale_factor (GtkSettings *settings,
+ 
+     if (scale != global->ui_scale) {
+         global->ui_scale = scale;
++        g_settings_set_int (global->settings, "active-display-scale", scale);
+         g_signal_emit_by_name (global, "scale-changed");
+     }
+   }
+diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
+index c745c81..21e2b46 100644
+--- a/src/st/st-texture-cache.c
++++ b/src/st/st-texture-cache.c
+@@ -33,6 +33,8 @@
+ #define CACHE_PREFIX_RAW_CHECKSUM "raw-checksum:"
+ #define CACHE_PREFIX_COMPRESSED_CHECKSUM "compressed-checksum:"
+ 
++static int active_scale = 1;
++
+ struct _StTextureCachePrivate
+ {
+   GtkIconTheme *icon_theme;
+@@ -46,6 +48,8 @@ struct _StTextureCachePrivate
+   /* File monitors to evict cache data on changes */
+   GHashTable *file_monitors; /* char * -> GFileMonitor * */
+ 
++  GSettings *settings;
++
+   double scale;
+ };
+ 
+@@ -139,13 +143,15 @@ on_icon_theme_changed (GtkIconTheme   *icon_theme,
+ }
+ 
+ static void
+-update_scale_factor (GtkSettings *settings,
+-                     GParamSpec *pspec,
++update_scale_factor (GSettings *settings,
++                     gchar *key,
+                      gpointer data)
+ {
+   StTextureCache *cache = ST_TEXTURE_CACHE (data);
+ 
+-  cache->priv->scale = clutter_backend_get_resolution (clutter_get_default_backend ()) / 96.0;
++  cache->priv->scale = g_settings_get_int (settings, key);
++
++  active_scale = cache->priv->scale;
+ 
+   on_icon_theme_changed (cache->priv->icon_theme, cache);
+ }
+@@ -166,10 +172,12 @@ st_texture_cache_init (StTextureCache *self)
+   self->priv->file_monitors = g_hash_table_new_full (g_str_hash, g_str_equal,
+                                                      g_object_unref, g_object_unref);
+ 
+-  g_signal_connect (gtk_settings_get_default (), "notify::gtk-xft-dpi",
++  self->priv->settings = g_settings_new ("org.cinnamon");
++
++  g_signal_connect (self->priv->settings, "active-display-scale",
+                     G_CALLBACK (update_scale_factor), self);
+ 
+-  update_scale_factor (gtk_settings_get_default (), NULL, self);
++  update_scale_factor (self->priv->settings, "active-display-scale", self);
+ }
+ 
+ static void
+@@ -185,6 +193,14 @@ st_texture_cache_dispose (GObject *object)
+       self->priv->icon_theme = NULL;
+     }
+ 
++  if (self->priv->settings)
++    {
++      g_signal_handlers_disconnect_by_func (self->priv->settings,
++                                            (gpointer) update_scale_factor, self);
++      g_object_unref (self->priv->settings);
++      self->priv->settings = NULL;
++    }
++
+   g_clear_pointer (&self->priv->keyed_cache, g_hash_table_destroy);
+   g_clear_pointer (&self->priv->outstanding_requests, g_hash_table_destroy);
+   g_clear_pointer (&self->priv->file_monitors, g_hash_table_destroy);
+@@ -343,10 +359,8 @@ on_image_size_prepared (GdkPixbufLoader *pixbuf_loader,
+     final_height = scaled_height;
+   }
+ 
+-  double scale = clutter_backend_get_resolution (clutter_get_default_backend ()) / 96.0;
+-
+-  final_width = (int)((double) final_width * scale);
+-  final_height = (int)((double) final_height * scale);  
++  final_width = (int)((double) final_width * active_scale);
++  final_height = (int)((double) final_height * active_scale);
+   gdk_pixbuf_loader_set_size (pixbuf_loader, final_width, final_height);
+ }
+ 
+-- 
+1.9.0
+
diff --git a/cinnamon.spec b/cinnamon.spec
index 77d4980..a6bea24 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -1,7 +1,7 @@
 #global _internal_version  8a53cfb
 
 Name:           cinnamon
-Version:        2.2.5
+Version:        2.2.6
 Release:        1%{?dist}
 Summary:        Window management and application launching for GNOME
 License:        GPLv2+ and LGPLv2+
@@ -29,6 +29,8 @@ Patch4:         upower_calender_fix.patch
 Patch5:         remove_bluetootoh.patch
 %endif
 Patch6:         set_wheel.patch
+# https://github.com/linuxmint/Cinnamon/commit/16232cc6fd1dd9fadd3524960870cdaeb32b1b58
+Patch7:         0001-Fix-crash-when-lowering-font-scale-below-1.0-in-a-no.patch
 
 %global clutter_version 1.12.2
 %global cjs_version 2.2.0
@@ -239,6 +241,9 @@ fi
 %{_mandir}/man1/*
 
 %changelog
+* Sat May 10 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.6-1
+- update to 2.2.6
+
 * Sat May 03 2014 Leigh Scott <leigh123linux at googlemail.com> - 2.2.5-1
 - update to 2.2.5
 - validate all the cinnamon-settings desktop files
diff --git a/sources b/sources
index 7f6d25b..f980ece 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5f7885dcfae8487ef0262d790eb9ea5c  Cinnamon-2.2.5.tar.gz
+45055dc21105c9bc1a11bc9a2d68aef6  Cinnamon-2.2.6.tar.gz


More information about the scm-commits mailing list