Hello community,
here is the log from the commit of package cinnamon-screensaver for openSUSE:Factory checked in at 2016-06-02 09:39:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-screensaver (Old)
and /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon-screensaver"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cinnamon-screensaver/cinnamon-screensaver.changes 2016-04-28 17:01:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new/cinnamon-screensaver.changes 2016-06-02 09:39:54.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Jun 1 12:43:15 UTC 2016 - sor.alexei@meowr.ru
+
+- Update to version 3.0.1:
+ * gs-lock-plug: Remove the hardcoded text colours.
+ * Fix unlock dialog display in hidpi.
+ * gs-window-x11.c: Fix a couple of compiler warnings.
+ * gs-lock-plug.c: Look at AccountsService for user pic if .face
+ is not found. Simplify some of the code – pixbuf loaders have
+ built-in file checking.
+
+-------------------------------------------------------------------
Old:
----
cinnamon-screensaver-3.0.0.tar.gz
New:
----
cinnamon-screensaver-3.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cinnamon-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.sc1EZ7/_old 2016-06-02 09:39:54.000000000 +0200
+++ /var/tmp/diff_new_pack.sc1EZ7/_new 2016-06-02 09:39:54.000000000 +0200
@@ -17,7 +17,7 @@
Name: cinnamon-screensaver
-Version: 3.0.0
+Version: 3.0.1
Release: 0
Summary: Cinnamon screensaver and locker
License: GPL-2.0+
++++++ cinnamon-screensaver-3.0.0.tar.gz -> cinnamon-screensaver-3.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/configure.ac new/cinnamon-screensaver-3.0.1/configure.ac
--- old/cinnamon-screensaver-3.0.0/configure.ac 2016-04-23 17:15:11.000000000 +0200
+++ new/cinnamon-screensaver-3.0.1/configure.ac 2016-05-30 17:09:04.000000000 +0200
@@ -2,7 +2,7 @@
AC_PREREQ(2.60)
AC_INIT([cinnamon-screensaver],
- [3.0.0],
+ [3.0.1],
[https://github.com/linuxmint/cinnamon-screensaver/issues])
AC_CONFIG_SRCDIR(src/cinnamon-screensaver.c)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/debian/changelog new/cinnamon-screensaver-3.0.1/debian/changelog
--- old/cinnamon-screensaver-3.0.0/debian/changelog 2016-04-23 17:15:11.000000000 +0200
+++ new/cinnamon-screensaver-3.0.1/debian/changelog 2016-05-30 17:09:04.000000000 +0200
@@ -1,3 +1,15 @@
+cinnamon-screensaver (3.0.1) sarah; urgency=medium
+
+ [ JosephMcc ]
+ * gs-lock-plug: Remove the hardcoded text colors
+
+ [ Michael Webster ]
+ * Fix unlock dialog display in hidpi.
+ * gs-window-x11.c: fix a couple compiler warnings, clean up.
+ * gs-lock-plug.c: look at AccountsService for user pic if .face is not found. Simplify some of the code - pixbuf loaders have built-in file checking.
+
+ -- Clement Lefebvre Mon, 30 May 2016 16:08:20 +0100
+
cinnamon-screensaver (3.0.0) sarah; urgency=medium
[ monsta ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/src/Makefile.am new/cinnamon-screensaver-3.0.1/src/Makefile.am
--- old/cinnamon-screensaver-3.0.0/src/Makefile.am 2016-04-23 17:15:11.000000000 +0200
+++ new/cinnamon-screensaver-3.0.1/src/Makefile.am 2016-05-30 17:09:04.000000000 +0200
@@ -111,6 +111,8 @@
test_window_SOURCES = \
test-window.c \
+ gs-lock-socket.c \
+ gs-lock-socket.h \
gs-window.h \
gs-window-x11.c \
gs-grab-x11.c \
@@ -172,6 +174,8 @@
gs-watcher.h \
gs-listener-dbus.c \
gs-listener-dbus.h \
+ gs-lock-socket.c \
+ gs-lock-socket.h \
gs-manager.c \
gs-manager.h \
gs-window-x11.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/src/gs-lock-plug.c new/cinnamon-screensaver-3.0.1/src/gs-lock-plug.c
--- old/cinnamon-screensaver-3.0.0/src/gs-lock-plug.c 2016-04-23 17:15:11.000000000 +0200
+++ new/cinnamon-screensaver-3.0.1/src/gs-lock-plug.c 2016-05-30 17:09:04.000000000 +0200
@@ -829,7 +829,7 @@
g_get_user_name ()),
G_VARIANT_TYPE ("(o)"),
G_DBUS_CALL_FLAGS_NONE,
- -1,
+ 1,
NULL,
&error);
if (error != NULL) {
@@ -852,7 +852,7 @@
"IconFile"),
G_VARIANT_TYPE ("(v)"),
G_DBUS_CALL_FLAGS_NONE,
- -1,
+ 1,
NULL,
&error);
g_variant_unref (find_user_by_name_reply);
@@ -893,86 +893,29 @@
return pixbuf;
}
-static gboolean
-check_user_file (const gchar *filename,
- uid_t user,
- gssize max_file_size,
- gboolean relax_group,
- gboolean relax_other)
+static void
+set_face_image (GSLockPlug *plug)
{
- struct stat fileinfo;
-
- if (max_file_size < 0) {
- max_file_size = G_MAXSIZE;
- }
-
- /* Exists/Readable? */
- if (g_stat (filename, &fileinfo) < 0) {
- return FALSE;
- }
-
- /* Is a regular file */
- if (G_UNLIKELY (!S_ISREG (fileinfo.st_mode))) {
- return FALSE;
- }
-
- /* Owned by user? */
- if (G_UNLIKELY (fileinfo.st_uid != user)) {
- return FALSE;
- }
-
- /* Group not writable or relax_group? */
- if (G_UNLIKELY ((fileinfo.st_mode & S_IWGRP) == S_IWGRP && !relax_group)) {
- return FALSE;
- }
-
- /* Other not writable or relax_other? */
- if (G_UNLIKELY ((fileinfo.st_mode & S_IWOTH) == S_IWOTH && !relax_other)) {
- return FALSE;
- }
+ GdkPixbuf *pixbuf = NULL;
+ char *path;
- /* Size is ok? */
- if (G_UNLIKELY (fileinfo.st_size > max_file_size)) {
- return FALSE;
- }
+ path = g_build_filename (g_get_home_dir (), ".face", NULL);
- return TRUE;
-}
+ pixbuf = gdk_pixbuf_new_from_file_at_size (path, 64, 64, NULL);
-
-static gboolean
-set_face_image (GSLockPlug *plug)
-{
- GdkPixbuf *pixbuf;
- const char *homedir;
- char *path;
- int icon_size = 64;
- gsize user_max_file = 65536;
- uid_t uid;
-
- homedir = g_get_home_dir ();
- uid = getuid ();
-
- path = g_build_filename (homedir, ".face", NULL);
-
- pixbuf = NULL;
- if (check_user_file (path, uid, user_max_file, 0, 0)) {
- pixbuf = gdk_pixbuf_new_from_file_at_size (path,
- icon_size,
- icon_size,
- NULL);
- }
g_free (path);
- if (pixbuf == NULL) {
- return FALSE;
- }
+ if (pixbuf == NULL)
+ pixbuf = get_pixbuf_of_user_icon (plug);
+
+ if (pixbuf == NULL)
+ return;
image_set_from_pixbuf (GTK_IMAGE (plug->priv->auth_face_image), pixbuf);
g_object_unref (pixbuf);
- return TRUE;
+ return;
}
static void
@@ -991,9 +934,7 @@
gtk_window_set_opacity (GTK_WINDOW (plug), 0.1);
- if (plug->priv->auth_face_image) {
- set_face_image (plug);
- }
+ set_face_image (plug);
kbd_lock_mode_update (plug, get_kbd_lock_mode ());
@@ -1527,7 +1468,7 @@
char *name;
char *markup;
name = get_user_display_name ();
- markup = g_strdup_printf ("<b>%s</b></span>", name);
+ markup = g_strdup_printf ("<b>%s</b></span>", name);
gtk_label_set_markup (GTK_LABEL (plug->priv->auth_realname_label), markup);
g_free (markup);
g_free (name);
@@ -1541,7 +1482,7 @@
char *markup;
name = get_user_name ();
hostname = get_host_name ();
- markup = g_strdup_printf ("<i>%s @ %s</i></span>", name, hostname);
+ markup = g_strdup_printf ("<i>%s @ %s</i></span>", name, hostname);
gtk_label_set_markup (GTK_LABEL (plug->priv->auth_username_label), markup);
g_free (markup);
g_free (name);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/src/gs-lock-socket.c new/cinnamon-screensaver-3.0.1/src/gs-lock-socket.c
--- old/cinnamon-screensaver-3.0.0/src/gs-lock-socket.c 1970-01-01 01:00:00.000000000 +0100
+++ new/cinnamon-screensaver-3.0.1/src/gs-lock-socket.c 2016-05-30 17:09:04.000000000 +0200
@@ -0,0 +1,140 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA 02110-1335, USA.
+ *
+ */
+
+#include "config.h"
+#include "gs-lock-socket.h"
+#include "string.h"
+#include
+
+static void gs_lock_socket_class_init (GSLockSocketClass *klass);
+static void gs_lock_socket_init (GSLockSocket *window);
+
+G_DEFINE_TYPE (GSLockSocket, gs_lock_socket, GTK_TYPE_SOCKET)
+
+static void
+gs_lock_socket_send_configure_event (GSLockSocket *lock_socket)
+{
+ GtkAllocation allocation;
+ XConfigureEvent xconfigure;
+ gint x, y;
+
+ GtkSocket *socket = GTK_SOCKET (lock_socket);
+
+ GdkWindow *window = gtk_socket_get_plug_window (socket);
+
+ g_return_if_fail (window != NULL);
+
+ memset (&xconfigure, 0, sizeof (xconfigure));
+ xconfigure.type = ConfigureNotify;
+
+ xconfigure.event = GDK_WINDOW_XID (window);
+ xconfigure.window = GDK_WINDOW_XID (window);
+
+ /* The ICCCM says that synthetic events should have root relative
+ * coordinates. We still aren't really ICCCM compliant, since
+ * we don't send events when the real toplevel is moved.
+ */
+ gdk_error_trap_push ();
+ gdk_window_get_origin (window, &x, &y);
+ gdk_error_trap_pop_ignored ();
+
+ gtk_widget_get_allocation (GTK_WIDGET(socket), &allocation);
+ gint scale = gtk_widget_get_scale_factor (GTK_WIDGET (socket));
+ xconfigure.x = x;
+ xconfigure.y = y;
+ xconfigure.width = allocation.width * scale;
+ xconfigure.height = allocation.height * scale;
+
+ xconfigure.border_width = 0;
+ xconfigure.above = None;
+ xconfigure.override_redirect = False;
+
+ gdk_error_trap_push ();
+ XSendEvent (GDK_WINDOW_XDISPLAY (window),
+ GDK_WINDOW_XID (window),
+ False, NoEventMask, (XEvent *)&xconfigure);
+ gdk_error_trap_pop_ignored ();
+}
+
+static void
+gs_lock_socket_get_preferred_height (GtkWidget *widget,
+ gint *min_size,
+ gint *natural_size)
+{
+ GTK_WIDGET_CLASS (gs_lock_socket_parent_class)->get_preferred_height (widget,
+ min_size,
+ natural_size);
+
+ gint scale = gtk_widget_get_scale_factor (widget);
+ *min_size = *min_size / scale;
+ *natural_size = *natural_size / scale;
+}
+
+static void
+gs_lock_socket_get_preferred_width (GtkWidget *widget,
+ gint *min_size,
+ gint *natural_size)
+{
+ GTK_WIDGET_CLASS (gs_lock_socket_parent_class)->get_preferred_width (widget,
+ min_size,
+ natural_size);
+
+ gint scale = gtk_widget_get_scale_factor (widget);
+ *min_size = *min_size / scale;
+ *natural_size = *natural_size / scale;
+}
+
+static void
+gs_lock_socket_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ GSLockSocket *socket = GS_LOCK_SOCKET (widget);
+
+ gs_lock_socket_send_configure_event (socket);
+
+ GTK_WIDGET_CLASS (gs_lock_socket_parent_class)->size_allocate (widget,
+ allocation);
+ gs_lock_socket_send_configure_event (socket);
+}
+
+static void
+gs_lock_socket_class_init (GSLockSocketClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ widget_class->size_allocate = gs_lock_socket_size_allocate;
+ widget_class->get_preferred_height = gs_lock_socket_get_preferred_height;
+ widget_class->get_preferred_width = gs_lock_socket_get_preferred_width;
+}
+
+static void
+gs_lock_socket_init (GSLockSocket *window)
+{
+}
+
+GSLockSocket *
+gs_lock_socket_new (void)
+{
+ GObject *result;
+
+ result = g_object_new (GS_TYPE_LOCK_SOCKET,
+ NULL);
+
+ return GS_LOCK_SOCKET (result);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/src/gs-lock-socket.h new/cinnamon-screensaver-3.0.1/src/gs-lock-socket.h
--- old/cinnamon-screensaver-3.0.0/src/gs-lock-socket.h 1970-01-01 01:00:00.000000000 +0100
+++ new/cinnamon-screensaver-3.0.1/src/gs-lock-socket.h 2016-05-30 17:09:04.000000000 +0200
@@ -0,0 +1,50 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Suite 500, Boston, MA 02110-1335, USA.
+ *
+ */
+
+#ifndef __GS_LOCK_SOCKET_H
+#define __GS_LOCK_SOCKET_H
+
+#include
+#include
+
+G_BEGIN_DECLS
+
+#define GS_TYPE_LOCK_SOCKET (gs_lock_socket_get_type ())
+#define GS_LOCK_SOCKET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GS_TYPE_LOCK_SOCKET, GSLockSocket))
+#define GS_LOCK_SOCKET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GS_TYPE_LOCK_SOCKET, GSLockSocketClass))
+#define GS_IS_LOCK_SOCKET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GS_TYPE_LOCK_SOCKET))
+#define GS_IS_LOCK_SOCKET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GS_TYPE_LOCK_SOCKET))
+#define GS_LOCK_SOCKET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GS_TYPE_LOCK_SOCKET, GSLockSocketClass))
+
+typedef struct
+{
+ GtkSocket socket;
+} GSLockSocket;
+
+typedef struct
+{
+ GtkSocketClass socket_class;
+} GSLockSocketClass;
+
+GType gs_lock_socket_get_type (void);
+
+GSLockSocket * gs_lock_socket_new (void);
+
+G_END_DECLS
+
+#endif /* __GS_LOCK_SOCKET_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinnamon-screensaver-3.0.0/src/gs-window-x11.c new/cinnamon-screensaver-3.0.1/src/gs-window-x11.c
--- old/cinnamon-screensaver-3.0.0/src/gs-window-x11.c 2016-04-23 17:15:11.000000000 +0200
+++ new/cinnamon-screensaver-3.0.1/src/gs-window-x11.c 2016-05-30 17:09:04.000000000 +0200
@@ -34,6 +34,7 @@
#include "gnome-wall-clock.h"
+#include "gs-lock-socket.h"
#include "gs-window.h"
#include "gs-marshal.h"
#include "subprocs.h"
@@ -234,35 +235,6 @@
}
}
-static void
-gs_window_clear_to_background_surface (GSWindow *window)
-{
- g_return_if_fail (GS_IS_WINDOW (window));
-
- if (!gtk_widget_get_visible (GTK_WIDGET (window))) {
- return;
- }
-
- if (window->priv->background_surface == NULL) {
- return;
- }
-
- gs_debug ("Clearing window to background pixmap");
- gs_window_reset_background_surface (window);
-}
-
-static void
-clear_widget (GtkWidget *widget)
-{
- GdkRGBA rgba = { 0.0, 0.0, 0.0, 1.0 };
-
- if (!gtk_widget_get_realized (widget))
- return;
-
- gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, &rgba);
- gtk_widget_queue_draw (GTK_WIDGET (widget));
-}
-
static cairo_region_t *
get_outside_region (GSWindow *window)
{
@@ -1339,7 +1311,7 @@
create_lock_socket (GSWindow *window,
guint32 id)
{
- window->priv->lock_socket = gtk_socket_new ();
+ window->priv->lock_socket = GTK_WIDGET (gs_lock_socket_new ());
window->priv->lock_box = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (window->priv->lock_box);
@@ -2403,13 +2375,6 @@
return FALSE;
}
-static void
-on_realized (GtkWidget *widget, GSWindow *window)
-{
- gs_window_clear_to_background_surface (window);
- gtk_widget_queue_draw (widget);
-}
-
void
gs_window_set_away_message (GSWindow *window,
const char *message)