gnome-settings-daemon r595 - in trunk: . plugins/a11y-keyboard plugins/media-keys
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r595 - in trunk: . plugins/a11y-keyboard plugins/media-keys
- Date: Thu, 6 Nov 2008 19:43:00 +0000 (UTC)
Author: behdad
Date: Thu Nov 6 19:43:00 2008
New Revision: 595
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=595&view=rev
Log:
2008-11-06 Behdad Esfahbod <behdad gnome org>
* plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
(start_a11y_keyboard_idle_cb), (gsd_a11y_keyboard_manager_start):
Start manager in idle callback (bug #559564)
* plugins/media-keys/gsd-media-keys-manager.c
(start_media_keys_idle_cb), (gsd_media_keys_manager_start):
Start manager in idle callback (bug #559564). Leave the acme
initialization in the main start function to force gstreamer
cache up to date check before we let other applications start.
Modified:
trunk/ChangeLog
trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
trunk/plugins/media-keys/gsd-media-keys-manager.c
Modified: trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
==============================================================================
--- trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c (original)
+++ trunk/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c Thu Nov 6 19:43:00 2008
@@ -71,12 +71,6 @@
#endif /* HAVE_LIBNOTIFY */
};
-#define GSD_KBD_A11Y_ERROR gsd_kbd_a11y_error_quark ()
-
-enum {
- GSD_KBD_A11Y_ERROR_NOT_AVAILABLE
-};
-
static void gsd_a11y_keyboard_manager_class_init (GsdA11yKeyboardManagerClass *klass);
static void gsd_a11y_keyboard_manager_init (GsdA11yKeyboardManager *a11y_keyboard_manager);
static void gsd_a11y_keyboard_manager_finalize (GObject *object);
@@ -92,12 +86,6 @@
#define d(str) do { } while (0)
#endif
-static GQuark
-gsd_kbd_a11y_error_quark (void)
-{
- return g_quark_from_static_string ("gsd-kbd-a11y-error-quark");
-}
-
static gboolean
xkb_enabled (GsdA11yKeyboardManager *manager)
{
@@ -997,23 +985,17 @@
*notify = gconf_client_notify_add (client, path, func, manager, NULL, NULL);
}
-gboolean
-gsd_a11y_keyboard_manager_start (GsdA11yKeyboardManager *manager,
- GError **error)
+static gboolean
+start_a11y_keyboard_idle_cb (GsdA11yKeyboardManager *manager)
{
guint event_mask;
GConfClient *client;
- gboolean ret = FALSE;
g_debug ("Starting a11y_keyboard manager");
gnome_settings_profile_start (NULL);
- if (!xkb_enabled (manager)) {
- g_set_error (error, GSD_KBD_A11Y_ERROR,
- GSD_KBD_A11Y_ERROR_NOT_AVAILABLE,
- "XKB functionality is disabled.");
+ if (!xkb_enabled (manager))
goto out;
- }
client = gconf_client_get_default ();
@@ -1043,11 +1025,24 @@
maybe_show_status_icon (manager);
- ret = TRUE;
-
out:
gnome_settings_profile_end (NULL);
- return ret;
+
+ return FALSE;
+}
+
+
+gboolean
+gsd_a11y_keyboard_manager_start (GsdA11yKeyboardManager *manager,
+ GError **error)
+{
+ gnome_settings_profile_start (NULL);
+
+ g_idle_add ((GSourceFunc) start_a11y_keyboard_idle_cb, manager);
+
+ gnome_settings_profile_end (NULL);
+
+ return TRUE;
}
void
Modified: trunk/plugins/media-keys/gsd-media-keys-manager.c
==============================================================================
--- trunk/plugins/media-keys/gsd-media-keys-manager.c (original)
+++ trunk/plugins/media-keys/gsd-media-keys-manager.c Thu Nov 6 19:43:00 2008
@@ -914,9 +914,8 @@
return GDK_FILTER_CONTINUE;
}
-gboolean
-gsd_media_keys_manager_start (GsdMediaKeysManager *manager,
- GError **error)
+static gboolean
+start_media_keys_idle_cb (GsdMediaKeysManager *manager)
{
GSList *l;
@@ -932,11 +931,6 @@
init_screens (manager);
init_kbd (manager);
- /* initialise Volume handler */
- gnome_settings_profile_start ("acme_volume_new");
- manager->priv->volume = acme_volume_new ();
- gnome_settings_profile_end ("acme_volume_new");
-
/* Start filtering the events */
for (l = manager->priv->screens; l != NULL; l = l->next) {
gnome_settings_profile_start ("gdk_window_add_filter");
@@ -952,6 +946,29 @@
gnome_settings_profile_end (NULL);
+ return FALSE;
+}
+
+gboolean
+gsd_media_keys_manager_start (GsdMediaKeysManager *manager,
+ GError **error)
+{
+ gnome_settings_profile_start (NULL);
+
+ /* initialise Volume handler
+ *
+ * We do this one here to force checking gstreamer cache, etc.
+ * The rest (grabbing and setting the keys) can happen in an
+ * idle.
+ */
+ gnome_settings_profile_start ("acme_volume_new");
+ manager->priv->volume = acme_volume_new ();
+ gnome_settings_profile_end ("acme_volume_new");
+
+ g_idle_add ((GSourceFunc) start_media_keys_idle_cb, manager);
+
+ gnome_settings_profile_end (NULL);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]