1999-01-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtkdtree.c (gtk_dtree_load_path): Keep track of when we are loading the tree (and thus we do not care about async notifications to the tree state changes) and when we are done (and thus, we care about the async treestore structure notifications).
Этот коммит содержится в:
родитель
51ee2d1b05
Коммит
7e4deeeda7
@ -1,3 +1,10 @@
|
||||
1999-01-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gtkdtree.c (gtk_dtree_load_path): Keep track of when we are
|
||||
loading the tree (and thus we do not care about async
|
||||
notifications to the tree state changes) and when we are done (and
|
||||
thus, we care about the async treestore structure notifications).
|
||||
|
||||
1999-01-23 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gcmd.c (ep_add_callback): Set Window's position to
|
||||
|
@ -127,9 +127,12 @@ gtk_dtree_load_path (GtkDTree *dtree, char *path, GtkCTreeNode *parent, int leve
|
||||
g_assert (parent);
|
||||
g_assert (dtree);
|
||||
|
||||
dtree->loading_dir++;
|
||||
dir = tree_store_opendir (path);
|
||||
if (!dir)
|
||||
if (!dir){
|
||||
dtree->loading_dir--;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (; (dirent = tree_store_readdir (dir)) != NULL; ){
|
||||
GtkCTreeNode *sibling;
|
||||
@ -151,7 +154,8 @@ gtk_dtree_load_path (GtkDTree *dtree, char *path, GtkCTreeNode *parent, int leve
|
||||
}
|
||||
|
||||
tree_store_closedir (dir);
|
||||
|
||||
dtree->loading_dir--;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -375,6 +379,9 @@ entry_removed_callback (tree_entry *tree, void *data)
|
||||
GtkDTree *dtree = data;
|
||||
char *dirname, *copy, *current ;
|
||||
|
||||
if (dtree->loading_dir)
|
||||
return;
|
||||
|
||||
copy = dirname = g_strdup (tree->name);
|
||||
copy++;
|
||||
current_node = dtree->root_node;
|
||||
@ -403,6 +410,9 @@ entry_added_callback (tree_entry *tree, void *data)
|
||||
GtkDTree *dtree = data;
|
||||
char *dirname, *copy, *current, *npath, *full_path;
|
||||
|
||||
if (dtree->loading_dir)
|
||||
return;
|
||||
|
||||
copy = dirname = g_strdup (tree->name);
|
||||
copy++;
|
||||
current_node = dtree->root_node;
|
||||
|
@ -31,7 +31,8 @@ typedef struct {
|
||||
GdkBitmap *bitmap_open;
|
||||
GdkBitmap *bitmap_close;
|
||||
|
||||
int internal;
|
||||
unsigned short internal;
|
||||
unsigned short loading_dir;
|
||||
int *show_dot_files;
|
||||
} GtkDTree;
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user