Issue 119402 - Throbber animation is never displayed
Throbber animation is never displayed
Status: RESOLVED FIXED
Product: App Dev
Classification: Unclassified
Component: api
OOo 3.3 or older
PC All
: P3 normal
: 4.0.0
Assigned To: Ariel Constenla-Haile
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 16:54 UTC by hanya
Modified: 2013-07-21 10:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
Example code to use SpinningProgressControlModel (12.28 KB, application/vnd.oasis.opendocument.text)
2012-05-22 16:54 UTC, hanya
no flags Details
Writer document with macros and dialogs to test the Throbber control (13.38 KB, application/vnd.oasis.opendocument.text)
2012-05-23 12:09 UTC, Ariel Constenla-Haile
no flags Details
Writer document with macros and dialogs to test the Throbber control with the deafult image sets (13.35 KB, application/vnd.oasis.opendocument.text)
2012-05-25 10:47 UTC, Ariel Constenla-Haile
no flags Details
Zipped folder with document and images to test the Throbber with custom image sets (111.74 KB, application/zip)
2012-05-25 10:53 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description hanya 2012-05-22 16:54:17 UTC
Created attachment 77579 [details]
Example code to use SpinningProgressControlModel

css.awt.SpinningProgressControlModel is introduced to replace css.awt.UnoControlThrobber and its model on 3.4. 
But it seems not work well, nothing shown for the position of the control. 
When I use css.awt.AnimatedImagesControl and css.awt.AnimatedImagesControlModel 
to show animated images, it works well. But I replace AnimatedImagesControlModel 
with SpinningProgressControlModel, nothing shown.

The attached document includes the macro to use SpinningProgressControlModel. 
- Open the attached document.
- Push "push" button on the document. -> dialog shown.
- spinning control should be shown at the left top corner of the dialog -> nothing
- spinning animation created with AnimatedImagesControlModel is shown in the dialog.
- Push "Animated" button -> shown one works well.

It seems this problem is caused by lacking of spinning images from images.zip.
Comment 1 Ariel Constenla-Haile 2012-05-23 05:35:52 UTC
(In reply to comment #0)
> It seems this problem is caused by lacking of spinning images from
> images.zip.

You are right: those images are not on the zip file, and the GraphicProvider (used in the toolkit code to retrieve the images, fails):

Sub Main
	Dim oGraphicProvider as Object
	oGraphicProvider = CreateUnoService("com.sun.star.graphic.GraphicProvider")

	oGraphic = GetGraphic(oGraphicProvider, "private:graphicrepository/toolkit/tk/spinner03-grey_11.png")
	oGraphic = GetGraphic(oGraphicProvider, "private:graphicrepository/shared/spinner-32-01.png")
End Sub

Function GetGraphic(oProvider as Object, sURL$)
	Dim aMediaProps(0) as new com.sun.star.beans.PropertyValue
	aMediaProps(0).Name  = "URL"
	aMediaProps(0).Value = sURL
	GetGraphic = oProvider.queryGraphic(aMediaProps)
End Function
Comment 2 Ariel Constenla-Haile 2012-05-23 05:37:03 UTC
Accepted.
Started.
Comment 3 Ariel Constenla-Haile 2012-05-23 05:52:36 UTC
Images are not in the zip file because they are not on the vcl image list (yes, images need to be in image list files in order to get zipped).

These images are not in the image list, because the file vcl/source/src/throbber.src is not processed at all. It has to be included in vcl/AllLangResTarget_vcl.mk.

Once included, the file is processed, but the images are not in the image list file: throbber.src uses the wrong object (a Resource for each set of images), but only ImageList's or Bitmap's end up on an image list file.

Once fixed this using the right object to include the images in image list files, there is another issue: images cannot be located by the resource compiler.
Actually, they are in

default_images/shared
default_images/highcontrast/shared

The resource compiler searches in %MODULE% and in %GLOBALRES% and can't find them, for example:
vcl/hicontrast/shared/spinner-64-01.png
res/hicontrast/shared/spinner-64-01.png
Solution: the images cannot be in the top level directory, they must be inside res/ or vcl/
Comment 4 Ariel Constenla-Haile 2012-05-23 12:04:44 UTC
Changing the subject to reflect the issue implications: there is no Throbber displayed in any AOO dialog, for example:

* Menu "Help" - "Check for Updates...". In "Status", under "Checking" there should be a Throbber running.

* Menu "Tools" - "Extension Manager...", on the "Extension Manager" select "Check for Updates...". There should be a Throbber running on the upper right corner next to "Checking..."
Comment 5 Ariel Constenla-Haile 2012-05-23 12:09:17 UTC
Created attachment 77584 [details]
Writer document with macros and dialogs to test the Throbber control
Comment 6 Ariel Constenla-Haile 2012-05-25 10:40:55 UTC
Committed revision 1342557 and revision 1342560
Comment 7 Ariel Constenla-Haile 2012-05-25 10:47:32 UTC
Created attachment 77597 [details]
Writer document with macros and dialogs to test the Throbber control with the deafult image sets
Comment 8 Ariel Constenla-Haile 2012-05-25 10:53:15 UTC
Created attachment 77599 [details]
Zipped folder with document and images to test the Throbber with custom image sets

Unzip the folder. It contains:

- i119402_XAnimation.odt - a Writer document with macros and dialogs
- spinner - a folder with images
- butterfly - a folder with images

Do not move the images folders, because the macros rely on the folders being relative to the document in order to work.