Friday, October 10, 2008

Renaming the Attachement

This is the first time I am blogging about my project. In fact, I don't have a particular project to work with. But Humph gave me an opportunity to work on "reanming the attachment file" in Thunderbird in compose window. It means that people will be able to change their attachment's name without changing the name of the original file on the OS. Humph is insisting me to create an extension in place of working in the tree itself. He prefers me to make an Extansion because he wanted me to know how to create an Extansion.

I have some ideas to approach this problem .I would like to share these ideas with the open source community. If somebody has better ideas, DO let me know.

This idea is just a theoretical idea. I don't know how to do it, or whether is it going to work or not, but just trying to think logically. It doesn't have to do anything with mozilla code. I am just thinkig out loud ....

First of all, I have to add an option of "rename a file" in some XUL file. To be very honest, I have to start from scratch because I haven't researched about it. So , I don't know what is the name of the file. Probably it will be somewhere around .

Secondly, I need to ask the user, what name he is willing to give to the file. Probaly I can use simple javascript function and take the name from the user.

Then I have 2 ideas to go with.
  1. Somehow I need to copy the file on the OS with the new file name, And pass it's location instead of the original file
  2. Or I can just play around with the variable and finish the task.(Not sure how to do that).
    I have found a function in the mozilla tree that looks like doing the job. I have to figure it out how to use those functions.

Let's see how I solve this. And how much time does it take. If you have any suggestions or criticism feel free to comment on me. I need some feedback, good or bad, about my approach to the problem to keep my Energy flow going on .....

No comments: