RE: Directory/file browser as TreeView
- From: "Ratcliffe, Jeffrey (Peters)" <Jeffrey Ratcliffe External eads com>
- To: gtk-perl-list gnome org
- Subject: RE: Directory/file browser as TreeView
- Date: Thu, 28 Sep 2006 07:42:52 +0200
(having to store the directory path as a hidden
column seems rather hackish to me - but I couldn't work out how to get
the
parent from an iter)
treeiter = $tree_model->iter_parent ($child)
Thanks. I must be blind. But on reflection, what I already did is certainly faster than walking back up the
tree every time the path needs to be checked.
use constant TRUE => 1;
use constant FALSE => 0;
use Glib qw(TRUE FALSE);
OK. I had always assumed that this:
1. loaded Glib, taking time and memory.
2. amounted to the same thing anyway.
my $window = Gtk2::Window -> new;
$window -> signal_connect ( 'delete_event', sub { Gtk2 -> main_quit; }
);
Connect this to 'destroy' instead of 'delete-event'. The handler for
OK. Thanks!
$tree_store->set($child, 0, '/', 1, '/');
add_to_tree($tree_store, $child, '/', '/');
For shame! Use File::Spec to manipulate the paths portably! :-)
Yeah, I know, but as I didn't have access to a Windows (or VMS, etc.), version to check, I thought I'd leave
it simple. And particularly, I couldn't remember off the top of my head how to get what volumes are available
from Win32 (or VMS - but that is 16 years ago).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]