GNOME Bugzilla – Bug 351817
[HANDLER] Adding gnome templates to deskbar applet?
Last modified: 2007-12-16 20:26:20 UTC
I'm not sure whether this fits in the job description of the deskbar applet, but maybe being able to launch items from the gnome template folder using the deskbar applet would be nice.
Could you explain what does it mean ? What are gnome templates, and how the plugin would work (what does it show in the list, and what are the effects of selecting one item in the list) Thanks !
Gnome templates are documents in the ~/Templates folder, for example: a text file or a letter in odt format. If you right-click your desktop, you will then find a menu called "Create Document...", where you will find your templates. This allows you to quickly start making the document you want. Clicking one of the options there will e.g. open OpenOffice with a new document based on the template in your ~/Templates folder. Of course, "starting things quickly" is what the deskbar is all about... That's why I thought it would be great to integrate this in the deskbar. E.g.: You have a standard letter for customers, called "paynow!.odt" which only lacks the personal data of that customer. Or, you have a template for a basic html file, etc... You go to Deskbar, you enter "paynow", and choose the option to launch openoffice with a new document based on your paynow template. In the Deskbar dropdown menu this would be something like: "Edit new paynow file".
My previous comment was not entirely accurate. The right-click menu on the desktop simply creates documents, but does not open them itself. You need to click the new document for that. My idea for the desktop integration would be to immediately open the document as well. The location for saving the document would probably have to be the Desktop, because the Deskbar has no way of asking you where to save it.
Marking as gnome-love
Created attachment 100045 [details] [review] Patch for bug #351817 The handler is mostly complete. It asks for a file name and folder (the xdg Documents folder is pre-selected) and asks for confirmation if attempting to override files (wording taken from GtkFileChooser's overwrite confirmation dialog). The only remarkable problem remaining is that removed templates are still shown as actions as long as deskbar is not restarted; I tried to fix that using Action.is_valid(), but unfortunately had no success. (Submitted as part of a Google Highly Open Participation Contest task.)
Thanks a lot for your excellent work. I just added a check that backup files (ending with ~ and hidden files) will be ignored. It's now in svn and will be part of Deskbar-Applet 2.21.4