Lukas Ocilka wrote:
I've just used these functions in installation scripts so I can handle installation progresses as I want. I hope it will also remove the unneeded second progress bar that appears for a very short time when initializing the installation repository.
It should be also disabled by the new function.
Hmm, anyway, how can I re-register another function for downloading a file? Image deployment downloads images if needed (Pkg::SourceProvideOptionalFile?) and I don't want pop-ups to appear there.
Will is work to RegisterEmptyProgressCallbacks, RegisterMySpecialCallback and then RestorePreviousProgressCallbacks? Doesn't the RestorePreviousProgressCallbacks function have a bit confusing name :), previous?
The previous are the standard callbacks in this case (the standard callbacks are registered in PackageCallbacks constructor.) But it shouldn't break if there is no previous callback registered :-) In the case above you should do: - RegisterEmptyProgressCallbacks - RegisterMySpecialCallback - UnregisterMySpecialCallback - RestorePreviousProgressCallbacks The new functions: void RegisterMySpecialCallback() { Pkg::CallbackProgressDownload (MyProgressHandler); } void UnregisterMySpecialCallback() { Pkg::CallbackProgressDownload (nil); } The most important thing it to register/unregister the same callbacks in RegisterMySpecialCallback() and UnregisterMySpecialCallback() functions. Otherwise RestorePreviousProgressCallbacks() won't restore the previous state correctly. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org