Monday, May 23, 2005

My Own Google Desktop Plugin

Originally posted on:

No it isn't available yet, read below to see why...I decided to write a small pet-project in C# just to not forget my meager skills on the .NET platform.

I decided to write a small application that will query the GDS index and allow me to work with the results. Why do I think such an application is needed, well, I like the web interface of the regular result set, but I think the options given to the user are limited, the main issue I have is the fact that I can't open a file with my application of choice.

When I locate a file - what I can do is:
a. Open the file using the default handler defined for the browser (often not what I want)
b. Open the folder containing that file, and doing what I want by right clicking in explorer on that file.

I decided to write an application that will allow me to do exactly that with one click. So since I'm not that much of a programmer I managed to do the following:
a. Invoke the GDS search through the internal URL
b. Send it a search query (currently filtered by search type - email,files,web,all)
c. Get the results in XML from the local server
d. make the XML legal - GDS returns XML with illegal characters for the Encoding. so this required doing some voodoo magic with the stream (save to file, delete bad chars, reload)
e. Load the results in a DataGrid (even an overridden one - subclassed?)
f. Manage to create some sort of custom right-click response...

The problem lies in f, I want to have the windows explorer right-click (context menu) for the items. I have two problem:
1. I have no idea, how to invoke the Explorer context menu (probably some Win32 API / .NET class I am not aware of)
2. How to load it for a specific cell in the data grid (I have part of the solution for this - by overriding the class I have better control of events - still this evades me - it seems that I need to subclass not only the datagrid, but the datarow, and datacell as well).

Once this is finished, I can polish it up, maybe even submit it to the Google Plugin page - although it still has a long way to go untill it gets there.

If anyone has any ideas of what other features this could have/need I would be glad to hear suggestions - the main idea is to improve the already superb google experience (Hard goal to reach - but one can always try).

BTW has anyone noticed that for certain searches Copernic performes much better than GDS - When I'm looking for a long lost email I always launch Copernic first to look for it. Does anyone know of a Copernic API?


No comments: