Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a7ec84a834 | ||
|
cf205c9301 | ||
|
a475284b14 | ||
|
6f8b18e1f3 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -57,3 +57,5 @@ gnome-desktop-2.90.4.tar.bz2
|
||||
/gnome-desktop-3.9.91.tar.xz
|
||||
/gnome-desktop-3.9.92.tar.xz
|
||||
/gnome-desktop-3.10.0.tar.xz
|
||||
/gnome-desktop-3.10.1.tar.xz
|
||||
/gnome-desktop-3.10.2.tar.xz
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 4999cfd5fb9ff3bedef2c6bafc0b34832a94b029 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Thu, 28 Aug 2014 19:16:05 +0200
|
||||
Subject: [PATCH 1/2] gnome-xkb-info: Fix adding layouts to language and
|
||||
country tables
|
||||
|
||||
Layout->xkb_name isn't unique so we can't use it as a key in the hash
|
||||
table. Layout->id is the unique identifier that we should be using,
|
||||
otherwise some layouts would never get added.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=729210
|
||||
---
|
||||
libgnome-desktop/gnome-xkb-info.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
|
||||
index eec1224..0cd089f 100644
|
||||
--- a/libgnome-desktop/gnome-xkb-info.c
|
||||
+++ b/libgnome-desktop/gnome-xkb-info.c
|
||||
@@ -367,7 +367,7 @@ add_layout_to_table (GHashTable *table,
|
||||
{
|
||||
GHashTable *set;
|
||||
|
||||
- if (!layout->xkb_name)
|
||||
+ if (!layout->id)
|
||||
return;
|
||||
|
||||
set = g_hash_table_lookup (table, key);
|
||||
@@ -378,10 +378,10 @@ add_layout_to_table (GHashTable *table,
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (g_hash_table_contains (set, layout->xkb_name))
|
||||
+ if (g_hash_table_contains (set, layout->id))
|
||||
return;
|
||||
}
|
||||
- g_hash_table_replace (set, layout->xkb_name, layout);
|
||||
+ g_hash_table_replace (set, layout->id, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.9.0
|
||||
|
200
0001-idle-monitor-Check-if-a-monitor-exists-before-creati.patch
Normal file
200
0001-idle-monitor-Check-if-a-monitor-exists-before-creati.patch
Normal file
@ -0,0 +1,200 @@
|
||||
From f4402b64fd34b886a9d7e8c1e0833e4c3f7dcfe3 Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Tue, 26 Nov 2013 00:55:23 +0100
|
||||
Subject: [PATCH] idle-monitor: Check if a monitor exists before creating a
|
||||
proxy for it
|
||||
|
||||
The fact that we know about a given device doesn't mean that mutter
|
||||
also knows about it nor that it has created an idle monitor object on
|
||||
the bus for it.
|
||||
|
||||
To fix this race, instead of immediately trying to create a proxy for
|
||||
the bus object, we instantiate an object manager and ask it whether
|
||||
the object we want already exists and if it doesn't we wait
|
||||
(indefinitely) until it shows up.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=706229
|
||||
---
|
||||
libgnome-desktop/gnome-idle-monitor.c | 109 +++++++++++++++++++++++-----------
|
||||
1 file changed, 73 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/libgnome-desktop/gnome-idle-monitor.c b/libgnome-desktop/gnome-idle-monitor.c
|
||||
index 6af1343..539c99b 100644
|
||||
--- a/libgnome-desktop/gnome-idle-monitor.c
|
||||
+++ b/libgnome-desktop/gnome-idle-monitor.c
|
||||
@@ -40,10 +40,12 @@ struct _GnomeIdleMonitorPrivate
|
||||
{
|
||||
GCancellable *cancellable;
|
||||
MetaDBusIdleMonitor *proxy;
|
||||
+ MetaDBusObjectManagerClient *om;
|
||||
int name_watch_id;
|
||||
GHashTable *watches;
|
||||
GHashTable *watches_by_upstream_id;
|
||||
GdkDevice *device;
|
||||
+ gchar *path;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
@@ -163,8 +165,10 @@ gnome_idle_monitor_dispose (GObject *object)
|
||||
}
|
||||
|
||||
g_clear_object (&monitor->priv->proxy);
|
||||
+ g_clear_object (&monitor->priv->om);
|
||||
g_clear_pointer (&monitor->priv->watches, g_hash_table_destroy);
|
||||
g_clear_object (&monitor->priv->device);
|
||||
+ g_clear_pointer (&monitor->priv->path, g_free);
|
||||
|
||||
G_OBJECT_CLASS (gnome_idle_monitor_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -198,6 +202,15 @@ gnome_idle_monitor_set_property (GObject *object,
|
||||
{
|
||||
case PROP_DEVICE:
|
||||
monitor->priv->device = g_value_dup_object (value);
|
||||
+
|
||||
+ g_free (monitor->priv->path);
|
||||
+ if (monitor->priv->device) {
|
||||
+ monitor->priv->path = g_strdup_printf ("/org/gnome/Mutter/IdleMonitor/Device%d",
|
||||
+ gdk_x11_device_get_id (monitor->priv->device));
|
||||
+ } else {
|
||||
+ monitor->priv->path = g_strdup ("/org/gnome/Mutter/IdleMonitor/Core");
|
||||
+ }
|
||||
+
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
@@ -220,57 +233,74 @@ add_known_watch (gpointer key,
|
||||
}
|
||||
|
||||
static void
|
||||
-on_proxy_acquired (GObject *object,
|
||||
- GAsyncResult *result,
|
||||
- gpointer user_data)
|
||||
+connect_proxy (GDBusObject *object,
|
||||
+ GnomeIdleMonitor *monitor)
|
||||
{
|
||||
- GnomeIdleMonitor *monitor = user_data;
|
||||
- GError *error;
|
||||
MetaDBusIdleMonitor *proxy;
|
||||
|
||||
- error = NULL;
|
||||
- proxy = meta_dbus_idle_monitor_proxy_new_finish (result, &error);
|
||||
+ proxy = meta_dbus_object_get_idle_monitor (META_DBUS_OBJECT (object));
|
||||
if (!proxy) {
|
||||
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||
- g_error_free (error);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- g_warning ("Failed to acquire idle monitor proxy: %s", error->message);
|
||||
- g_error_free (error);
|
||||
+ g_critical ("Unable to get idle monitor from object at %s",
|
||||
+ g_dbus_object_get_object_path (object));
|
||||
return;
|
||||
}
|
||||
|
||||
monitor->priv->proxy = proxy;
|
||||
-
|
||||
g_signal_connect_object (proxy, "watch-fired", G_CALLBACK (on_watch_fired), monitor, 0);
|
||||
g_hash_table_foreach (monitor->priv->watches, add_known_watch, monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
-connect_proxy (GnomeIdleMonitor *monitor,
|
||||
- GDBusConnection *connection,
|
||||
- const char *unique_name)
|
||||
-{
|
||||
- char *path;
|
||||
- int device_id;
|
||||
-
|
||||
- if (monitor->priv->device) {
|
||||
- /* FIXME! Gdk! WTF? */
|
||||
- device_id = gdk_x11_device_get_id (monitor->priv->device);
|
||||
- path = g_strdup_printf ("/org/gnome/Mutter/IdleMonitor/Device%d", device_id);
|
||||
- } else {
|
||||
- path = g_strdup ("/org/gnome/Mutter/IdleMonitor/Core");
|
||||
+on_object_added (GDBusObjectManager *manager,
|
||||
+ GDBusObject *object,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GnomeIdleMonitor *monitor = user_data;
|
||||
+
|
||||
+ if (!g_str_equal (monitor->priv->path, g_dbus_object_get_object_path (object)))
|
||||
+ return;
|
||||
+
|
||||
+ connect_proxy (object, monitor);
|
||||
+
|
||||
+ g_signal_handlers_disconnect_by_func (manager, on_object_added, user_data);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+get_proxy (GnomeIdleMonitor *monitor)
|
||||
+{
|
||||
+ GDBusObject *object;
|
||||
+
|
||||
+ object = g_dbus_object_manager_get_object (G_DBUS_OBJECT_MANAGER (monitor->priv->om),
|
||||
+ monitor->priv->path);
|
||||
+ if (object) {
|
||||
+ connect_proxy (object, monitor);
|
||||
+ g_object_unref (object);
|
||||
+ return;
|
||||
}
|
||||
|
||||
- meta_dbus_idle_monitor_proxy_new (connection,
|
||||
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
|
||||
- unique_name, path,
|
||||
- monitor->priv->cancellable,
|
||||
- on_proxy_acquired,
|
||||
- monitor);
|
||||
+ g_signal_connect_object (monitor->priv->om, "object-added",
|
||||
+ G_CALLBACK (on_object_added), monitor, 0);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+on_object_manager_ready (GObject *source,
|
||||
+ GAsyncResult *res,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GnomeIdleMonitor *monitor = user_data;
|
||||
+ GDBusObjectManager *om;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ om = meta_dbus_object_manager_client_new_finish (res, &error);
|
||||
+ if (!om) {
|
||||
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
||||
+ g_warning ("Failed to acquire idle monitor object manager: %s", error->message);
|
||||
+ g_error_free (error);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- g_free (path);
|
||||
+ monitor->priv->om = META_DBUS_OBJECT_MANAGER_CLIENT (om);
|
||||
+ get_proxy (monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -281,7 +311,13 @@ on_name_appeared (GDBusConnection *connection,
|
||||
{
|
||||
GnomeIdleMonitor *monitor = user_data;
|
||||
|
||||
- connect_proxy (monitor, connection, name_owner);
|
||||
+ meta_dbus_object_manager_client_new (connection,
|
||||
+ G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE,
|
||||
+ name_owner,
|
||||
+ "/org/gnome/Mutter/IdleMonitor",
|
||||
+ monitor->priv->cancellable,
|
||||
+ on_object_manager_ready,
|
||||
+ monitor);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -305,6 +341,7 @@ on_name_vanished (GDBusConnection *connection,
|
||||
|
||||
g_hash_table_foreach (monitor->priv->watches, clear_watch, monitor);
|
||||
g_clear_object (&monitor->priv->proxy);
|
||||
+ g_clear_object (&monitor->priv->om);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
--
|
||||
1.8.3.1
|
||||
|
179
0002-gnome-xkb-info-Apply-main-layout-locale-metadata-to-.patch
Normal file
179
0002-gnome-xkb-info-Apply-main-layout-locale-metadata-to-.patch
Normal file
@ -0,0 +1,179 @@
|
||||
From 959146efdd88f20270384ee1186189310de13b1d Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon, 18 Nov 2013 15:42:02 +0100
|
||||
Subject: [PATCH 2/2] gnome-xkb-info: Apply main layout locale metadata to
|
||||
variants
|
||||
|
||||
If a variant doesn't specify language/country metadata then we should
|
||||
file it under its main layout's language/country.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=711291
|
||||
---
|
||||
libgnome-desktop/gnome-xkb-info.c | 100 ++++++++++++++++++++++++++++----------
|
||||
1 file changed, 74 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c
|
||||
index 0cd089f..480836d 100644
|
||||
--- a/libgnome-desktop/gnome-xkb-info.c
|
||||
+++ b/libgnome-desktop/gnome-xkb-info.c
|
||||
@@ -56,6 +56,8 @@ struct _Layout
|
||||
gchar *description;
|
||||
gboolean is_variant;
|
||||
const Layout *main_layout;
|
||||
+ GSList *iso639Ids;
|
||||
+ GSList *iso3166Ids;
|
||||
};
|
||||
|
||||
typedef struct _XkbOption XkbOption;
|
||||
@@ -104,6 +106,8 @@ free_layout (gpointer data)
|
||||
g_free (layout->xkb_name);
|
||||
g_free (layout->short_desc);
|
||||
g_free (layout->description);
|
||||
+ g_slist_free_full (layout->iso639Ids, g_free);
|
||||
+ g_slist_free_full (layout->iso3166Ids, g_free);
|
||||
g_slice_free (Layout, layout);
|
||||
}
|
||||
|
||||
@@ -385,6 +389,60 @@ add_layout_to_table (GHashTable *table,
|
||||
}
|
||||
|
||||
static void
|
||||
+add_layout_to_locale_tables (Layout *layout,
|
||||
+ GHashTable *layouts_by_language,
|
||||
+ GHashTable *layouts_by_country)
|
||||
+{
|
||||
+ GSList *l, *lang_codes, *country_codes;
|
||||
+ gchar *language, *country;
|
||||
+
|
||||
+ lang_codes = layout->iso639Ids;
|
||||
+ country_codes = layout->iso3166Ids;
|
||||
+
|
||||
+ if (layout->is_variant)
|
||||
+ {
|
||||
+ if (!lang_codes)
|
||||
+ lang_codes = layout->main_layout->iso639Ids;
|
||||
+ if (!country_codes)
|
||||
+ country_codes = layout->main_layout->iso3166Ids;
|
||||
+ }
|
||||
+
|
||||
+ for (l = lang_codes; l; l = l->next)
|
||||
+ {
|
||||
+ language = gnome_get_language_from_code ((gchar *) l->data, NULL);
|
||||
+ if (language)
|
||||
+ {
|
||||
+ add_layout_to_table (layouts_by_language, language, layout);
|
||||
+ g_free (language);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (l = country_codes; l; l = l->next)
|
||||
+ {
|
||||
+ country = gnome_get_country_from_code ((gchar *) l->data, NULL);
|
||||
+ if (country)
|
||||
+ {
|
||||
+ add_layout_to_table (layouts_by_country, country, layout);
|
||||
+ g_free (country);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+add_iso639 (Layout *layout,
|
||||
+ gchar *id)
|
||||
+{
|
||||
+ layout->iso639Ids = g_slist_prepend (layout->iso639Ids, id);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+add_iso3166 (Layout *layout,
|
||||
+ gchar *id)
|
||||
+{
|
||||
+ layout->iso3166Ids = g_slist_prepend (layout->iso3166Ids, id);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
parse_end_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
gpointer data,
|
||||
@@ -412,6 +470,9 @@ parse_end_element (GMarkupParseContext *context,
|
||||
g_hash_table_replace (priv->layouts_table,
|
||||
priv->current_parser_layout->id,
|
||||
priv->current_parser_layout);
|
||||
+ add_layout_to_locale_tables (priv->current_parser_layout,
|
||||
+ priv->layouts_by_language,
|
||||
+ priv->layouts_by_country);
|
||||
priv->current_parser_layout = NULL;
|
||||
}
|
||||
else if (strcmp (element_name, "variant") == 0)
|
||||
@@ -431,12 +492,13 @@ parse_end_element (GMarkupParseContext *context,
|
||||
g_hash_table_replace (priv->layouts_table,
|
||||
priv->current_parser_variant->id,
|
||||
priv->current_parser_variant);
|
||||
+ add_layout_to_locale_tables (priv->current_parser_variant,
|
||||
+ priv->layouts_by_language,
|
||||
+ priv->layouts_by_country);
|
||||
priv->current_parser_variant = NULL;
|
||||
}
|
||||
else if (strcmp (element_name, "iso639Id") == 0)
|
||||
{
|
||||
- gchar *language;
|
||||
-
|
||||
if (!priv->current_parser_iso639Id)
|
||||
{
|
||||
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
@@ -444,23 +506,15 @@ parse_end_element (GMarkupParseContext *context,
|
||||
return;
|
||||
}
|
||||
|
||||
- language = gnome_get_language_from_code (priv->current_parser_iso639Id, NULL);
|
||||
- if (language)
|
||||
- {
|
||||
- if (priv->current_parser_variant)
|
||||
- add_layout_to_table (priv->layouts_by_language, language, priv->current_parser_variant);
|
||||
- else if (priv->current_parser_layout)
|
||||
- add_layout_to_table (priv->layouts_by_language, language, priv->current_parser_layout);
|
||||
-
|
||||
- g_free (language);
|
||||
- }
|
||||
+ if (priv->current_parser_variant)
|
||||
+ add_iso639 (priv->current_parser_variant, priv->current_parser_iso639Id);
|
||||
+ else if (priv->current_parser_layout)
|
||||
+ add_iso639 (priv->current_parser_layout, priv->current_parser_iso639Id);
|
||||
|
||||
- g_clear_pointer (&priv->current_parser_iso639Id, g_free);
|
||||
+ priv->current_parser_iso639Id = NULL;
|
||||
}
|
||||
else if (strcmp (element_name, "iso3166Id") == 0)
|
||||
{
|
||||
- gchar *country;
|
||||
-
|
||||
if (!priv->current_parser_iso3166Id)
|
||||
{
|
||||
g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
@@ -468,18 +522,12 @@ parse_end_element (GMarkupParseContext *context,
|
||||
return;
|
||||
}
|
||||
|
||||
- country = gnome_get_country_from_code (priv->current_parser_iso3166Id, NULL);
|
||||
- if (country)
|
||||
- {
|
||||
- if (priv->current_parser_variant)
|
||||
- add_layout_to_table (priv->layouts_by_country, country, priv->current_parser_variant);
|
||||
- else if (priv->current_parser_layout)
|
||||
- add_layout_to_table (priv->layouts_by_country, country, priv->current_parser_layout);
|
||||
-
|
||||
- g_free (country);
|
||||
- }
|
||||
+ if (priv->current_parser_variant)
|
||||
+ add_iso3166 (priv->current_parser_variant, priv->current_parser_iso3166Id);
|
||||
+ else if (priv->current_parser_layout)
|
||||
+ add_iso3166 (priv->current_parser_layout, priv->current_parser_iso3166Id);
|
||||
|
||||
- g_clear_pointer (&priv->current_parser_iso3166Id, g_free);
|
||||
+ priv->current_parser_iso3166Id = NULL;
|
||||
}
|
||||
else if (strcmp (element_name, "group") == 0)
|
||||
{
|
||||
--
|
||||
1.9.0
|
||||
|
@ -6,11 +6,14 @@
|
||||
|
||||
Summary: Shared code among gnome-panel, gnome-session, nautilus, etc
|
||||
Name: gnome-desktop3
|
||||
Version: 3.10.0
|
||||
Release: 1%{?dist}
|
||||
Version: 3.10.2
|
||||
Release: 3%{?dist}
|
||||
URL: http://www.gnome.org
|
||||
Source0: http://download.gnome.org/sources/gnome-desktop/3.10/gnome-desktop-%{version}.tar.xz
|
||||
Patch0: 0001-default-input-sources-Switch-ja_JP-default-to-ibus-k.patch
|
||||
Patch1: 0001-idle-monitor-Check-if-a-monitor-exists-before-creati.patch
|
||||
Patch2: 0001-gnome-xkb-info-Fix-adding-layouts-to-language-and-co.patch
|
||||
Patch3: 0002-gnome-xkb-info-Apply-main-layout-locale-metadata-to-.patch
|
||||
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
@ -66,6 +69,9 @@ libgnomedesktop.
|
||||
%prep
|
||||
%setup -q -n gnome-desktop-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%configure --with-pnp-ids-path="/usr/share/hwdata/pnp.ids"
|
||||
@ -102,6 +108,18 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
|
||||
%doc %{_datadir}/gtk-doc/html/gnome-desktop3/
|
||||
|
||||
%changelog
|
||||
* Tue Oct 21 2014 Rui Matos <rmatos@redhat.com> - 3.10.2-3
|
||||
- Resolves: rhbz#1150199 - many kbd layouts not selectable
|
||||
|
||||
* Tue Nov 26 2013 Rui Matos <rmatos@redhat.com> - 3.10.2-2
|
||||
- Resolves: rhbz#1008965 - mouse cursor sometimes disappears on login
|
||||
|
||||
* Thu Nov 21 2013 Matthias Clasen <mclasen@redhat.com> - 3.10.2-1.fc20
|
||||
- Update to 3.10.2
|
||||
|
||||
* Tue Oct 15 2013 Richard Hughes <rhughes@redhat.com> - 3.10.1-1
|
||||
- Update to 3.10.1
|
||||
|
||||
* Tue Sep 24 2013 Kalev Lember <kalevlember@gmail.com> - 3.10.0-1
|
||||
- Update to 3.10.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user