[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gdselect alpha 3 [libapt]



Hi,

Well, I made some progress this weekend, and lost much sleep. The results
are in CVS; they require CVS Gnome to build, using the standard Gnome deal
(autogen.sh).

You were absolutely right about the issues with the tree widget. I ended
up writing a primitive experimental tree based on the GnomeCanvas. 
GnomeCanvas automatically redraws only the items on the screen (well, in
principle; I spent half of last night finding a bug which caused it to
draw all items). I even used some Gtk themes engine calls, so you can
theme your tree rows. Woo hoo.

The disadvantage to GnomeCanvas is memory use. I'm competing with Emacs. 
;-) (around 6 or 7 megs, though 3 megs are shared libs and 1 is probably
Gtk/Gnome's fault). It is quite fast though, with redraws debugged; it
seems as responsive as a GUI should be.  There are some obvious ways to
reduce memory use too, some of the code is moronic and doesn't even try to
keep it under control. 

I found your old screenshot and ripped off some ideas, and stole the xpm's
out of the apt module. Also stole some big hunks out of apt-get.

Display seems to work except for the Delete Keep Install on the left; I'm
not quite sure how these work. Why do some packages in your screenshot
have round radio buttons and some have square check boxes? If I could
interact with it how would it work?

I have sorting by name, priority, and section; the others are easy enough
to add, I'm just using STL sort. I am allowing "Ordering" (package sort) 
and "Grouping" (categories of package) to be set separately, so you can
have alpha order within each section for example. Could switch to
stable_sort within STL for a pipe effect (sort by status then name, or
whatever). 

Most of the other menu items are just stubbed with debug spew.

My tree arbitrarily stops at depth 2: category->package->dependencies, and
that's it. I don't know what the right thing to do here is.

The code is hideous and has relics of several abandoned approaches, plus
it's a bizarre C/C++ hybrid, it is bad. But works mostly. I'm embarassed
to see it next to the very nice main apt code. :-) 

Specific questions:

Is pkgCache::State::VerPriority supposed to have two members that are 5
and none that are 4? I think I am accessing it the wrong way anyway
because I get numbers that aren't in the enum. 

Where is the package description hiding? I don't see an accessor, though
I'm sure it's obvious. I should probably display this somewhere.

How do you debug this thing without hosing your system over and over?


Well I'm very tired, I'm sorry to be rambling. Anyone that wants to check
in changes please feel free... clean things up, or implement some of the
stubbed menu items, or whatever... feel free to leave "// Insert GUI here"
comments and just do the non-GUI part... to play with gnome-apt, you
double-click on tree rows to expand them, and right-click to get the
sort/group menu...

Havoc


 






Reply to: