-
-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework the plugin system #1313
Rework the plugin system #1313
Conversation
It's ok, what travis build is errored, i will fix it ASAP. |
Ok, Travis build fixed. After rebase all should be fine. |
ee214c9
to
35fabe1
Compare
I've added support for importers defined in plugins. To test this you can use my plugin: http://mattia.basaglia.gitlab.io/tgs/downloads.html |
@mbasaglia Thank you for an awesome addition! Please check my comments here - #1309 (comment) ^__^ |
I have tested this PR, here are my thoughts: I was unable to test properly "Import file..." command, because importer gave me an error when I made an attempt to import Lottie json file. But that's different issue. I guess that "Import file..." opens imported file in a new tab (not adds to currently opened document). So, I think the meaning of it is more like "File" - "Open" command. I think that we should merge "Import file..." and "Open" commands for better UX.
|
yeah it does work more like open, I'll move the code to that dialog. to test import the easiest way is to create a simple drawing in synfig, export with "[TGS] SVG" and import the same file. |
Thank you! I want to say that I am absolutely excited about this feature and which possibilities it opens for further development. For example, a very common case when newbie user tries to import some image using "File" - "Open" command. Synfig give them error, because images intended to be added via "File" - "import" command. But newbie users are not aware about that and they often reach out to support asking what's wrong. With new plugins system we can create a very simple plugin, which allows to open images via "File" - "Open" command. The plugin will do simple thing - it will create a new document with imported image. ^__^ |
I've pushed some changes that do that and also fixed some issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is the whole filepath, right?
Yea |
CI fail seems unrelated to my changes
|
I have restarted the job. Sometimes the download fails because of network errors at the server. |
This pull request fixes 1 alert when merging ef1f20e into f584626 - view on LGTM.com fixed alerts:
|
Thank you! I will be able to test it on Tuesday. ^__^ |
By the way, as a side effect of this PR, #1252 should be much easier to fix as all that is required is to recreate / update the menu items when language is changed. |
Hi! I did one more round of testing and found the following: The Lottie plugin (which is only capable for export currently) for some reason is displayed in "File" - "Open" dialog. The plugin doesn't has any importers declared, so I guess it shouldn't be there. ^__^ (I do not have any other export/import plugins installed, besides Lottie, which is shipped with this version of Synfig). |
I'm not too familiar with Gtk(mm) and I wasn't able to find a signal for when the filter changes (doesn't help that the documentation isn't great) do you know how that's done? https://developer.gnome.org/gtkmm/stable/classGtk_1_1FileChooserDialog.html |
As far as I can tell, you can't access the filter combobox (and its signals) in a normal way, only what filter is currently active. So I think "Open history" should behave differently according to the selected filter – if it's possible. Regarding the Gtkmm docs, I use it, but often I read the Gtk docs themselves, as they're more ordered and cleaner than |
Currently for plugins "open history" just acts like open. So I guess it isn't possible to disable the open history button, even if it's possible to write the code that enables/disables based on the current filter, it can't be run when the filter changes if we can't hook to the combo signal. |
Can you check if until commit 6e6eee5 it still worked? If so, try to |
This pull request fixes 1 alert when merging b133f7c into 2ed703e - view on LGTM.com fixed alerts:
|
Found a fix |
2e0f0ce
to
3fb1847
Compare
um, I re-based again. Any chance of this getting merged? |
Sorry. Was busy last days. Merged. Thank you! |
Cool, I'll be documenting the new stuff in the XML file on the wiki |
Implements most of the things mentioned here: #1309 (comment)