Sign in to follow this  
Followers 0

Stacks Docklet

1857 posts in this topic

Where to get it:

Please consider getting Stacks Docklet 2.0 instead.

Latest version: http://matias.securityconsultant.com.ar/St...FoldersOnly.zip (version 1.0.0.374)

You can also download the full version with support for special folders, at your own risk: (not recommended)

hxxp://www.matiasmoreno.com.ar/StackDocklet-preview.zip (replace hxxp with http)

Older, more stable version: http://matias.securityconsultant.com.ar/St...ew-1.0.0.98.zip (old version, mostly stable, no support for special folders)

Note to Object Dock users with tabbed docks:

Please read this post as suggested by Panta:

http://forums.wincustomize.com/170537/page/4/#1808004

Note to Vista users:

You have to disable UAC for RocketDock. If you don't do that, Stack Docklet will fail to save settings.

I'll cite eriku who in turn cited another user:

Leerlaufprozess 2008-01-09 09:46:50

It doesn't save the setting due to Vista's UAC. Here's what you do: (I'm using a German Windows so my translation of the commands might not be completly right): Rightclick on you RocketDock Folder and choose "properties". Click on the "security" tab and edit/change (the first button). In the upcomming dialog clikc on "add" and in the enxt dialog click on the button in the lower left corner ("advanced" i guess?). Then click on "search now". In the list of the results choose your normal user account name, the one u log in with. Then click on OK and again on OK. Now just check "allow" for the very first item in the list ("full access"?). Simply click OK two more times to accept the changes and it should work.

Things it does:

Shows a Fan or a Grid stack, a la Leopard.

Options are be: Automatic, Fan, Grid.

Compatibility:

Requires Gdi+ (GdiPlus) (already included -AFAIK- in Windows XP SP 2, NT 2000 SP 4, Vista)

I'm testing it on Rocket Dock, it should be compatible with Object Dock and Y'z Dock as I'm using Object Dock's Docklet SDK.

KKMenu:

THIS IS NOT A REPLACEMENT FOR KKMENU. I'll notmay implement anysome functionality of it at all, unlessas it is a functionality of Mac OS X Stacks itself now (sometimes I think Apple employees visit this thread to find ways to make Stack Docklet's coding harder).

Note: Mac OS X Leopard seems did put all the functionality KK Menu emulates, into... yes, the stacks. X(

History:

(last edited 31-jan-2009, 18:12 GMT-03:00)

  • fixed problem when dock is in any but bottom edge (left, top, right dock positions).
  • fixed problem with opening wrong file on click.
  • changed font to Tahoma 8px
  • fixed first bug found by alabanco
  • added dock icon animation when clicking on stack item
  • stack now doesn't appear in task bar :)
  • added "Open folder" (didn't want to name it "Open in Finder"... but will be customizable later)
  • fixed problem with stack getting outside screen (the need-a-scrollbar will be fixed later)
  • fixed problem outside screen but in vertical docks, improved 48x48 on shell links, fixed VLC issue, added default dock icon.
  • added Automatic, Fan and Grid options. Fan only works for bottom side docks. Renamed Form2 to Finder.
  • added Alt+Left click to open settings, for docks where Right click doesn't work.
  • icons now pop down in front of dock icon (before they popped down behind)
  • animations closer to Leopard ones. Added sort by name, date of creation/last modification/last access, and kind.
  • did an addition-that-maybe-fixed-it for those with problems opening shortcuts. Also completely rewrote icon extraction code, test and enjoy ;)
  • removed annoying icon flickering (most perceivable on slow machines)
  • added workaround for those dockbars not closing the stack when you click on desktop / other app.
  • fixed problem when a trailing slash was typed in folder setting.
  • now you can drop files to the stack dock icon (they will be moved to the stack's configured folder)
  • now shows preview icons for any image supported by GDI+, not just bmp, jpeg, gif and png (this may include .tiff, .ico and .wmf depending on your system, and maybe others).
  • the Fan mode can now be used in left/right/top side docks ;) (it looks kinda strange)
  • fixed issue with 'Open folder' label customization in Fan mode.
  • fixed issue with folders with a trailing backslash in the settings.
  • fixed issue with icons in relative paths.
  • fixed issue launching apps/items in relative paths.
  • fixed issue with autohide by dock sides.
  • fixed line of code which *may* solve issues with docks at the right side of screen.
  • updated sort by kind (now subsorts by name).
  • now in fan mode too-large names are abreviated (trim then add ellipsis).
  • more icons are shown in fan mode, on larger screens.
  • all the icons are shown in fan mode when they fit the screen (had a bug here).
  • new icons won't loose alpha channel.
  • added arrow in grid view.
  • added an option to hide 'Open folder' in fan/grid.
  • added a subtle shadow to fan items.
  • added support for special folders (Control Panel, Drives, Nethood, etc...)
  • icons and text now zoom in fan mode during open/close of stack, it looks more Leopard now.
  • shows first three icons. Icon you choose now should be some kind of box, a default one is included (this is beta, expect changes and even option to get previous version behavior in the future).
  • background pane in grid mode now zooms during open/close of stack, it looks more Leopard now.
  • now limits number of icons shown in grid mode to the size of screen, adding "Open folder" option at bottom right corner.
  • added option to choose when to show first three items and the icon (Leopard behavior, Box icon, and legacy Stacks Docklet behavior).
  • changed appearance of settings form.
  • added full name hint on hover for grid stack items.
  • changed fan OnClick algorithm. Now it always executes the right item (the one you clicked, not the one above or below).
  • fixed problem with folder names being trimmed before last dot.
  • fixed issue for "Show icon:" = "When stack is open". The first three items where shown too small in dock. Now they show as big as possible. ;)

Install:

Unzip to this folder:

C:Program filesRocketDockDocklets

Or the corresponding docklets folder of your dock.

Now you should see a StackDocklet subfolder inside the Docklets folder.

Usage:

Right click on dock, select Add Item, then Stack Docklet.

Right click on the new icon, select Icon Settings... .

Choose folder, and some nice looking icon.

Click OK, now click the icon and enjoy ;-)

Wanted:

Testers for Windows Vista.

Testers for Object Dock.

Testers for Y'z Dock (it won't work, wait a minute)

Testers for RK Launcher.

Testing any of these and giving me feedback would be pretty appreciated ;)

0

Share this post


Link to post
Share on other sites

great! it works in RK launcher.

Two things I want to say right now.

1) Font! It should be smaller!

It should be either a Lucida Grande "8 pt" or its mod, so that you could see the names of the files instead of just 3 or 4 letters. :)

2) Show in Finder shortcut to the folder (I know that I can make it by myself but it won't be right at the bottom as explorer sort by name files. It would be nice if that dll file could inculde that shortcut by default and put it to the bottom).

Looks very optimistic. Good job.

Added:

First bug (at least with Rk Launcher). to update stacks content (for example you've deleted some files like in downloads folder) you need to restart the dock.

0

Share this post


Link to post
Share on other sites

OMG,this is amazing,great one matonga as usual,since I use RocketDock it works find,may I have a request,you see if I have set in to a folder and icon and I want to change to the other folder or icon, there isn't a menu edit,and if in my folder there are a lot of files it seems your stack will show/cover all my desktop,maybe you could make some kind of scroll ?,thank's again matonga

0

Share this post


Link to post
Share on other sites

Just found this wow this is great working good RKLauncher you might consider adding the open in finder icon to have it open the folder you are linked to also. I also think after clicking the stacks docklet if you click the desktop (dock loses focus) the stacks should close instead of waiting for you to choose something out of the docklet.

[ATTACH]11204[/ATTACH]

post-1012-1197788391_thumb.png

0

Share this post


Link to post
Share on other sites
Just found this wow this is great working good RKLauncher you might consider adding the open in finder icon to have it open the folder you are linked to also. I also think after clicking the stacks docklet if you click the desktop (dock loses focus) the stacks should close instead of waiting for you to choose something out of the docklet.

[ATTACH]11204[/ATTACH]

Oh my! I was searching for that icon like a retard! and it appears contributed in the thread :P

Thanks!

New version just uploaded, now has Open folder as last item.

0

Share this post


Link to post
Share on other sites
OMG,this is amazing,great one matonga as usual,since I use RocketDock it works find,may I have a request,you see if I have set in to a folder and icon and I want to change to the other folder or icon, there isn't a menu edit,and if in my folder there are a lot of files it seems your stack will show/cover all my desktop,maybe you could make some kind of scroll ?,thank's again matonga

I don't understand about change to other folder or icon. You mean to cancel/close the current stack (grid)? Try clicking the dock icon again. Do you have latest version of Rocket Dock? (1.3.5)

About folder with lots of files, yes I indeed did a stress test using C:WindowsSystem32 and my docklet didn't survive... and as I don't own a Mac, I don't know what happens there if you have too much files. I suppose I'll add a skinned scrollbar looking similar to Cover Flow's scrollbar.

It will be added later, as it's difficult and I want to get the Fan mode available as soon as possible.

That was fast, Sorry but on RKLauncer it no longer works. It does not display as a dcklet when adding it to the dock.

Mmm... I'll try by putting the icon outside. The download will become a .zip file :-)

Edit:

Does it work now?

About clicking on the desktop: it works fine with Rocket Dock it closes the stack... I have a suspect on this... I suppose I'll have to use a workaround to get it working on RKLauncher.

Note to self:

add a Form2.Timer1 and put in OnTimer1Interval:

If self.Visible And (GetForegroundWindow <> self.Handle) Then CloseStack ();

0

Share this post


Link to post
Share on other sites

matonga,

here is a list of all my comments and troubles.

Wishes:

1) Font! It should be smaller!

It should be either a Lucida Grande "8 pt" or its mod, so that you could see the names of the files instead of just 3 or 4 letters.

2) Show in Finder shortcut to the folder (I know that I can make it by myself but it won't be right at the bottom as explorer sort files alphabetically. It would be nice if that dll file could inculde that shortcut by default and put it to the bottom).

Problems:

1) if you put that stack to the right side (where it is located in Mac) when you expand it you wont see the right side.

see for yourself. this is the right corner of my screen

gZ70l8T5oP.png

plus, it would be better if the icons in the stacks are 32 pixels. You see a blur effect - this is because it scales the icons.

2) the thumbnails in the stacks do not correspond to their documents. That means you click one picture and it opens the different one.

3) It doesn't updates automatically if you remove items. to update stacks content (for example you've deleted some files like in downloads folder) you need to restart the dock.

I repeat that all these things happen with RkLauncher. I don't know do you have the same problems with Rocket bar or any other bars coz, I don't use them.

0

Share this post


Link to post
Share on other sites

Working fine again thanks for this docklet cant wait for you to implement all the things you plan.

the thumbnails in the stacks do not correspond to their documents. That means you click one picture and it opens the different one.

I have not noticed that problem as of yet

0

Share this post


Link to post
Share on other sites
matonga,

please read my previous comment, if you haven't.

I have just found two more problems

1) if you put that stack to the right side (where it is located in Mac) when you expand it you wont see the right side.

see for yourself. this is the right corner of my screen

2) ...

Read previous comments and changed font size (about minutes ago).

1) Oh, I see... solving... (stay tuned)

2) This happened in a version... well, I did lots of updates last hours, delete the .dll, download the new (.zip) version, follow instructions in Install (uncompress zip, ...) and try again.

Edit:

1) Done. Now the stack will position more to left (or to right) so not to get past through the screen edges (not tested in vertical docks, should fail there yet... :P). Ok, I'm gonna sleep, it's about 5:30 a.m. here.

Edit:

About blurry icons: I do my best to get icons in 48x48 pixels. However in your case it seems to fail at each and every icon it finds (?). Indeed the idea is to get all icons to 48x48 as soon as I get to improve that part.

0

Share this post


Link to post
Share on other sites
I don't understand about change to other folder or icon. You mean to cancel/close the current stack (grid)? Try clicking the dock icon again. Do you have latest version of Rocket Dock? (1.3.5)

About folder with lots of files, yes I indeed did a stress test using C:WindowsSystem32 and my docklet didn't survive... and as I don't own a Mac, I don't know what happens there if you have too much files. I suppose I'll add a skinned scrollbar looking similar to Cover Flow's scrollbar.

It will be added later, as it's difficult and I want to get the Fan mode available as soon as possible.

change it "shortcut to" folder and icon I've already used for it,i.e: I use your stack to open my pictures folder,right?,I've change my mind ,want to change to other folder,let say my video or my music in that same stack,oh I like your new one

0

Share this post


Link to post
Share on other sites

the font now is too small. I think Lucida Grande font is the best font for that. For example the one used in KK menu stacks (by Yoni).

Problem 1 resolved

However, now none of my Application shortcuts in that stack open. Works only Show in Finder.

0

Share this post


Link to post
Share on other sites
change it "shortcut to" folder and icon I've already used for it,i.e: I use your stack to open my pictures folder,right?,I've change my mind ,want to change to other folder,let say my video or my music in that same stack,oh I like your new one

Oh... it should be as easy as right click the dock icon (the one corresponding the stack) and choosing Icon settings... (at least in Rocket Dock). A settings window should pop up letting you change the folder and icon of the stack.

0

Share this post


Link to post
Share on other sites
Oh... it should be as easy as right click the dock icon (the one corresponding the stack) and choosing Icon settings... (at least in Rocket Dock). A settings window should pop up letting you change the folder and icon of the stack.

Yes matonga,good,I've found it,another one question if I choose my Application folder and click one of that application,i.e calculator,it won't open the apps but open to "make a new folder",thank's .

It becomes more perfect !!

0

Share this post


Link to post
Share on other sites

Hi there - :)

Great work!

Works fine with OD, could work in AveDesk,too?!

I tried it and it shows up in the control panel, however I can't access any options as it's invisible.

Adding a default icon image (maybe in the images faolder) might?! solve this...

could you do so please? :)

It would be great if it works with AveDesk, too (don't really use OD)!

0

Share this post


Link to post
Share on other sites

Just tried this out with RKLauncher and I'm running into some problems. First, it doesn't want to appear correctly if the dock is placed anywhere but the bottom. Okay, scratch that...it doesn't want to work correctly on the right side. If I place the dock on this side, the stack window appears in the last position of the dock - ie: when I first ran the dock, the dock was on the right. Trying the stack caused it to appear it the top left corner of the screen. When I moved the dock to the bottom, it worked correctly, but after switching the dock back to the right side, the tack remained at the bottom. The same happens if I move the dock to any other side and then back to the right.

Second glitch: when an icon is clicked (regardless of the mouse button) it first pops up a move dialog, then a copy dialog and then runs the application.

Edit: Argh!! hehe I guess I missed a page of comments there. Anyway, I hope the code below can still help you there.

Some things that might need a look at. The icon extract is a bit rough, using a thumbnail of the image would work: in C# the code would be:

image.GetThumbnailImage(width, height, null, IntPtr.Zero)

Also, I'm not sure how you're extracting the icon but the icons appear to be hard set to 48x48. It might be easier to have it use the shell icon size and adjust accordingly. I'm not how that would affect your animation, which I must say is pretty damn smooth, but it would help with overall appearance.

This is the code I use for extracting icon images. It's in C# but it'll show the hooks you'll want to look at.

		[DllImport("user32.dll", CharSet = CharSet.Auto)]
public extern static bool DestroyIcon(IntPtr handle);

[DllImport("shell32")]
public static extern IntPtr SHGetFileInfo(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, uint cbFileInfo, uint uFlags);

[StructLayout(LayoutKind.Sequential)]
public struct SHFILEINFO
{
public IntPtr hIcon;
public int iIcon;
public int dwAttributes;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)]
public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
}

#region Shell Icon Flags

[Flags]
public enum SHGetFileInfoConstants : int
{
SHGFI_ICON = 0x100, // get icon
SHGFI_DISPLAYNAME = 0x200, // get display name
SHGFI_TYPENAME = 0x400, // get type name
SHGFI_ATTRIBUTES = 0x800, // get attributes
SHGFI_ICONLOCATION = 0x1000, // get icon location
SHGFI_EXETYPE = 0x2000, // return exe type
SHGFI_SYSICONINDEX = 0x4000, // get system icon index
SHGFI_LINKOVERLAY = 0x8000, // put a link overlay on icon
SHGFI_SELECTED = 0x10000, // show icon in selected state
SHGFI_ATTR_SPECIFIED = 0x20000, // get only specified attributes
SHGFI_LARGEICON = 0x0, // get large icon
SHGFI_SMALLICON = 0x1, // get small icon
SHGFI_OPENICON = 0x2, // get open icon
SHGFI_SHELLICONSIZE = 0x4, // get shell size icon
SHGFI_PIDL = 0x8, // pszPath is a pidl
SHGFI_USEFILEATTRIBUTES = 0x10, // use passed dwFileAttribute
SHGFI_ADDOVERLAYS = 0x000000020, // apply the appropriate overlays
SHGFI_OVERLAYINDEX = 0x000000040 // Get the index of the overlay
}

#endregion

public enum IconSize : int
{
System = 2,
Large = 1, //32x32
Small = 0 //16x16
}

private const int FILE_ATTRIBUTE_DIRECTORY = 0x10;
private const int FILE_ATTRIBUTE_NORMAL = 0x80;
private const int MAX_PATH = 256;

#region Get icons' images

//Create an image from the icon associated with folders
internal static Bitmap GetFolderIconImage(string folder, IconSize iconSize)
{
SHFILEINFO shfi = new SHFILEINFO();
SHGetFileInfoConstants flags = SHGetFileInfoConstants.SHGFI_ICON | SHGetFileInfoConstants.SHGFI_USEFILEATTRIBUTES;

if (iconSize == IconSize.Small)
flags |= SHGetFileInfoConstants.SHGFI_SMALLICON;
else if (iconSize == IconSize.Large)
flags |= SHGetFileInfoConstants.SHGFI_LARGEICON;
else if (iconSize == IconSize.System)
flags |= SHGetFileInfoConstants.SHGFI_SHELLICONSIZE;

IntPtr hImgLarge = SHGetFileInfo(folder, FILE_ATTRIBUTE_DIRECTORY, ref shfi, (uint)Marshal.SizeOf(shfi), (uint)flags);

return (GetManagedIcon(Icon.FromHandle(shfi.hIcon)).ToBitmap());
}

//Create an image from the icon associated with the file
internal static Bitmap GetIconImage(string file, IconSize iconSize)
{
SHFILEINFO shfi = new SHFILEINFO();
SHGetFileInfoConstants flags = SHGetFileInfoConstants.SHGFI_ICON | SHGetFileInfoConstants.SHGFI_USEFILEATTRIBUTES;

if (iconSize == IconSize.Small)
flags |= SHGetFileInfoConstants.SHGFI_SMALLICON;
else if (iconSize == IconSize.Large)
flags |= SHGetFileInfoConstants.SHGFI_LARGEICON;
else if (iconSize == IconSize.System)
flags |= SHGetFileInfoConstants.SHGFI_SHELLICONSIZE;

IntPtr hImgLarge = SHGetFileInfo(file, FILE_ATTRIBUTE_NORMAL, ref shfi, (uint)Marshal.SizeOf(shfi), (uint)flags);

return (GetManagedIcon(Icon.FromHandle(shfi.hIcon)).ToBitmap());
}

private static Icon GetManagedIcon(Icon UnmanagedIcon)
{
Icon ManagedIcon = (Icon)UnmanagedIcon.Clone();
DestroyIcon(UnmanagedIcon.Handle);
return ManagedIcon;
}

Like I said before, the animation alone would make me use this! Everything else would just be gravy. Keep up the great work mate!

On a side note, I'd love to see how you're going about utilizing GDI+ for this. I'm just starting to get my feet wet with it and would love to try my hand and using it for animating windows.

0

Share this post


Link to post
Share on other sites

I think I know why it doesn't work with Applications folder. it doesn't work because there are shortcuts there but not files. It seems like it doesn't work with shortcuts yet in my RK laucnher.

0

Share this post


Link to post
Share on other sites

Hi there!

First of all, great work. Didn't expect to see something like that on windows. Found one (maybe two?) glitches in rklauncher:

1. When I click on a file everything works fine except with video files (using VLC). VLC won't open. In fact, the stacks icon jumps and everything seems fine but nothing happens. Tried it with compressed folders,pictures and word documents and everything is fine there. Perhaps it's a VLC issue?

2. Bug or feature? :-) The grid doesn't show shortcuts.

I'd like to see where this leads to. Very promising start as always.

0

Share this post


Link to post
Share on other sites

@thewer:

Added a default icon, download again.

@Fosssi:

Yes I had exactly the same issue with VLC and now I know why! VLC doesn't add a "default action" to it's files. Ok, whatever, now you can launch your VLC videos from Stacks Docklet ;)

@alabanco:

Possibly the same problem than Fosssi, but with shell links. Download latest version and try.

@Sranshaft:

Will this code allow me to get 48x48 icons? I tried SHGFI_SHELLICONSIZE but it gives me 32x32 icons, and they look awfull when stretched, that's why I'm using an alternative way (it's indeed almost half Stack Docklets code, just for getting the associated icon in 48x48).

How do I get 48x48 icons? Or at least something like IconLocation and IconIndex, I can handle that too.

Icon click: may be analog to VLC problem: try new version.

Dock in right side: maybe solved now.

0

Share this post


Link to post
Share on other sites

SHGFI_SHELLICONSIZE will return the shell's large icon size, if the user has 'Use large icons' it will return the 48x48 size icons. Unfortunately, if you don't have 'Use large icons' selected, like I suspect you might not, it'll still return the 32x32 size icons. On this computer, I have it set to 'Use large icons' and they look perfect.

If was able to find this http://www.codeproject.com/KB/vb/MultiIcon.aspx that might help. You should be able to gleam the necessary code to get any icon size you need from it.

Hope it helps.

Just to confirm: shortcuts now work correctly in RKLauncher. Clicking now launches the program. The right side glitch is still there though.

0

Share this post


Link to post
Share on other sites

matonga

"Possibly the same problem than Fosssi, but with shell links. Download latest version and try"

Nope. Still can't open shortcuts with it. :(

It doesn't work with RK launcher. believe me. maybe OD and Rocket dock but not in RKLauncher.

The fonts now are better but is it possible to have Lucida Grande in the future ?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0