[gnome-shell] networkAgent: Fix external-ui dialogs
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] networkAgent: Fix external-ui dialogs
- Date: Mon, 19 Mar 2012 19:41:11 +0000 (UTC)
commit bf428312d78aa83772c7bf3f7324e87173b8c7c4
Author: Florian MÃllner <fmuellner gnome org>
Date: Wed Mar 7 14:47:51 2012 +0100
networkAgent: Fix external-ui dialogs
Two small fixes which made _showNewStyleDialog() err out:
- g_key_file_load_from_data() expects a string as first
argument, but g_buffered_input_stream_peek_buffer()
returns an array of "data"
- g_key_file_load_from_data() is documented to allow -1 as
length parameter for \0-terminated strings, but the actual
type of the parameter is unsigned (d'uh)
https://bugzilla.gnome.org/show_bug.cgi?id=671556
js/ui/networkAgent.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/networkAgent.js b/js/ui/networkAgent.js
index bc36333..cc44fa2 100644
--- a/js/ui/networkAgent.js
+++ b/js/ui/networkAgent.js
@@ -531,7 +531,8 @@ const VPNRequestHandler = new Lang.Class({
let contentOverride;
try {
- keyfile.load_from_data(this._dataStdout.peek_buffer(), -1,
+ let data = this._dataStdout.peek_buffer();
+ keyfile.load_from_data(data.toString(), data.length,
GLib.KeyFileFlags.NONE);
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]