Phoenix CE - Feature Request - Shortcut to Windows Documents

A home for all kinds of Puppy related projects
Message
Author
Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#46 Post by Everitt »

I can't believe how busy things here have gotten, I haven't had time to do a damned thing lately. Sorry about that. I'll try and find time in the next few days, else I'll just post what I have and no doubt somebody can work out where the bug is.

User avatar
ecomoney
Posts: 2178
Joined: Fri 25 Nov 2005, 07:00
Location: Lincolnshire, England
Contact:

Release little and often!!

#47 Post by ecomoney »

Hi Everett

Have you heard the mantra "Release little and often?". Im dying to see and test your work. If you let us have the code with a list of the problems you are having then someone else can at least take a look and may be able to suggest how you could fix it when you have some time again.

Thanks for keeping us posted :-)
Puppy Linux's [url=http://www.murga-linux.com/puppy/viewtopic.php?p=296352#296352]Mission[/url]

Sorry, my server is down atm!

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#48 Post by Everitt »

Ok, I think this _should_ work ok. It's got next to no error catching, so don't expect anything very useful to come out of it if it doesn't! That's next on the list of things to add!
Any suggestions greatly appreciated!

A quick breakdown:
scn4win is run at startup, and looks for icons on the desktop. If non are found it looks for possible partitions. If one or more is found then it adds a link to the other script

find_my_documents is run by the user, and does the bulk of the work. I'm afraid it's a bit of a mess at the moment, with some random debuging output that makes no sense, and very poor error handeling. The dialogs probably need rewording too! The whole thing is an evil mess of variables too! :(

Anyway, have a play, and tell me what you think.

UPDATE: Newer version below!
Last edited by Everitt on Fri 09 Nov 2007, 14:46, edited 1 time in total.

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#49 Post by Everitt »

Wow, I just found a _really_ stupid error! (And some really stupid pointless, irritation code!) It ment the majority of windows installations were ignored. I forgot to make the searchg case insensitive, and set it too look for all caps (as my Laptop has it for some reason)
Anyway, should be fixed now... *crosses fingers*
I think I fully deserve this emoticon: :oops:

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#50 Post by Everitt »

Yet more stupid bug fixes! See, this is what happens when I release lilttle and often! :P
Added some error catching too.

To use:
Extract to /usr/bin
add 'scn4win' to rc.local
reboot
Hopefully from here (where TS3.03 will start out) it should be clear

Todo: Stop icons being created on top of other icons
Tidy up dialogs.
No doubt there'll be a load more bugs to fix!
Last edited by Everitt on Sun 13 Jan 2008, 14:51, edited 1 time in total.

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#51 Post by Everitt »

Thought I'd bump this, what with all the downtime and such. I edited the above post to include a newer version.
I also found a bug in the scn4win (startup script) whereby it would create the icon even if a my documents link existed. All it needs is a lower case d changed to uppercase, so I don't think it's worth a whole new release.

A question? Would it be a good idea to also create a symlink from /root to the mountpoint. Most open/save dialogs start on /root, so a simple button there to go to my documents could be pretty cool?

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#52 Post by cb88 »

hmm the linking root to mydocuments could be dangerous cosidering that most settings are in there and what if the windows install gets corrupted? all your documents would be erased upon reinstallation... a mention of setting up a dedicated documents partition may be a good idea...
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#53 Post by disciple »

I think he's talking about a link IN /root, not replacing the root folder with a link :)

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#54 Post by Everitt »

Yes, what I was proposing was a symlink with a name like 'Everitt's documents' in /root. The latest version, sat somewhere on my hardrive (on my other computer - I'm on my laptop in the library, on a sunday!) has it working well.

Any one tried the scripts? I'd love to hear if it was working ok.

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#55 Post by 2byte »

Hi Everett

Observations and thoughts.
I have XP home on hdb1 and the scripts detected and mounted it. It's a single user that boots straight to the desktop. This box is also on a local network and it turned up some 'users' you might want to filter out of the choices.
All Users
Default User
LocalService
NetworkService
None of these have my user files in them (My Documents or Desktop).
The correct one was Compaq_Owner, which was in the list of choices by the way, but shouldn't the shortcut path have been '/mnt/hdb1/Documents and Settings/Compaq_Owner/My Documents' instead of '/mnt/hdb1/Documents and Settings/Compaq_Owner'? The title under the shortcut reads 'Compaq_Owner's Documents'. The whole windows file tree is available by walking up the parent folders anyway. Also I'm one of those dinosaurs that use 800 x 600 and the shortcut is almost hidden behind my task bar.

These are all minor details. I like it! :D

2byte

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#56 Post by Everitt »

Sorry, missed your post!
2byte wrote: Observations and thoughts.
I have XP home on hdb1 and the scripts detected and mounted it. It's a single user that boots straight to the desktop. This box is also on a local network and it turned up some 'users' you might want to filter out of the choices.
All Users
Default User
LocalService
NetworkService
None of these have my user files in them (My Documents or Desktop).
Shouldn't be too hard to do. I don't think we can really ignore Default User can we? Don't a lot of people use it? Same for 'All Users'. The two 'service' entries I'll filter out though. I'd do it right now, but I'm sat in a Maths lecture. :(
The correct one was Compaq_Owner, which was in the list of choices by the way, but shouldn't the shortcut path have been '/mnt/hdb1/Documents and Settings/Compaq_Owner/My Documents' instead of '/mnt/hdb1/Documents and Settings/Compaq_Owner'? The title under the shortcut reads 'Compaq_Owner's Documents'. The whole windows file tree is available by walking up the parent folders anyway.
Maybe... Strictly speaking yes, that would be more correct, but the problem pointed out above is that a lot of lazy users have a habit of leaving everything on the desktop. For them the present location is better, as they can see the 'Desktop' folder straight away.
Does anyone else have a clear preference? At the moment I think I might point it to '/My Documents', but any feedback / advice would be greatly appreciated!
Also I'm one of those dinosaurs that use 800 x 600 and the shortcut is almost hidden behind my task bar.

These are all minor details. I like it! :D

2byte
Ah, yes, the question of icon placement! I think the reason it's almost hidden is that it's actually off screen, so ROX is placing it at the very bottom of the screen. That shouldn't be too hard to fix, I'm pretty sure there are functions to get the height, so it's simply that minus the height of the icon. The real problem is horizonatal spacing; the icon text is far longer than standard. This is fine for single users, but for multiple users it's a bit harder. Ideally we need to work out how long the text is, and put the next icon next to, but not overlapping it.
Does anyone know of a way to find the average width of a character (in the current font)?

Thank you 2byte for the feedback, it's been really useful! :)
Unfortunately I've just spent the majority of this lecture playing with my laptop, so right now I REALLY need to start paying some attention. Whoever thought of putting wifi connections in lecture theaters!

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#57 Post by Everitt »

Finally, more progress!

I got a bout of insomnia. Thus it's 5:02 in the morning, and I've gotten something done.

I'm implemented the symlinks, seem to be working fine, and filtered out any usernames containing 'Service'
The biggest change though is that it now works with systems other than Rox-Filer, indeed it should be fine with anything that uses a ~/Desktop directory. This is untested, for now, but I see no reason why it shouldn't be ok. I'm not in any way ruling out the idea of bugs, I'm just saying that the concept should be fine. Code at 5AM and bugs go without saying. :P

Still to do:
Position icons better. Luckily this isn't my problem with the ~/Desktop approach, but I'm still not sure how to do it with Rox.

Anyway, latest files can be found here

As usual, and comments greatly appreciated.

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#58 Post by Everitt »

BugFix: I moved some code around last night, and missed a couple of lines, so nothing was being mounted. Not the end of the world, but fixed now anyway.
As usual, latest version here

mdisaster2
Posts: 106
Joined: Fri 22 Dec 2006, 08:30
Location: Rome, Italy

#59 Post by mdisaster2 »

Don't know if this is already being taken care of, but non-english versions of Windows use a localized name for "My Document" folder, for example in my Italian WinXP the folder is called "Documenti".

As far as I know the Desktop folder is not localized though.

Everitt
Posts: 331
Joined: Tue 19 Dec 2006, 21:59
Location: Leeds,UK or Birmingham, UK

#60 Post by Everitt »

mdisaster2 wrote:Don't know if this is already being taken care of, but non-english versions of Windows use a localized name for "My Document" folder, for example in my Italian WinXP the folder is called "Documenti".

As far as I know the Desktop folder is not localized though.
Thanks for the input. :D
Could you please tell me if you have a 'C:/Documents and settings'. or is that localised too? (It's this folder that is used to ID windows XP) Thanks.

This would be an issue if we linked directly to the 'My Documents' folder. As it stands at the moment it links to the users home area, from which Desktop and My Documents are but a click away. I'm still not sure what's to be done there, do we link to the home folder or directly to My Documents, excluding the Desktop folder?

Sorry it's taken me so long to reply, I didn't see that there was a new post, and I had an old email address set, so didn't get a notification. :/

Post Reply