summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorElijah Newren <newren gmail com>2006-05-15 18:46:26 +0000
committerElijah Newren <newren@src.gnome.org>2006-05-15 18:46:26 +0000
commit1a161083100d56b6cfd2a3fda04dcfdc746a9f9e (patch)
tree74154003ae5a96dc006f5f7c1f2f1165f7c5fccd /src/main.c
parent3cb72d338c1b0f376f2429d75fc886f841f1a833 (diff)
downloadmetacity-1a161083100d56b6cfd2a3fda04dcfdc746a9f9e.tar.gz
metacity-1a161083100d56b6cfd2a3fda04dcfdc746a9f9e.tar.bz2
Revert the accessibility module loading workaround from Gnome 2.6, since
2006-05-15 Elijah Newren <newren gmail com> Revert the accessibility module loading workaround from Gnome 2.6, since gtk+ has long since fixed this for us. #123372. * src/Makefile.am: remove METACITY_LIBDIR define * src/main.c (find_accessibility_module, accessibility_invoke_module, accessibility_invoke, main): remove the first three of these functions and all calls to them * src/tabpopup.c (meta_ui_tab_popup_new): not sure if this part of 120025 needed to be reverted but doing the reversion, if wrong, is the best way to get someone from the accessibility team to scream, er, I mean comment. ;-)
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/src/main.c b/src/main.c
index ab4bc8d..f67b6c5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,11 +30,6 @@
#include "prefs.h"
#include <glib-object.h>
-#include <gmodule.h>
-#ifdef HAVE_GCONF
-#include <gconf/gconf-client.h>
-#endif
-
#include <stdlib.h>
#include <sys/types.h>
@@ -75,90 +70,6 @@ version (void)
exit (0);
}
-#define GNOME_ACCESSIBILITY_KEY "/desktop/gnome/interface/accessibility"
-
-static char *
-find_accessibility_module (const char *libname)
-{
- char *path;
- char *fname;
- char *retval;
-
- retval = NULL;
-
- fname = g_strconcat (libname, "." G_MODULE_SUFFIX, NULL);
- path = g_strconcat (METACITY_LIBDIR"/gtk-2.0/modules", G_DIR_SEPARATOR_S, fname, NULL);
-
- if (g_file_test (path, G_FILE_TEST_EXISTS))
- retval = path;
-
- if (path)
- retval = path;
- else
- g_free (path);
-
- g_free (fname);
-
- return retval;
-}
-
-static gboolean
-accessibility_invoke_module (const char *libname,
- gboolean init)
-{
- GModule *handle;
- void (*invoke_fn) (void);
- const char *method;
- gboolean retval = FALSE;
- char *module_name;
-
- if (init)
- method = "gnome_accessibility_module_init";
- else
- method = "gnome_accessibility_module_shutdown";
-
- module_name = find_accessibility_module (libname);
-
- if (!module_name)
- {
- g_warning ("Accessibility: failed to find module '%s' which "
- "is needed to make this application accessible",
- libname);
-
- }
- else if (!(handle = g_module_open (module_name, G_MODULE_BIND_LAZY)))
- {
- g_warning ("Accessibility: failed to load module '%s': '%s'",
- libname, g_module_error ());
-
- }
- else if (!g_module_symbol (handle, method, (gpointer *)&invoke_fn))
- {
- g_warning ("Accessibility: error library '%s' does not include "
- "method '%s' required for accessibility support",
- libname, method);
- g_module_close (handle);
-
- }
- else
- {
- retval = TRUE;
- invoke_fn ();
- }
-
- g_free (module_name);
-
- return retval;
-}
-
-static gboolean
-accessibility_invoke (gboolean init)
-{
- accessibility_invoke_module ("libgail", init);
- accessibility_invoke_module ("libatk-bridge", init);
- return TRUE;
-}
-
static void
meta_print_compilation_info (void)
{
@@ -475,20 +386,6 @@ main (int argc, char **argv)
if (!meta_display_open ())
meta_exit (META_EXIT_ERROR);
- {
- gboolean do_init_a11y;
- do_init_a11y = FALSE;
-
-#ifdef HAVE_GCONF
- do_init_a11y = gconf_client_get_bool (
- gconf_client_get_default (),
- GNOME_ACCESSIBILITY_KEY, NULL);
-#endif
-
- if (do_init_a11y)
- accessibility_invoke (TRUE);
- }
-
g_main_run (meta_main_loop);
{