Stop setting GTK_IM_MODULE_FILE

GTK no longer reads this environment variable, so
setting it can have no benefit for uninstalled demos
anymore.
This commit is contained in:
Matthias Clasen 2020-06-28 13:08:44 -04:00
parent 1f8c79eca1
commit 01fbf8444b
4 changed files with 1 additions and 38 deletions

View File

@ -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),

View File

@ -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);

View File

@ -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 ();

View File

@ -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);