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)
This commit is contained in:
Noah Levitt 2003-08-20 22:05:24 +00:00 committed by Noah Levitt
parent c8a9d2839c
commit 6f1a9d469c
6 changed files with 46 additions and 14 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

@ -1,3 +1,8 @@
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

View File

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