Commit 6f1a9d46 authored by Noah Levitt's avatar Noah Levitt Committed by Noah Levitt

Don't look at the same directory twice (in simple cases). (#120342)

2003-08-20  Noah Levitt  <nlevitt@columbia.edu>

	* gtk/queryimmodules.c: Don't look at the same directory twice (in
	simple cases). (#120342)
parent c8a9d283
2003-08-20 Noah Levitt <nlevitt@columbia.edu>
* gtk/queryimmodules.c: Don't look at the same directory twice (in
simple cases). (#120342)
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
......
2003-08-20 Noah Levitt <nlevitt@columbia.edu>
* gtk/queryimmodules.c: Don't look at the same directory twice (in
simple cases). (#120342)
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
......
2003-08-20 Noah Levitt <nlevitt@columbia.edu>
* gtk/queryimmodules.c: Don't look at the same directory twice (in
simple cases). (#120342)
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
......
2003-08-20 Noah Levitt <nlevitt@columbia.edu>
* gtk/queryimmodules.c: Don't look at the same directory twice (in
simple cases). (#120342)
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
......
2003-08-20 Noah Levitt <nlevitt@columbia.edu>
* gtk/queryimmodules.c: Don't look at the same directory twice (in
simple cases). (#120342)
Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/gdkwindow.c: Make the layers in the paint stack have their
......
......@@ -158,29 +158,36 @@ int main (int argc, char **argv)
{
char **dirs;
int i;
GHashTable *dirs_done;
path = gtk_rc_get_im_module_path ();
g_printf ("# ModulesPath = %s\n#\n", path);
dirs = pango_split_file_list (path);
dirs_done = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
for (i=0; dirs[i]; i++)
{
GDir *dir = g_dir_open (dirs[i], 0, NULL);
if (dir)
{
const char *dent;
while ((dent = g_dir_read_name (dir)))
{
if (g_str_has_suffix (dent, SOEXT))
error |= query_module (dirs[i], dent);
}
g_dir_close (dir);
}
}
if (!g_hash_table_lookup (dirs_done, dirs[i]))
{
GDir *dir = g_dir_open (dirs[i], 0, NULL);
if (dir)
{
const char *dent;
while ((dent = g_dir_read_name (dir)))
{
if (g_str_has_suffix (dent, SOEXT))
error |= query_module (dirs[i], dent);
}
g_dir_close (dir);
}
g_hash_table_insert (dirs_done, dirs[i], GUINT_TO_POINTER (TRUE));
}
g_hash_table_destroy (dirs_done);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment