The Magic Folder (version 1.6)

Well, I just posted The Magic Folder version 1.6.0.2 to the Windows Live Gallery site. At this point it will probably not be updated to the site until sometime tomorrow. However, this one comes with one great surprise:
 
  • As I stated in previous postings (below), you no longer need to enable file extensions in Windows Vista. This is a huge win for most users and I am beating myself up that I did not think about fixing this issue a long time ago. You will notice the new introduction screen no longer has the instructions for enabling file extensions. YEAH!
  • I fixed a small flashing issue a few people might have seen or experienced with the jump option and trimmed up the code a little – preparing it for version 2.0 – sometime in the future.  

I am currently working on getting a SideShow Gadget completed. There is even less documentation on SideShow gadgets than there are on SideBar gadgets. And from the SideShow gallery this is pretty evident. Plus SideShow is a super new technology and there are not a lot of devices that support it just yet…but that will change. 

Anyway, I am sort of time contrained and am going to try to get the thing posted ASAP. Keep a lookout…

I Figured it Out!

This is more for the developers out there following my blog…
 
Well, it turns out that the API (application programming interface) that I was using for detecting the files that were dragged to The Magic Folder gadget would not detect the extension if they were turned off. This is why the introduction screen advised you to turn on file extensions. Until a recent comment on my gadget page I NEVER thought of revisiting this UNTIL now. I have found some "unique" workarounds to limitations in the Gadget API sets over the last couple of months and the workaround to the file extensions issues was so incredibly simple that I am smacking myself for not trying it before now.
 
Windows Scripting File System Object has the basic solution:
 

// get the first file from the dragged file items using the System.Shell
// API for Vista Sidebar Gadgets.
var oFile = System.Shell.itemFromFileDrop(event.dataTransfer, 1);
// get an FSO object, then get the file from the path passed by the
// Gadget API …
var fso = new ActiveXObject("Scripting.FileSystemObject");
var filItem = fso.GetFile(oFile.path);
// Now get the file extension from it
var start = instrrev(filItem.Path,".");
var
len = filItem.Path.length – start;
var filExt = new String(filItem.Path.substr(start,len));

It was actually very simple to pull this solution inline with what is already created. Along with a few smaller updates – including an overhaul of the Introduction Screen, which has the instructions for turning ON file extensions yanked – version 1.6 is currently undergoing my test pass and I hope to get it posted first thing in the morning.

A big thank you to ctshiner whoever and wherever you are…you woke me up.

The Magic Folder version 1.5

The Magic Folder has been updated. The new version is version 1.5.0.1. Here is everything new in this version:
 
  • The flashing in the settings pane is gone when switching tabs. I describe how I fixed that in a previous Blog entry.
  • There have also been some requests to disable the file move confirmations, so now that is an option on the General tab.
  • I also reduced the verbiage on some of the settings to be more concise.
  • The Show Intro option has been moved to the about page.
  • Finally, when you move a folder to the gadget with the extensions disabled, the WHOLE folder is moved (all files and subfolders). In the past the folder would have been gutted of all the files leaving the folder itself and all subfolders (and this still happens with extensions enabled).

I submitted the update at 9:00AM today, so as per usual it is up to the Gallery folks as to how soon this update will be made available.

Back to work…

I took a few days and walked away from development to relax. I have been intensly working on The Magic Folder for several weeks now. Being a perfectionist, I am always trying to make it better and better. Well, I am currently finalizing another build but wanted to point out something interesting I found out over the last week.
 
I have been trying to find a way to get rid of the annoying flashing in the Settings dialog since I created it. I went to the Gadgets Forum and asked if anyone else had run into this problem. Despite the fact I have programmed in JavaScript and DHTML for years, I would only consider myself an intermediate programmer in that area partially because it is only a hobby for me and not a way of life. And the response I got was eloquent and simple – instead of using location.replace(htmlPageFile) to load the pages when a tab was clicked, I put all of the information in one file and changed the style.display settings for the different tabs and viola! No more flashing. The current beta looks really good.
 
I have made a few additional changes but will discuss those when I post the next release…hopefully early next week if all goes well.

Check out the links…

Over the last week I have started getting a few link backs to my blog from several different external sites. I went to check them out and was surprised to find different online magazines and blogs discussing the The Magic Folder and linking back to my blog. They all had good things to say about The Magic Folder. 
 
I thought this was cool and interesting and wanted to share the links with you. I have included them in the links section on the left side of the page. Check them out. 

Busy Week…

Well, I have dedicated a lot of time in recent weeks to getting my gadgets posted and especially getting The Magic Folder updated and running well. Version 1.4 seems well recieved.
 
Tomorrow, I have jury duty…ack!  This week is also going to be quite busy at work and for my teaching job (finals week). Plus I am preparing for an online Microsoft Certification Training course I am delivering in June. 
 
So, this week, I am taking it easy in gadget land. For now I am only going to focus on fixing a few minor things, adding one or two small features and then posting an update sometime next week. However, your ideas are what feed this gadget and other gadgets. So keep the ideas coming. What kind of gadget would you like to see next? 

The Magic Folder version 1.4

So The Magic Folder continues to improve.
 
I have lots of ideas and I am knocking them out one by one, but I am also fixing minor issues and even taking some of your suggestions and making them a reality. And for me it is fun because I really like the community aspect of this and I love to develop things and make them better and better…
 
Anyway, here is the list of improvements for version 1.4:
 
  • Automatic updates – the gadget will check a webservice every 8 hours to see if there is an update. If there is, you will get a flyout that gives you the option to jump directly to the download page and get the new version: http://gallery.live.com/liveItemDetail.aspx?li=0ed6a06a-6782-41a7-b68c-2753fad412a5.
  • Updated Settings Pane – take a look at the settings pane. I did a lot of work to organize the look of this and make it better – including a folder previewer. Should look a lot more professional now. Also when there is an update available it will appear on the About tab of the gadget settings.
  • Updated Folder icons – I did a better job of coloring the folders and removed the drop shadow. Green looks really nice and green now.
  • Improved Flyout graphics – I added a gradient background to the fly-outs to help them stand out more.
  • Folder processing – I removed the option to disable this function. Instead by default all folders dropped onto the gadget are processed. In the next version I am going to try to improve on this a little so that when you drag a folder to the gadget with extensions disabled, it will move the whole folder instead of gutting it.
  • Medium folders – a comment on the gadget site drove me to add this. You now have the options between: Small, Large and Medium folder icons in either docked or undocked states.

I posted it at 11:00PM CST, so depending on how fast the folks at Live.com get the update posted, it should be available soon. Ususally somewhere around 12 to 24 hours. As soon as it is available, let me know what you think and PLEASE keep the suggestions coming.

 

New BETA for The Magic Folder

After I posted the last update I got right back to work on some new updates for The Magic Folder.
 
Here is a list of the updates thusfar:
 
  • New graphics in the Settings dialog (better blend of colors and grouping).
  • New backgrounds for the fly-outs to help them stand out more.
  • Automatic Updates.  Now when an update is available you will know.

I am making a few minor changes here in there as well. For instance, I am taking away the option to be able to turn on/off "process folders" and making that option turned ON all the time by default. If you have any other suggestions or things you would like to see, please drop me a message.

I have attached a few screenshots from the BETA. Let me know what you think and contact me if you are interested in being a BETA tester.
 
NOTE: I plan to post this update by Friday morning.
 

The Magic Folder Update (v1.3.0.4)

First off, I want to give a big thank you to those who have helped me BETA test this last release. There were several issues resolved and some changes that were made as a result of the great feedback I have received.
 
THANK YOU!!!

The Update

Version 1.3 brings with it a few changes, here are the updates:
 
  • Folders can now be copied. If you drag a folder on to The Magic Folder, all the files in the folder and sub-folders will be copied. You will find this is a setting (for now) that needs to be turned on in the Settings. In the next release, I will just make it a permanent part of the application.
  • There is a new option to change the size of the folder when it is docked and undocked. There is also a new folder color choice called Magic. Give it a look (see attached image below).
  • Font DPI setting change. On systems where the DPI was set to 120, the gadget was virtually useless. Now it can detect the DPI and change the font size on the fly.
  • Now when you select a folder in the jump fly-out, the folder is immediately opened. There is no need to click the OK button any more.
  • When you select to move a file that already exists in the folder, you now get the Windows prompt to replace or make a new copy of the file. The previous version would just make a copy and not give you a choice.
  • New status icons that show you when the folder is working. This is really good for very large drop operations.
  • New icon (see attached image below). Also, let me know what you think about the icon – add your comments.
  • And lots of little changes under the hood.
Please feel free to contact me if you have any questions. I posted the update this evening around 9:00PM CST. The update should be available at some point on Monday (5/21).
 

Gadgets and Screen DPI (Font Size)

In addition to working for Microsoft, I am also an instructor for two nights a week at ITT-Tech. Friday evening one my my C++ students wanted to show me a problem they were having with The Magic Folder. Most of the text in the dialogs were cut off – unreadable. The problem is that he was running with Large fonts (screen DPI set to 120). The default is 96. So I immediately went to work on a solution in the next pending update – which I will post Sunday night (5/20/2007). But this took what seemed like forever to resolve and I could not find ANYTHING about this issue specifically related to gadgets out there. Does anyone know about this????
 
Anyway, here was the solution I came up with:
 
1) In my main HTML file, I placed the following DIV: 
 

<div id="dpiTest" style="width:1in; height:1in;"></div>

 
2) I then setup the following function to run as soon as the gadget was loaded.
function detectDPI()
{
   var path = System.Gadget.path + "\\css\\";
   var dpi = new Number(dpiTest.offsetWidth);
   var fso = getFSO();
   if(dpi>=120) // hi-res fonts
   {
      fso.GetFile(path + "styles-120dpi.css").Copy(path + "styles.css",true);
   }
   else
   {
      fso.GetFile(path + "styles-96dpi.css").Copy(path + "styles.css",true);
   }
}

3) Additionally, I created 3 copies of my stylesheet and named them:
  • styles.css
  • styles-120dpi.css
  • styles-96dpi.css

4) In the 120 version of the file I set all the fonts to xx-small, where in the 96 they are set to just x-small. The plane styles.css file was a copy of the 96dpi version.

So what this does is on load it looks at the 1"x1" div that I placed on the form. It reads the offsetWidth which returns the pixel resolution. 1" = 96 when the fonts are normal and 1" = 120 when the fonts are LARGE. It then replaces/renames the "styles.css" file with the proper version. All the other forms will then fall in-line.

Viola! Hopefully, someone else out there having this problem will find this solution useful.