After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649981 - Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-11 18:19 UTC by Colin Walters
Modified: 2011-05-20 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents (1.71 KB, patch)
2011-05-11 18:19 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-05-11 18:19:06 UTC
We need to fix the latter to return a byte array, which gjs doesn't
deal with well right now.
Comment 1 Colin Walters 2011-05-11 18:19:09 UTC
Created attachment 187650 [details] [review]
Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
Comment 2 Owen Taylor 2011-05-17 20:26:23 UTC
Review of attachment 187650 [details] [review]:

looks fine to me
Comment 3 Colin Walters 2011-05-19 19:27:38 UTC
Attachment 187650 [details] pushed as bfd344c - Use Shell.get_file_contents_utf8_sync over GLib.file_get_contents
Comment 4 Alexander Larsson 2011-05-20 09:14:40 UTC
This broke for me, i'm commiting this fix:

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;