mirror of https://github.com/MidnightCommander/mc
Memory leak fix.
Double-free fixed. Tree will do proper thing when dealing with symlinks Miguel.
This commit is contained in:
parent
927ea8f052
commit
70d31806e1
|
@ -1,3 +1,13 @@
|
||||||
|
1999-01-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtkdtree.c (gtk_dtree_do_select_dir): Select the node, and test
|
||||||
|
against full visibility of a node.
|
||||||
|
|
||||||
|
* gscreen.c (panel_fill_panel_icons): While loading the icon list,
|
||||||
|
mark those items that are selected as, well, ahem, selected.
|
||||||
|
(x_fill_panel): Use the system getwd routine to find out the real
|
||||||
|
location in the file system
|
||||||
|
|
||||||
1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gpageprop.c (item_properties): Use file contexts appropriately.
|
* gpageprop.c (item_properties): Use file contexts appropriately.
|
||||||
|
|
|
@ -226,9 +226,12 @@ panel_fill_panel_icons (WPanel *panel)
|
||||||
|
|
||||||
for (i = 0; i < top; i++){
|
for (i = 0; i < top; i++){
|
||||||
file_entry *fe = &panel->dir.list [i];
|
file_entry *fe = &panel->dir.list [i];
|
||||||
|
int p;
|
||||||
|
|
||||||
image = gicon_get_icon_for_file (fe);
|
image = gicon_get_icon_for_file (fe);
|
||||||
gnome_icon_list_append_imlib (icons, image, fe->fname);
|
p = gnome_icon_list_append_imlib (icons, image, fe->fname);
|
||||||
|
if (fe->f.marked)
|
||||||
|
gnome_icon_list_select_icon (icons, p);
|
||||||
}
|
}
|
||||||
/* This is needed as the gtk_clist_append changes selected under us :-( */
|
/* This is needed as the gtk_clist_append changes selected under us :-( */
|
||||||
panel->selected = selected;
|
panel->selected = selected;
|
||||||
|
@ -249,7 +252,13 @@ x_fill_panel (WPanel *panel)
|
||||||
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (panel->tree), panel);
|
gtk_signal_handler_block_by_data (GTK_OBJECT (panel->tree), panel);
|
||||||
|
|
||||||
gtk_dtree_select_dir (GTK_DTREE (panel->tree), panel->cwd);
|
if (vfs_current_is_local ()){
|
||||||
|
char buffer [MC_MAXPATHLEN];
|
||||||
|
|
||||||
|
get_current_wd (buffer, sizeof (buffer)-1);
|
||||||
|
gtk_dtree_select_dir (GTK_DTREE (panel->tree), buffer);
|
||||||
|
} else
|
||||||
|
gtk_dtree_select_dir (GTK_DTREE (panel->tree), panel->cwd);
|
||||||
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (panel->tree), panel);
|
gtk_signal_handler_unblock_by_data (GTK_OBJECT (panel->tree), panel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,8 @@ gtk_dtree_do_select_dir (GtkDTree *dtree, char *path)
|
||||||
g_free (npath);
|
g_free (npath);
|
||||||
|
|
||||||
if (current_node){
|
if (current_node){
|
||||||
if (!gtk_ctree_node_is_visible (GTK_CTREE (dtree), current_node)){
|
gtk_ctree_select (GTK_CTREE (dtree), current_node);
|
||||||
|
if (gtk_ctree_node_is_visible (GTK_CTREE (dtree), current_node) != GTK_VISIBILITY_FULL){
|
||||||
gtk_ctree_node_moveto (GTK_CTREE (dtree), current_node, 0, 0.5, 0.0);
|
gtk_ctree_node_moveto (GTK_CTREE (dtree), current_node, 0, 0.5, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,7 @@ tree_store_load (char *name)
|
||||||
int len, common;
|
int len, common;
|
||||||
int do_load;
|
int do_load;
|
||||||
|
|
||||||
g_return_val_if_fail (name != NULL, FALSE);
|
g_return_val_if_fail (name != NULL, TRUE);
|
||||||
|
|
||||||
if (ts.loaded)
|
if (ts.loaded)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -274,6 +274,7 @@ tree_store_load (char *name)
|
||||||
e->scanned = scanned;
|
e->scanned = scanned;
|
||||||
strcpy (oldname, name);
|
strcpy (oldname, name);
|
||||||
}
|
}
|
||||||
|
free (name);
|
||||||
}
|
}
|
||||||
fclose (file);
|
fclose (file);
|
||||||
}
|
}
|
||||||
|
@ -659,6 +660,7 @@ tree_store_end_check (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
free (ts.check_name);
|
free (ts.check_name);
|
||||||
|
ts.check_name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tree_entry *
|
tree_entry *
|
||||||
|
|
Loading…
Reference in New Issue