[gnome-initial-setup/gnome-3-8: 6/12] keyboard: Unconditionally create the localed proxy
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/gnome-3-8: 6/12] keyboard: Unconditionally create the localed proxy
- Date: Mon, 17 Jun 2013 22:12:06 +0000 (UTC)
commit d7175484110884b17d1cda3ac6ceece0c5a272e6
Author: Rui Matos <tiagomatos gmail com>
Date: Sun Jun 16 17:08:58 2013 +0200
keyboard: Unconditionally create the localed proxy
We always need the localed proxy since we read the system default
input sources from it.
https://bugzilla.gnome.org/show_bug.cgi?id=702399
.../pages/keyboard/gis-keyboard-page.c | 27 ++++++++-----------
1 files changed, 11 insertions(+), 16 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index 8b75d79..d27962a 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -132,7 +132,6 @@ gis_keyboard_page_constructed (GObject *object)
{
GisKeyboardPage *self = GIS_KEYBOARD_PAGE (object);
GisKeyboardPagePrivate *priv = self->priv;
- GDBusConnection *bus;
GisAssistant *assistant = gis_driver_get_assistant (GIS_PAGE (self)->driver);
G_OBJECT_CLASS (gis_keyboard_page_parent_class)->constructed (object);
@@ -143,23 +142,19 @@ gis_keyboard_page_constructed (GObject *object)
priv->cancellable = g_cancellable_new ();
+ g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
+ NULL,
+ "org.freedesktop.locale1",
+ "/org/freedesktop/locale1",
+ "org.freedesktop.locale1",
+ priv->cancellable,
+ (GAsyncReadyCallback) localed_proxy_ready,
+ self);
+
/* If we're in new user mode then we're manipulating system settings */
if (gis_driver_get_mode (GIS_PAGE (self)->driver) == GIS_DRIVER_MODE_NEW_USER)
- {
- priv->permission = polkit_permission_new_sync ("org.freedesktop.locale1.set-keyboard", NULL,
NULL, NULL);
-
- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
- g_dbus_proxy_new (bus,
- G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
- NULL,
- "org.freedesktop.locale1",
- "/org/freedesktop/locale1",
- "org.freedesktop.locale1",
- priv->cancellable,
- (GAsyncReadyCallback) localed_proxy_ready,
- object);
- g_object_unref (bus);
- }
+ priv->permission = polkit_permission_new_sync ("org.freedesktop.locale1.set-keyboard", NULL,
NULL, NULL);
g_signal_connect (assistant, "next-page", G_CALLBACK (next_page_cb), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]