Overview about smart classes/functions etc.

Anders F Björklund afb at algonet.se
Sat Jun 6 01:46:30 PDT 2009


Christian Metzen wrote:

>> Now, when you say "our own", does that mean with a diffent layout ?
>
> Different layout, yes this is one thought about that. Don' t  
> misunderstand
> this, i really like smart and we are now using it nearly since its
> beginning. But the gtk gui ( and so is the qt 3 gui you wrote ) is a
> little bit outdated about gui concepts. Most users want something more
> fresh and perhaps some more of smarts functions when querying  
> packages.

Right, there was similar discussion about the GTK+ version of the  
interface
like in e.g. https://blueprints.launchpad.net/smart/+spec/smartgui2 etc.
But so far it has been rather light on details, except for things like
"more tabs"... If you could make a list of the concepts, it'd help a  
lot.

Some things that could help the interface, like e.g. group icons or  
package
icons or screenshots, are missing from Smart's idea of a group or a  
package.
The PackageKit gathers such information from various external  
sources, but
for Smart it was deemed better to only show the information in the  
"cache".

> Well biggest question for the beginning... Which function calls the  
> main
> package list that displays in the center of the smart screen? I played
> arounf with packageview.py but somehow this whole stuff is really
> undocumented and somehow not really logically, especially for me  
> perhaps.

You'll find the main app in "interactive.py", it has the "_pv" field
that holds the PackageView that is used to display the packages...

Or you might be looking refreshPackages(), depends on what you mean.
It calls setPackages() on the PackageView, in order to display them.

>> The way the current graphic interface works is that there is a common
>> code, that calls upon a specific "interface" implementation to  
>> show it.
>>  From your description it sounds like you are writing an external  
>> app,
>> but Smart doesn't really have an external API - at least not  
>> explicitly.
>
> Well, thats right, an external app was the thought, having it  
> integrated
> into smarts layout would be fine too, but as far as i see right now  
> it' s
> really hard to somehow track this all down because  of this specific
> interface implementation thats not really documented in any way.  
> Make it
> hard for some external development doesn' t it?

Right, e.g. PackageKit has a similar problem with the "smart" backend...

The API and the API documentation should probably be improved for "1.4".
I made some suggestions on things that I think are missing at the  
moment,
they are available on Launchpad along with matching interface elements.
See https://code.launchpad.net/smart (and https://launchpad.net/smart)

And there's also some GUI stuff that could be refactored into common  
code.

>> The qt(3) interface should be more or less done, but the overall idea
>> about it is that it should be as similar as possible to the gtk  
>> one...
>
> Well understand that, but why not using qt4? As it amkes things really
> more lets say fancy for users. And perhaps integrate some more of  
> smarts
> basic functions?

Well, there was no *need* for anything fancy. And KDE 4 was really  
buggy,
additionally using Qt 3.3 made it work in both of the two  
environments...
It should be better now with KDE 4.2 and Qt 4.5, so it should be  
possible
to clone the "qt" interface into "qt3" and "qt4" and change the  
classes ?

But the main "stable" platforms, such as CentOS or Ubuntu LTS, uses  
KDE 3.
By the way, the main reason for writing it was better support for Mac  
OS X.
It didn't really work out (it looks and feels more "native", but  
still ugly)
so something else is needed to make it work "better" on Mac OS X or  
Windows.

I do have some plans, but the development funding isn't really clear  
yet.
The PyQt interface "works" meanwhile, if one wants to get away from  
GTK+.
* http://www.algonet.se/~afb/smart/smart-1.1-qt3-mac.png (Mac OS X 10.4)
* http://www.algonet.se/~afb/smart/smart-1.2-qt3-win.png (Windows XP)

If there are some major things done to the interface, I would rather see
those done consistently across all platforms than have it look  
different...
(so that it'd end up drifting apart, like Synaptic and Kynaptic or so  
on)
So maybe it would be better to do for "Smart 2.0", along with Python  
3000 ?

--anders




More information about the Smart mailing list