dfleury2 Posted March 22, 2013 Share Posted March 22, 2013 Hi, On a FileType plugin, is there a way to access (is any) the filename of the stream on the OnSave callback ? I am writing an XPM plugin, and it will help is I can put this name into the file instead of hard coded value - not very usefull for embedded XPM into a source file. Regards Quote Link to comment Share on other sites More sharing options...
dfleury2 Posted March 22, 2013 Author Share Posted March 22, 2013 Searching through the forum, I see that the stream type information is not available (which I don't care, just need the document name anyway) May be we can access the filename - if available - by Document given on OnSave ? Regards Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 23, 2013 Share Posted March 23, 2013 You know we have an XPM filetype plugin? XPM Filetype You know - you posted there already Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
midora Posted March 23, 2013 Share Posted March 23, 2013 You know we have an XPM filetype plugin? XPM Filetype You know - you posted there already I'm interpreting this thread as a general feature request for filetype plugins. Could be provided in the documents properties or metadata. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted March 23, 2013 Share Posted March 23, 2013 No, the file name is not available for plugins to use. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
dfleury2 Posted March 23, 2013 Author Share Posted March 23, 2013 Is filetype plugin can open a dialog box to specify some params ? (I think the answer is yes because the PPM plugin do it, but to be sure) One could be a string value to replace the "pixmap" string a one entered by the user. Even if I am not sure it was user friendly (better or worse than using external text editor to do it...) Quote Link to comment Share on other sites More sharing options...
midora Posted March 24, 2013 Share Posted March 24, 2013 You could start from a property based filetype template. Because XPM can be included in a source file it makes sense to allow the user to change the symbol name. But you can not preinitialize the edit field with the document title. What would make sense. Quote Link to comment Share on other sites More sharing options...
dfleury2 Posted March 24, 2013 Author Share Posted March 24, 2013 Yes, I have taken a look at the PPM plugin already. There is settings too for saving more infos too. Hard to find API documentation but I can do it. Not sure because don't think there is a need Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.