Hello community, here is the log from the commit of package cinnamon for openSUSE:Factory checked in at 2016-06-02 09:39:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon (Old) and /work/SRC/openSUSE:Factory/.cinnamon.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon" Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon/cinnamon.changes 2016-05-29 03:12:54.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.cinnamon.new/cinnamon.changes 2016-06-02 09:39:50.000000000 +0200 @@ -1,0 +2,10 @@ +Wed Jun 1 12:43:15 UTC 2016 - [email protected] + +- Update to version 3.0.5: + * cinnamon-settings: Remove hard-coded theming for the main + cinnamon-settings icon view. + * Background settings: Apply EXIF rotations to thumbnails. + * cinnamon-util.c: cinnamon_util_get_icon_for_uri.c – use a + custom icon if one is set in metadata (via file manager). + +------------------------------------------------------------------- Old: ---- cinnamon-3.0.4.tar.gz New: ---- cinnamon-3.0.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon.spec ++++++ --- /var/tmp/diff_new_pack.Fq5BiN/_old 2016-06-02 09:39:51.000000000 +0200 +++ /var/tmp/diff_new_pack.Fq5BiN/_new 2016-06-02 09:39:51.000000000 +0200 @@ -21,7 +21,7 @@ %define _name Cinnamon %define _version 3.0.0 Name: cinnamon -Version: 3.0.4 +Version: 3.0.5 Release: 0 Summary: GNU/Linux Desktop featuring a traditional layout License: GPL-2.0+ and LGPL-2.1 ++++++ cinnamon-3.0.4.tar.gz -> cinnamon-3.0.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cinnamon-3.0.4/configure.ac new/Cinnamon-3.0.5/configure.ac --- old/Cinnamon-3.0.4/configure.ac 2016-05-23 13:52:15.000000000 +0200 +++ new/Cinnamon-3.0.5/configure.ac 2016-05-31 10:55:21.000000000 +0200 @@ -1,5 +1,5 @@ AC_PREREQ(2.63) -AC_INIT([cinnamon],[3.0.4],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon]) +AC_INIT([cinnamon],[3.0.5],[https://github.com/linuxmint/Cinnamon/issues],[cinnamon]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/cinnamon-global.c]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cinnamon-3.0.4/debian/changelog new/Cinnamon-3.0.5/debian/changelog --- old/Cinnamon-3.0.4/debian/changelog 2016-05-23 13:52:15.000000000 +0200 +++ new/Cinnamon-3.0.5/debian/changelog 2016-05-31 10:55:21.000000000 +0200 @@ -1,3 +1,16 @@ +cinnamon (3.0.5) sarah; urgency=medium + + [ JosephMcc ] + * cinnamon-settings: Remove hard-coded theming for the main cinnamon-settings icon view + + [ Clement Lefebvre ] + * Background settings: Apply EXIF rotations to thumbnails + + [ Michael Webster ] + * cinnamon-util.c: cinnamon_util_get_icon_for_uri.c - use a custom icon if one is set in metadata (via file manager). + + -- Clement Lefebvre <[email protected]> Tue, 31 May 2016 09:54:44 +0100 + cinnamon (3.0.4) sarah; urgency=medium [ Clement Lefebvre ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cinnamon-3.0.4/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py new/Cinnamon-3.0.5/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py --- old/Cinnamon-3.0.4/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py 2016-05-23 13:52:15.000000000 +0200 +++ new/Cinnamon-3.0.5/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py 2016-05-31 10:55:21.000000000 +0200 @@ -194,6 +194,9 @@ self.header_stack.set_transition_duration(150) self.side_view_container = self.builder.get_object("category_box") self.side_view_sw = self.builder.get_object("side_view_sw") + context = self.side_view_sw.get_style_context() + context.add_class("cs-category-view") + context.add_class("view") self.side_view_sw.show_all() self.content_box = self.builder.get_object("content_box") self.content_box_sw = self.builder.get_object("content_box_sw") @@ -439,15 +442,6 @@ area.add_attribute(text_renderer, "text", 0) - css_provider = Gtk.CssProvider() - css_provider.load_from_data("GtkIconView { \ - background-color: transparent; \ - } \ - GtkIconView.view.cell:selected { \ - background-color: @selected_bg_color; \ - }") - c = widget.get_style_context() - c.add_provider(css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) self.side_view[category["id"]] = widget self.side_view_container.pack_start(self.side_view[category["id"]], False, False, 0) self.first_category_done = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cinnamon-3.0.4/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py new/Cinnamon-3.0.5/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py --- old/Cinnamon-3.0.4/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py 2016-05-23 13:52:15.000000000 +0200 +++ new/Cinnamon-3.0.5/files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py 2016-05-31 10:55:21.000000000 +0200 @@ -52,6 +52,48 @@ return subprocess.check_output(["file", "-bi", filename]).split(";")[0] +# EXIF utility functions (source: http://stackoverflow.com/questions/4228530/pil-thumbnail-is-rotating-my-image) +def flip_horizontal(im): return im.transpose(Image.FLIP_LEFT_RIGHT) +def flip_vertical(im): return im.transpose(Image.FLIP_TOP_BOTTOM) +def rotate_180(im): return im.transpose(Image.ROTATE_180) +def rotate_90(im): return im.transpose(Image.ROTATE_90) +def rotate_270(im): return im.transpose(Image.ROTATE_270) +def transpose(im): return rotate_90(flip_horizontal(im)) +def transverse(im): return rotate_90(flip_vertical(im)) +orientation_funcs = [None, + lambda x: x, + flip_horizontal, + rotate_180, + flip_vertical, + transpose, + rotate_270, + transverse, + rotate_90 + ] +def apply_orientation(im): + """ + Extract the oritentation EXIF tag from the image, which should be a PIL Image instance, + and if there is an orientation tag that would rotate the image, apply that rotation to + the Image instance given to do an in-place rotation. + + :param Image im: Image instance to inspect + :return: A possibly transposed image instance + """ + + try: + kOrientationEXIFTag = 0x0112 + if hasattr(im, '_getexif'): # only present in JPEGs + e = im._getexif() # returns None if no EXIF data + if e is not None: + #log.info('EXIF data found: %r', e) + orientation = e[kOrientationEXIFTag] + f = orientation_funcs[orientation] + return f(im) + except: + # We'd be here with an invalid orientation value or some random error? + pass # log.exception("Error applying EXIF Orientation tag") + return im + class Module: name = "backgrounds" category = "appear" @@ -523,6 +565,7 @@ os.unlink(tmp_filename) else: img = Image.open(filename) + img = apply_orientation(img) (width, height) = img.size if img.mode != 'RGB': img = img.convert('RGB') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cinnamon-3.0.4/src/cinnamon-util.c new/Cinnamon-3.0.5/src/cinnamon-util.c --- old/Cinnamon-3.0.4/src/cinnamon-util.c 2016-05-23 13:52:15.000000000 +0200 +++ new/Cinnamon-3.0.5/src/cinnamon-util.c 2016-05-31 10:55:21.000000000 +0200 @@ -363,16 +363,32 @@ file = root; } - info = g_file_query_info (file, "standard::icon", G_FILE_QUERY_INFO_NONE, + info = g_file_query_info (file, "standard::icon,metadata::custom-icon", G_FILE_QUERY_INFO_NONE, NULL, NULL); g_object_unref (file); if (!info) return g_themed_icon_new ("gtk-file"); - retval = g_file_info_get_icon (info); - if (retval) - g_object_ref (retval); + const char *custom_icon = g_file_info_get_attribute_string (info, "metadata::custom-icon"); + + if (custom_icon) + { + GFile *icon_file = g_file_new_for_uri (custom_icon); + + retval = g_file_icon_new (icon_file); + + g_object_unref (icon_file); + } + + if (!retval) + { + retval = g_file_info_get_icon (info); + + if (retval) + g_object_ref (retval); + } + g_object_unref (info); if (retval)
