[at-spi2-core: 1/6] atspi-misc: Remove unused allow_sync logic




commit 7d700edf2c1f9e6068344571c6a09032ff3a648d
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jul 6 21:58:34 2022 -0500

    atspi-misc: Remove unused allow_sync logic
    
    This was added in 6395af932862454ed292d3623c18c59218ecbe7e but never
    used.

 atspi/atspi-misc-private.h |  7 -------
 atspi/atspi-misc.c         | 35 -----------------------------------
 2 files changed, 42 deletions(-)
---
diff --git a/atspi/atspi-misc-private.h b/atspi/atspi-misc-private.h
index fb78b02b..e76a1a94 100644
--- a/atspi/atspi-misc-private.h
+++ b/atspi/atspi-misc-private.h
@@ -149,7 +149,6 @@ typedef enum
 {
   ATSPI_ERROR_APPLICATION_GONE,
   ATSPI_ERROR_IPC,
-  ATSPI_ERROR_SYNC_NOT_ALLOWED,
 } AtspiError;
 
 extern GMainLoop *atspi_main_loop;
@@ -161,12 +160,6 @@ gchar *_atspi_name_compat (gchar *in);
 
 GHashTable *_atspi_dbus_update_cache_from_dict (AtspiAccessible *accessible, DBusMessageIter *iter);
 
-gboolean _atspi_get_allow_sync ();
-
-gboolean _atspi_set_allow_sync (gboolean val);
-
-void _atspi_set_error_no_sync (GError **error);
-
 gboolean _atspi_prepare_screen_reader_interface ();
 
 gchar * _atspi_strdup_and_adjust_for_dbus (const char *s);
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index d7a6b924..1fb39929 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -43,7 +43,6 @@ static DBusConnection *bus = NULL;
 static GHashTable *live_refs = NULL;
 static gint method_call_timeout = 800;
 static gint app_startup_time = 15000;
-static gboolean allow_sync = TRUE;
 
 GMainLoop *atspi_main_loop;
 GMainContext *atspi_main_context;
@@ -1103,12 +1102,6 @@ _atspi_dbus_call (gpointer obj, const char *interface, const char *method, GErro
   if (!check_app (aobj->app, error))
     return FALSE;
 
-  if (!allow_sync)
-  {
-    _atspi_set_error_no_sync (error);
-    return FALSE;
-  }
-
   va_start (args, type);
   dbus_error_init (&err);
   set_timeout (aobj->app);
@@ -1213,12 +1206,6 @@ _atspi_dbus_get_property (gpointer obj, const char *interface, const char *name,
   if (!check_app (aobj->app, error))
     return FALSE;
 
-  if (!allow_sync)
-  {
-    _atspi_set_error_no_sync (error);
-    return FALSE;
-  }
-
   message = dbus_message_new_method_call (aobj->app->bus_name,
                                           aobj->path,
                                           "org.freedesktop.DBus.Properties",
@@ -1866,28 +1853,6 @@ _atspi_dbus_update_cache_from_dict (AtspiAccessible *accessible, DBusMessageIter
   return cache;
 }
 
-gboolean
-_atspi_get_allow_sync ()
-{
-  return allow_sync;
-}
-
-gboolean
-_atspi_set_allow_sync (gboolean val)
-{
-  gboolean ret = allow_sync;
-
-  allow_sync = val;
-  return ret;
-}
-
-void
-_atspi_set_error_no_sync (GError **error)
-{
-  g_set_error_literal (error, ATSPI_ERROR, ATSPI_ERROR_SYNC_NOT_ALLOWED,
-                        _("Attempted synchronous call where prohibited"));
-}
-
 static const char *sr_introspection = "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object 
Introspection 1.0//EN\"\n"
 "\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\";>\n"
 "<node name=\"/org/a11y/atspi/screenreader\">\n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]