Overview about smart classes/functions etc.

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


Christian Metzen wrote:

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

There's some code that is done in the interface, that is either
duplicated between classes - or should be in the "main".

I made a branch at https://code.launchpad.net/~afb/smart/gtk
with only the refactorings and not the other changes...

> Already have it running here. :-) But some problems are still  
> there, see
> attached screenshot. Some tweaking needs to be done from my pov,
> progressbars are sometimes not correct and some event refreshs need  
> to be
> added ( e.g. when downloading a package. )

Progressbars are problematic in smart, due to multi-threading.
Some versions of GTK+ have similar problems (with deadlocks).

"Normal" interfaces do updates in the main thread, and heavy
processing in a sub thread. But smart does the processing in
the main thread, and the gui updates in a sub thread instead.
That works rather poorly on most platforms, except Linux GTK+...

So the workaround for now is to disable(!) those gui updates,
until the smart core can be changed to do it the other way.

> Perhaps i could make some changes in it and submit them?

Sure. Either make a branch yourself, or use "bzr send" to me.

PyQt4 should probably go in a separate (new) branch, though ?

>> So maybe it would be better to do for "Smart 2.0", along with Python
>> 3000 ?
>
> Agree, seems to be hard to get some pacthes in smart sometimes isn'  
> t it?
> Would be some more changes be accepted....

Yes, the Smart releases and merging happens very infrequently.

The roadmap is at https://launchpad.net/smart/+milestone/1.3
(things like "In Progress" and "Development" are Launchpad's
definition, sometimes equates to "pending testing and release")
I am myself currently not doing any active development on Smart.

I do have some ideas, but the feature/buglist is long enough...

> Whats the latest version of your qt interface? Perhaps i should  
> start with
> that, not sure if the webinterface gave me what i need. Is it  
> enough to
> download interfaces/qt and the added images or are there any other  
> changes
> done for this?

The latest is at https://code.launchpad.net/~smartpm/smart/qt

For your problem, if you use Unicode package names then you'll
need "unicode()" instead of "str()" - mine are all in ASCII.

If you run into any other issues, be sure to mention them too!

--anders




More information about the Smart mailing list