windows 7 slide show gadget broken tags: help desk, javascript
|
misterhaan
radar
|
subject: windows 7 slide show gadget broken
posted: 12:25:49 pm, oct 27, 2009
when i first tried the windows 7 beta, i noticed the slide show gadget that i’d been using in vista didn’t work in 7. it just displayed the ie can’t find the image icon in the middle of a black box, and the settings for it behaved strangely and didn’t seem to actually change anything. i couldn’t find anything about it on the internet so apparently i was the only one having this problem (on both my desktop and my laptop). so i looked into writing my own gadget and learned that gadgets you install yourself end up as html, css, and javascript files in your users directory. i figured i’d see if that was true of the pre-installed gadgets as well, and it is — they are under fixing it is pretty simple. i could have just deleted the support for the pictures library altogether, but i went for leaving the support and handling the possibility that the library doesn’t exist. here’s the beginning of GetSlideShowSettings: function GetSlideshowSettings(){ var samplePictPath = System.Environment.getEnvironmentVariable("Public"); this.picturesLibraryFolder = System.Shell.knownFolderPath(FOLDERID_PICTURELIBRARY); this.picturesLibraryName = L_PICTURESLIBNAME_TEXT; this.myPicturesFolder = samplePictPath + "\\Pictures\\Sample Pictures"; FOLDERID_PICTURELIBRARY is the guid that no longer exists when you’ve deleted the pictures library. System.Shell.knownFolderPath() throws an exception if you give it a guid it can’t resolve to a path. since that’s reasonably possible, fix the code by catching the exception: function GetSlideshowSettings(){ try { this.picturesLibraryFolder = System.Shell.knownFolderPath(FOLDERID_PICTURELIBRARY); this.picturesLibraryName = L_PICTURESLIBNAME_TEXT; } catch(e) { this.picturesLibraryFolder = ""; this.picturesLibraryName = ""; } var samplePictPath = System.Environment.getEnvironmentVariable("Public"); this.myPicturesFolder = samplePictPath + "\\Pictures\\Sample Pictures"; this is enough to get it actually working, but it shows a blank option at the bottom of the folder selection dropdown. to handle no pictures library cleanly when building the dropdown, look at the end of the dropDownFromBrowse function: var picturesLibraryPath = slideSettings.picturesLibraryFolder;var picturesLibraryName = slideSettings.picturesLibraryName; imagePathSel.options[selectArray.length+2] = new Option(picturesLibraryName , picturesLibraryPath ); imagePathSel.options[selectArray.length+2].title = picturesLibraryName; it’s adding the pictures library option to the dropdown no matter what. since the catch statement above set slideSettings.picturesLibraryFolder to an empty string, all we have to do is check if picturesLibraryPath has a value and only add the pictures library option to the dropdown if it does: var picturesLibraryPath = slideSettings.picturesLibraryFolder;if(picturesLibraryPath) { var picturesLibraryName = slideSettings.picturesLibraryName; imagePathSel.options[selectArray.length+2] = new Option(picturesLibraryName , picturesLibraryPath ); imagePathSel.options[selectArray.length+2].title = picturesLibraryName; } the tricky part is actually managing to change the slideShow.js file. it’s owned by TrustedInstaller and nobody else has rights to change or delete it. so before editing the file, you need to take ownership and give yourself full control of the file. right-click the file and choose properties. go to the security tab and click the advanced button. go to the owner tab and click edit. continue through the user account control prompt, then select administrators as the new owner. click ok until all the properties, security, and owner windows are gone. go back into properties and the security tab. click edit, continue through the user account control prompt, select administrators in the list, and check the box for full control. click okay to get rid of the properties and permissions windows. you should now be able to make changes to slideShow.js. of course a workaround is to not delete the pictures library in the first place... please note that the above post is likely made up in its entirety. |
|
bs0d
television
|
subject: re: windows 7 slide show gadget broken
posted: 1:15:01 pm, nov 08, 2009
Hopefully Windows 7 is > Windows Vista I don't see why they need to keep releasing newer versions of operating systems... I think they've got a solid foundation so to speak. Just release optional upgrades... i dunno. -bs0d | AllSyntax.com |
|
misterhaan
radar
|
subject: re: windows 7 slide show gadget broken
posted: 3:14:20 pm, nov 11, 2009
i’ve found a couple things in 7 that are better than they were in vista:
then there are the things that are different but i don’t care much about:
please note that the above post is likely made up in its entirety. |
| anonymous |
subject: re: windows 7 slide show gadget broken
posted: 12:24:14 am, nov 20, 2009
Hi i have a problem with slideshow gadget in windows 7 ultimate.. I did the same method u mentioned above but in vain.. Kindly tell me alternative method to solve this problem plzzzzz |
|
misterhaan
radar
|
subject: re: windows 7 slide show gadget broken
posted: 12:54:58 pm, nov 20, 2009
that’s a different problem than the one i’m talking about here, so it’s going to have a different solution. looking further at the javascript file for the slideshow, this code seems to launch the image, likely in a larger viewer: case "reveal":System.Shell.execute(imagePathAndName); break; this should act the same as double-clicking the file. are you able to open image files by double-clicking them? if not, you probably need to fix your file associations. searching for “windows 7 restore associations photo gallery” should find you a way to do that (assuming you want to use the default image viewer, windows photo gallery). if that’s not your problem, it would be helpful to know what happens when you click the view button. please note that the above post is likely made up in its entirety. |
| anonymous |
subject: re: windows 7 slide show gadget broken
posted: 8:39:15 pm, feb 05, 2010
misterhaan, you are a gentleman and a scholar. Thank you. |
| anonymous |
subject: re: windows 7 slide show gadget broken
posted: 3:35:25 am, may 23, 2010
Hey I know this is an old post, but it seems like you might be able to help me out. I updated to Windows 7 64 bit recently, and I've had a few problems with the gadgets, the slideshow in particular. First of all, whenever I turn on the computer, it never comes up automatically. What's more frustrating, however, is that the options are completely unresponsive. No matter what changes I make to the options, they do not register and simply keep the default settings. Is there any way around this? Thanks. |
|
misterhaan
radar
|
subject: re: windows 7 slide show gadget broken
posted: 8:45:23 am, may 23, 2010
that sounds like the same problem i had from deleting the pictures library, described in the first post. if you deleted the pictures library you can fix it by editing the files as described in the first post. if you still have the pictures library i don’t know what else could cause this. please note that the above post is likely made up in its entirety. |

pm
www
quote



