[yast-devel] UI::GetDisplayInfo doesn't contain "HasLocalImageSupport" (anymore?)
Hi, Today I was debugging how to show icons in Report module because I remembered seeing them while calling, e.g., Report::Error() functions in the past. Then I found that *UI::GetDisplayInfo* doesn't return *HasLocalImageSupport* key and some modules rely on that information: seven:/usr/share/YaST2 # grep -r "HasLocalImageSupport" * | grep -v "^Binary file" clients/hwinfo.ycp: if ((boolean) ui_info["HasLocalImageSupport"]:false == false) return `Empty(); modules/SignatureCheckDialogs.ycp: has_local_image_support = ui_capabilities["HasLocalImageSupport"]:false; modules/SourceManagerSLP.ycp: if ((boolean) ui_info["HasLocalImageSupport"]:false == false) return `Empty(); modules/SlideShowCallbacks.ycp: if ( ui_capabilities[ "HasLocalImageSupport" ]:false ) (I've already fixed the Popup library...) This is what UI::GetDisplayInfo currently returns for me: $[ "Colors":16777216, "DefaultHeight":735, "DefaultWidth":1176, "Depth":24, "HasAnimationSupport":true, "HasFullUtf8Support":true, "HasIconSupport":true, "HasImageSupport":true, "Height":1050, "LeftHandedMouse":false, "RichTextSupportsTable":true, "TextMode":false, "Width":1680 ] Has the key been dropped or changed to "HasImageSupport" or "HasIconSupport"? Is there a documentation for the keys returned? Well, there is something, I wrote that examples there :) http://forgeftp.novell.com/yast/doc/SL11.1/tdg/YCP_UI_GetDisplayInfo.html but it might be helpful to describe every single key. Any volunteer, please? Thx && Bye Lukas -- Lukas Ocilka, YaST Developer (xn--luk-gla45d) ----------------------------------------------------------------- Ano, ano. Moudry rozkaz. Sam jsem nemel v tech gratulacich jasno.
On Freitag, 11. Juli 2008, Lukas Ocilka wrote:
Today I was debugging how to show icons in Report module because I remembered seeing them while calling, e.g., Report::Error() functions in the past.
Then I found that *UI::GetDisplayInfo* doesn't return *HasLocalImageSupport* key and some modules rely on that information
That was another capability. This was the ability to use an image file name (i.e. a local file - local meaning on the machine the UI runs on, which might have been another machine than the WFM machine or the installation target machine) rather than using SCR::Read() on a file into a YCP "byteblock" and using that byteblock for an YImage widget. That byteblock technique is now history. The YImage widget now always uses an image file name. So that UI capability doesn't make sense at all any more. What those modules did want to query was whether or not the UI can display images at all. That's "HasImageSupport". But it's not very useful, nor ist it necessary: UIs that cannot handle images will simply not display one, i.e., the YImage widget doesn't display anything - without any complaint. CU -- Stefan Hundhammer <sh@suse.de> Penguin by conviction. YaST2 Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Nürnberg, Germany -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Lukas Ocilka
-
Stefan Hundhammer