Add a patch from upstream to avoid g_file_get_contents()

This commit is contained in:
Owen W. Taylor 2011-06-22 15:02:18 -04:00
parent 337272a2f5
commit a1b7aa5e40
3 changed files with 80 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 82aea3e8d6fc2a16759fd6f232c7358989a5f607 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Fri, 20 May 2011 11:14:54 +0200
Subject: [PATCH] Import Shell as needed by recent commit
---
js/ui/windowManager.js | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 52a00da..a3e2918 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -6,6 +6,7 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
+const Shell = imports.gi.Shell;
const AltTab = imports.ui.altTab;
const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup;
--
1.7.5.1

View File

@ -0,0 +1,48 @@
From bfd344cdece5de6230ff611e3e1c66d90913dc47 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 11 May 2011 14:19:24 -0400
Subject: [PATCH] Use Shell.get_file_contents_utf8_sync over
GLib.file_get_contents
We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.
https://bugzilla.gnome.org/show_bug.cgi?id=649981
---
js/ui/placeDisplay.js | 5 +----
js/ui/windowManager.js | 3 +--
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 59ca4a6..9354247 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -268,10 +268,7 @@ PlacesManager.prototype = {
if (!GLib.file_test(this._bookmarksPath, GLib.FileTest.EXISTS))
return;
- let [success, bookmarksContent, len] = GLib.file_get_contents(this._bookmarksPath);
-
- if (!success)
- return;
+ let bookmarksContent = Shell.get_file_contents_utf8_sync(this._bookmarksPath);
let bookmarks = bookmarksContent.split('\n');
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index b113a1a..52a00da 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -22,8 +22,7 @@ function getDimShader() {
if (dimShader === null)
return null;
if (!dimShader) {
- let [success, source, length] = GLib.file_get_contents(global.datadir +
- '/shaders/dim-window.glsl');
+ let source = Shell.get_file_contents_utf8_sync(global.datadir + '/shaders/dim-window.glsl');
try {
let shader = new Clutter.Shader();
shader.set_fragment_source(source, -1);
--
1.7.5.1

View File

@ -1,6 +1,6 @@
Name: gnome-shell Name: gnome-shell
Version: 3.0.2 Version: 3.0.2
Release: 2%{?dist} Release: 3%{?dist}
Summary: Window management and application launching for GNOME Summary: Window management and application launching for GNOME
Group: User Interface/Desktops Group: User Interface/Desktops
@ -13,6 +13,8 @@ Patch0: gnome-shell-avoid-redhat-menus.patch
# from upstream # from upstream
Patch1: gnome-shell-3.0.2-st-shadow-atomic.patch Patch1: gnome-shell-3.0.2-st-shadow-atomic.patch
Patch2: gnome-shell-3.0.2-st-icon-colors-atomic.patch Patch2: gnome-shell-3.0.2-st-icon-colors-atomic.patch
Patch3: Use-Shell.get_file_contents_utf8_sync-over-GLib.file.patch
Patch4: Import-Shell-as-needed-by-recent-commit.patch
%define clutter_version 1.4.0 %define clutter_version 1.4.0
%define gobject_introspection_version 0.10.1 %define gobject_introspection_version 0.10.1
@ -85,6 +87,8 @@ easy to use experience.
%patch0 -p1 -b .avoid-redhat-menus %patch0 -p1 -b .avoid-redhat-menus
%patch1 -p1 -b .st-shadow-atomic %patch1 -p1 -b .st-shadow-atomic
%patch2 -p1 -b .st-icon-colors-atomic %patch2 -p1 -b .st-icon-colors-atomic
%patch3 -p1 -b .use-get-file-contents
%patch4 -p1 -b .add-shell-import
%build %build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi; (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
@ -144,6 +148,9 @@ gconftool-2 --makefile-install-rule \
glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||: glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||:
%changelog %changelog
* Wed Jun 22 2011 Owen Taylor <otaylor@redhat.com> - 3.0.2-3
- Add a patch from upstream to avoid g_file_get_contents()
* Fri Jun 17 2011 Tomas Bzatek <tbzatek@redhat.com> - 3.0.2-2 * Fri Jun 17 2011 Tomas Bzatek <tbzatek@redhat.com> - 3.0.2-2
- Rebuilt for new gtk3 and gnome-desktop3 - Rebuilt for new gtk3 and gnome-desktop3