rpms/gnome-desktop/devel gnome-desktop-2.19.90-gnome-bg.patch, 1.2, 1.3 gnome-desktop.spec, 1.92, 1.93

Soren Sandmann Pedersen (ssp) fedora-extras-commits at redhat.com
Tue Aug 28 18:10:25 UTC 2007


Author: ssp

Update of /cvs/pkgs/rpms/gnome-desktop/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1706

Modified Files:
	gnome-desktop-2.19.90-gnome-bg.patch gnome-desktop.spec 
Log Message:
Make starttime timezone relative

gnome-desktop-2.19.90-gnome-bg.patch:

Index: gnome-desktop-2.19.90-gnome-bg.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/devel/gnome-desktop-2.19.90-gnome-bg.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnome-desktop-2.19.90-gnome-bg.patch	17 Aug 2007 16:17:02 -0000	1.2
+++ gnome-desktop-2.19.90-gnome-bg.patch	28 Aug 2007 18:09:51 -0000	1.3
@@ -1,7 +1,6 @@
-diff -up gnome-desktop-2.19.90/configure.in.gnome-bg gnome-desktop-2.19.90/configure.in
 --- gnome-desktop-2.19.90/configure.in.gnome-bg	2007-08-13 20:04:02.000000000 -0400
-+++ gnome-desktop-2.19.90/configure.in	2007-08-17 02:37:45.000000000 -0400
-@@ -51,10 +51,10 @@ AC_SUBST(GNOME_MICRO)
++++ gnome-desktop-2.19.90/configure.in	2007-08-28 13:31:46.000000000 -0400
+@@ -51,10 +51,10 @@
  AC_SUBST(GNOME_DISTRIBUTOR)
  AC_SUBST(GNOME_DATE)
  
@@ -16,123 +15,9 @@
  
  # As a special favour for vuntz, support --disable-deprecations
  
-diff -up gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am.gnome-bg gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am
---- gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am.gnome-bg	2007-08-13 20:04:00.000000000 -0400
-+++ gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am	2007-08-17 02:37:45.000000000 -0400
-@@ -1,4 +1,5 @@
- libgnomeui_desktopdir = $(includedir)/gnome-desktop-2.0/libgnomeui
- libgnomeui_desktop_HEADERS = \
- 	gnome-ditem-edit.h \
--	gnome-hint.h
-+	gnome-hint.h       \
-+	gnome-bg.h
-diff -up /dev/null gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/gnome-bg.h
---- /dev/null	2007-08-17 09:34:06.909005733 -0400
-+++ gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/gnome-bg.h	2007-08-17 02:37:45.000000000 -0400
-@@ -0,0 +1,99 @@
-+/* gnome-bg.h - 
-+
-+   Copyright 2007, Red Hat, Inc.
-+
-+   This file is part of the Gnome Library.
-+
-+   The Gnome Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Library General Public License as
-+   published by the Free Software Foundation; either version 2 of the
-+   License, or (at your option) any later version.
-+   
-+   The Gnome Library 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
-+   Library General Public License for more details.
-+   
-+   You should have received a copy of the GNU Library General Public
-+   License along with the Gnome Library; see the file COPYING.LIB.  If not,
-+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+   Boston, MA 02111-1307, USA.
-+
-+   Author: Soren Sandmann <sandmann at redhat.com>
-+*/
-+
-+#ifndef __GNOME_BG_H__
-+#define __GNOME_BG_H__
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <libgnomeui/libgnomeui.h>
-+#include <gdk/gdk.h>
-+
-+#define GNOME_TYPE_BG            (gnome_bg_get_type ())
-+#define GNOME_BG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_BG, GnomeBG))
-+#define GNOME_BG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GNOME_TYPE_BG, GnomeBGClass))
-+#define GNOME_IS_BG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_BG))
-+#define GNOME_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_TYPE_BG))
-+#define GNOME_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_TYPE_BG, GnomeBGClass))
-+
-+typedef struct _GnomeBG GnomeBG;
-+typedef struct _GnomeBGClass GnomeBGClass;
-+
-+typedef enum {
-+	GNOME_BG_COLOR_SOLID,
-+	GNOME_BG_COLOR_H_GRADIENT,
-+	GNOME_BG_COLOR_V_GRADIENT
-+} GnomeBGColorType;
-+
-+typedef enum {
-+	GNOME_BG_PLACEMENT_TILED,
-+	GNOME_BG_PLACEMENT_ZOOMED,
-+	GNOME_BG_PLACEMENT_CENTERED,
-+	GNOME_BG_PLACEMENT_SCALED,
-+	GNOME_BG_PLACEMENT_FILL_SCREEN
-+} GnomeBGPlacement;
-+
-+GType      gnome_bg_get_type           (void);
-+GnomeBG *  gnome_bg_new                (void);
-+void       gnome_bg_free               (GnomeBG               *img);
-+void       gnome_bg_set_placement      (GnomeBG               *img,
-+					GnomeBGPlacement       placement);
-+void       gnome_bg_set_color          (GnomeBG               *img,
-+					GnomeBGColorType       type,
-+					GdkColor              *c1,
-+					GdkColor              *c2);
-+void       gnome_bg_set_uri            (GnomeBG               *img,
-+					const char            *uri);
-+void       gnome_bg_draw               (GnomeBG               *img,
-+					GdkPixbuf             *dest);
-+GdkPixmap *gnome_bg_create_pixmap      (GnomeBG               *img,
-+					GdkWindow             *window,
-+					int                    width,
-+					int                    height,
-+					gboolean               root);
-+gboolean   gnome_bg_get_image_size     (GnomeBG	               *bg,
-+					GnomeThumbnailFactory *factory,
-+					int		       *width,
-+					int		       *height);
-+GdkPixbuf *gnome_bg_create_thumbnail   (GnomeBG               *bg,
-+					GnomeThumbnailFactory *factory,
-+					GdkScreen             *screen,
-+					int		       dest_width,
-+					int		       dest_height);
-+gboolean   gnome_bg_is_dark            (GnomeBG               *img);
-+gboolean   gnome_bg_changes_with_size  (GnomeBG               *img);
-+
-+
-+/* Set a pixmap as root - not a GnomeBG method */
-+void       gnome_bg_set_pixmap_as_root (GdkScreen             *screen,
-+					GdkPixmap             *pixmap);
-+
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff -up /dev/null gnome-desktop-2.19.90/libgnome-desktop/gnome-bg.c
---- /dev/null	2007-08-17 09:34:06.909005733 -0400
-+++ gnome-desktop-2.19.90/libgnome-desktop/gnome-bg.c	2007-08-17 12:13:47.000000000 -0400
-@@ -0,0 +1,1742 @@
+--- /dev/null	2007-08-15 18:04:26.337218222 -0400
++++ gnome-desktop-2.19.90/libgnome-desktop/gnome-bg.c	2007-08-28 13:42:09.000000000 -0400
+@@ -0,0 +1,1791 @@
 +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
 +   
 +gnomebg.c: Object for the desktop background.
@@ -760,12 +645,14 @@
 +	if (g_str_has_prefix (uri, "file:"))
 +		filename = gnome_vfs_get_local_path_from_uri (uri);
 +	else 
-+		filename = uri;
++		filename = g_strdup (uri);
 +	
-+        result = gdk_pixbuf_get_file_info (filename, orig_width, orig_height);
++        if (gdk_pixbuf_get_file_info (filename, orig_width, orig_height))
++		result = TRUE;
++	else
++		result = FALSE;
 +	
-+	if (filename != uri)
-+		g_free (filename);
++	g_free (filename);
 +
 +	return result;
 +}
@@ -920,12 +807,13 @@
 +/* Implementation of the pixbuf cache */
 +struct _SlideShow
 +{
-+	double start_time;	       /* In seconds since Jan 1st 1970 */
++	double start_time;
 +	double total_duration;
 +
 +	GQueue *slides;
 +	
 +	/* used during parsing */
++	struct tm start_tm;
 +	GQueue *stack;
 +};
 +
@@ -1689,6 +1577,12 @@
 +	return (!l1 && !l2);
 +}
 +
++static int
++parse_int (const char *text)
++{
++	return strtol (text, NULL, 0);
++}
++
 +static void
 +handle_text (GMarkupParseContext *context,
 +	     const gchar         *text,
@@ -1698,9 +1592,24 @@
 +{
 +	SlideShow *parser = user_data;
 +	Slide *slide = parser->slides->tail? parser->slides->tail->data : NULL;
-+	
-+	if (stack_is (parser, "starttime", "background", NULL)) {
-+		parser->start_time = g_strtod (text, NULL);
++
++	if (stack_is (parser, "year", "starttime", "background", NULL)) {
++		parser->start_tm.tm_year = parse_int (text) - 1900;
++	}
++	else if (stack_is (parser, "month", "starttime", "background", NULL)) {
++		parser->start_tm.tm_mon = parse_int (text) - 1;
++	}
++	else if (stack_is (parser, "day", "starttime", "background", NULL)) {
++		parser->start_tm.tm_mday = parse_int (text);
++	}
++	else if (stack_is (parser, "hour", "starttime", "background", NULL)) {
++		parser->start_tm.tm_hour = parse_int (text) - 1;
++	}
++	else if (stack_is (parser, "minute", "starttime", "background", NULL)) {
++		parser->start_tm.tm_min = parse_int (text);
++	}
++	else if (stack_is (parser, "second", "starttime", "background", NULL)) {
++		parser->start_tm.tm_sec = parse_int (text);
 +	}
 +	else if (stack_is (parser, "duration", "static", "background", NULL) ||
 +		 stack_is (parser, "duration", "transition", "background", NULL)) {
@@ -1760,6 +1669,23 @@
 +#endif
 +}
 +
++static void
++threadsafe_localtime (time_t time, struct tm *tm)
++{
++	struct tm *res;
++	
++	G_LOCK_DEFINE_STATIC (localtime_mutex);
++
++	G_LOCK (localtime_mutex);
++
++	res = localtime (&time);
++	if (tm) {
++		*tm = *res;
++	}
++	
++	G_UNLOCK (localtime_mutex);
++}
++
 +static SlideShow *
 +read_slideshow_file (const char *uri,
 +		     GError     **err)
@@ -1776,11 +1702,13 @@
 +	gssize len;
 +	SlideShow *show = NULL;
 +	GMarkupParseContext *context = NULL;
++	time_t t;
 +
 +	if (!uri || (gnome_vfs_read_entire_file (uri, &len, &contents) != GNOME_VFS_OK))
 +		return NULL;
 +	
 +	show = g_new0 (SlideShow, 1);
++	threadsafe_localtime ((time_t)0, &show->start_tm);
 +	show->stack = g_queue_new ();
 +	show->slides = g_queue_new ();
 +	
@@ -1797,7 +1725,13 @@
 +	}
 +	
 +	g_markup_parse_context_free (context);
++
++	t = mktime (&show->start_tm);
++
++	g_print ("start time: %s\n", asctime (&show->start_tm));
 +	
++	show->start_time = (double)t;
++		
 +	dump_bg (show);
 +
 +	g_free (contents);
@@ -1875,10 +1809,9 @@
 +	
 +	return FALSE;
 +}
-diff -up gnome-desktop-2.19.90/libgnome-desktop/Makefile.am.gnome-bg gnome-desktop-2.19.90/libgnome-desktop/Makefile.am
 --- gnome-desktop-2.19.90/libgnome-desktop/Makefile.am.gnome-bg	2007-08-13 20:04:00.000000000 -0400
-+++ gnome-desktop-2.19.90/libgnome-desktop/Makefile.am	2007-08-17 02:37:45.000000000 -0400
-@@ -18,7 +18,8 @@ noinst_PROGRAMS = test-ditem test-hint t
++++ gnome-desktop-2.19.90/libgnome-desktop/Makefile.am	2007-08-28 13:31:46.000000000 -0400
+@@ -18,7 +18,8 @@
  libgnome_desktop_2_la_SOURCES = \
  	gnome-desktop-item.c	\
  	gnome-ditem-edit.c	\
@@ -1888,3 +1821,114 @@
  
  libgnome_desktop_2_la_LIBADD = \
  	$(GNOME_DESKTOP_LIBS)
+--- gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am.gnome-bg	2007-08-13 20:04:00.000000000 -0400
++++ gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/Makefile.am	2007-08-28 13:31:46.000000000 -0400
+@@ -1,4 +1,5 @@
+ libgnomeui_desktopdir = $(includedir)/gnome-desktop-2.0/libgnomeui
+ libgnomeui_desktop_HEADERS = \
+ 	gnome-ditem-edit.h \
+-	gnome-hint.h
++	gnome-hint.h       \
++	gnome-bg.h
+--- /dev/null	2007-08-15 18:04:26.337218222 -0400
++++ gnome-desktop-2.19.90/libgnome-desktop/libgnomeui/gnome-bg.h	2007-08-28 13:31:46.000000000 -0400
+@@ -0,0 +1,99 @@
++/* gnome-bg.h - 
++
++   Copyright 2007, Red Hat, Inc.
++
++   This file is part of the Gnome Library.
++
++   The Gnome Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Library General Public License as
++   published by the Free Software Foundation; either version 2 of the
++   License, or (at your option) any later version.
++   
++   The Gnome Library 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
++   Library General Public License for more details.
++   
++   You should have received a copy of the GNU Library General Public
++   License along with the Gnome Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.
++
++   Author: Soren Sandmann <sandmann at redhat.com>
++*/
++
++#ifndef __GNOME_BG_H__
++#define __GNOME_BG_H__
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#include <libgnomeui/libgnomeui.h>
++#include <gdk/gdk.h>
++
++#define GNOME_TYPE_BG            (gnome_bg_get_type ())
++#define GNOME_BG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_BG, GnomeBG))
++#define GNOME_BG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GNOME_TYPE_BG, GnomeBGClass))
++#define GNOME_IS_BG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_BG))
++#define GNOME_IS_BG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_TYPE_BG))
++#define GNOME_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_TYPE_BG, GnomeBGClass))
++
++typedef struct _GnomeBG GnomeBG;
++typedef struct _GnomeBGClass GnomeBGClass;
++
++typedef enum {
++	GNOME_BG_COLOR_SOLID,
++	GNOME_BG_COLOR_H_GRADIENT,
++	GNOME_BG_COLOR_V_GRADIENT
++} GnomeBGColorType;
++
++typedef enum {
++	GNOME_BG_PLACEMENT_TILED,
++	GNOME_BG_PLACEMENT_ZOOMED,
++	GNOME_BG_PLACEMENT_CENTERED,
++	GNOME_BG_PLACEMENT_SCALED,
++	GNOME_BG_PLACEMENT_FILL_SCREEN
++} GnomeBGPlacement;
++
++GType      gnome_bg_get_type           (void);
++GnomeBG *  gnome_bg_new                (void);
++void       gnome_bg_free               (GnomeBG               *img);
++void       gnome_bg_set_placement      (GnomeBG               *img,
++					GnomeBGPlacement       placement);
++void       gnome_bg_set_color          (GnomeBG               *img,
++					GnomeBGColorType       type,
++					GdkColor              *c1,
++					GdkColor              *c2);
++void       gnome_bg_set_uri            (GnomeBG               *img,
++					const char            *uri);
++void       gnome_bg_draw               (GnomeBG               *img,
++					GdkPixbuf             *dest);
++GdkPixmap *gnome_bg_create_pixmap      (GnomeBG               *img,
++					GdkWindow             *window,
++					int                    width,
++					int                    height,
++					gboolean               root);
++gboolean   gnome_bg_get_image_size     (GnomeBG	               *bg,
++					GnomeThumbnailFactory *factory,
++					int		       *width,
++					int		       *height);
++GdkPixbuf *gnome_bg_create_thumbnail   (GnomeBG               *bg,
++					GnomeThumbnailFactory *factory,
++					GdkScreen             *screen,
++					int		       dest_width,
++					int		       dest_height);
++gboolean   gnome_bg_is_dark            (GnomeBG               *img);
++gboolean   gnome_bg_changes_with_size  (GnomeBG               *img);
++
++
++/* Set a pixmap as root - not a GnomeBG method */
++void       gnome_bg_set_pixmap_as_root (GdkScreen             *screen,
++					GdkPixmap             *pixmap);
++
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif


Index: gnome-desktop.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-desktop/devel/gnome-desktop.spec,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- gnome-desktop.spec	17 Aug 2007 16:17:02 -0000	1.92
+++ gnome-desktop.spec	28 Aug 2007 18:09:51 -0000	1.93
@@ -12,7 +12,7 @@
 Summary: Package containing code shared among gnome-panel, gnome-session, nautilus, etc
 Name: gnome-desktop
 Version: 2.19.90
-Release: 3%{?dist}
+Release: 4%{?dist}
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-desktop/2.19/%{name}-%{version}.tar.bz2
 License: GPLv2+ and LGPLv2+
@@ -125,6 +125,9 @@
 %doc %{_datadir}/gtk-doc/html/gnome-desktop/
 
 %changelog
+* Tue Aug 28 2007 Soren Sandmann <sandmann at redhat.com> - 2.19.90-4
+- Change starttime format to be timezone relative.
+
 * Fri Aug 17 2007 Matthias Clasen <mclasen at redhat.com> - 2.19.90-3
 - Try harder to get size information
 




More information about the fedora-extras-commits mailing list