[gtk/matthiasc/for-master: 11/11] Stop setting GTK_IM_MODULE_FILE



commit 01fbf8444b75089003d6b29e2a15d83016b62124
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 28 13:08:44 2020 -0400

    Stop setting GTK_IM_MODULE_FILE
    
    GTK no longer reads this environment variable, so
    setting it can have no benefit for uninstalled demos
    anymore.

 demos/gtk-demo/main.c   | 10 ----------
 tests/testcombochange.c |  9 ---------
 tests/testdnd.c         |  9 ---------
 tests/testgtk.c         | 11 +----------
 4 files changed, 1 insertion(+), 38 deletions(-)
---
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index b1b6724d33..7899268891 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -1197,16 +1197,6 @@ main (int argc, char **argv)
   };
   int i;
 
-  /* Most code in gtk-demo is intended to be exemplary, but not
-   * these few lines, which are just a hack so gtk-demo will work
-   * in the GTK tree without installing it.
-   */
-  if (g_file_test ("../../modules/input/immodules.cache", G_FILE_TEST_EXISTS))
-    {
-      g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/immodules.cache", TRUE);
-    }
-  /* -- End of hack -- */
-
   app = gtk_application_new ("org.gtk.Demo4", G_APPLICATION_NON_UNIQUE|G_APPLICATION_HANDLES_COMMAND_LINE);
 
   g_action_map_add_action_entries (G_ACTION_MAP (app),
diff --git a/tests/testcombochange.c b/tests/testcombochange.c
index 01bac3379a..a72a44ad46 100644
--- a/tests/testcombochange.c
+++ b/tests/testcombochange.c
@@ -26,13 +26,6 @@ GArray *contents;
 
 static char next_value = 'A';
 
-static void
-test_init (void)
-{
-  if (g_file_test ("../modules/input/immodules.cache", G_FILE_TEST_EXISTS))
-    g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE);
-}
-
 G_GNUC_PRINTF (1, 2) static void
 combochange_log (const char *fmt,
                  ...)
@@ -200,8 +193,6 @@ main (int argc, char **argv)
   GtkWidget *combo;
   GtkCellRenderer *cell_renderer;
 
-  test_init ();
-
   gtk_init ();
 
   model = gtk_list_store_new (1, G_TYPE_STRING);
diff --git a/tests/testdnd.c b/tests/testdnd.c
index b81f938dca..ea6e468e38 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -493,13 +493,6 @@ popsite_leave (GtkDropControllerMotion *motion)
     }
 }
 
-static void
-test_init (void)
-{
-  if (g_file_test ("../modules/input/immodules.cache", G_FILE_TEST_EXISTS))
-    g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE);
-}
-
 static void
 quit_cb (GtkWidget *widget,
          gpointer   data)
@@ -528,8 +521,6 @@ main (int argc, char **argv)
   GtkEventController *controller;
   gboolean done = FALSE;
 
-  test_init ();
-  
   gtk_init ();
 
   window = gtk_window_new ();
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 28bd0db358..791ea10f46 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5987,13 +5987,6 @@ create_main_window (void)
   gtk_widget_show (window);
 }
 
-static void
-test_init (void)
-{
-  if (g_file_test ("../modules/input/immodules.cache", G_FILE_TEST_EXISTS))
-    g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE);
-}
-
 static char *
 pad (const char *str, int to)
 {
@@ -6110,9 +6103,7 @@ main (int argc, char *argv[])
 
   srand (time (NULL));
 
-  test_init ();
-
-  g_set_application_name ("GTK+ Test Program");
+  g_set_application_name ("GTK Test Program");
 
 #ifdef GTK_SRCDIR
   g_chdir (GTK_SRCDIR);


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