Inkscape.org
Creating New Extensions Simple Inkscape Extension ( Children, Education, Learning, Simplified User Interface )
  1. #1
    Mr. Raven Mr. Raven @Mr.Raven
    *

    Hi all,

    I have created a small extension that makes it possible to change the interface of Inkscape to a simpler version. A lot of buttons and menu items have been hidden. This will make Inkscape easier to use for novices or in primary or secundary education.

    @Kirstie made the adjustments to some of the .xml files and .ui files that define the user interface. I only made the extension. The extension simply copies those files into the right folder in order to change the Inkscape interface. Changes become visible after a restart of Inkscape.

    It can be started from the Extension menu, from submenu Interface and then Simple Inkscape. Switching back from simple to default mode works the same. Below is a picture of the extension screen.

    The extension works with Linux and Windows, but not yet with Mac because I have not adjusted it for Mac yet. On Mac you will get an error message and it will not work. I do have plans to test it, but it will take some time.

    Of course different people will have different ideas on which buttons and menu items should be visible or not. However, this forum topic is meant only to discuss the extension itself. Questions and remarks about how it works and how it could be improved upon.

    There is a second forum topic, started by @Kirstie, which is meant to discuss which buttons and menu items should or should not be visible in the simple version. This topic has the name "Simple Inkscape - What Items do we Want?"

    I don't yet know how to upload the extension to the inkscape website, but I will upload version 0.1 here, so you can try it if you like. Just unpack the .zip file in your extensions folder. After unzipping, the following files should have been added to you extensions folder:
    - simpleinkscape.py
    - simpleinkscape.inx
    - a subfolder called inkscape-simpleinkscape

    I'd love to hear from people about this.

    Best,

    Mr. Raven

     

    Simple Interface
    Normal Interface
  2. #2
    Kirstie Kirstie @Kirstie🌷

    Hi Mr.Raven,
    Welcome on this forum! It is very nice to see you here ánd that you have made this extension.
    Will you uload the extension later on here too, so we can test it out?

    My related topic is here: https://inkscape.org/forums/extensions/simple-inkscape-what-items-do-we-want/
     

  3. #3
    Mr. Raven Mr. Raven @Mr.Raven

    I have now uploaded version 0.1 of the extension as an attachment to the first post of this topic.
    SimpleInkscape.v0.1.zip

    Please feel free to download it and try it out.

    If you have any questions or suggestions - feel free!

  4. #4
    Kirstie Kirstie @Kirstie🌷

    Hi Mr.Raven,

    The extension 0.1 works fine here on Windows 8.1 and Inkscape 1.0.2-2. So far so good.
    BTW nice hat! Are you wearing one in real life too? ;-)

  5. #5
    Mr. Raven Mr. Raven @Mr.Raven

    Thanks for testing. Glad to hear it works on Windows 8.1 as well. I did test it on Windows 10 Pro and Kubuntu 20.04. Both worked fine. It should work on any inkscape version from 1.0 and up.

    However - it did not work on Inkscape when it was installed as a Snap. I think that has to do with the fact that Snap has restrictions on writing permissions. Installing Inkscape from the inkscape ppa instead of Snap solved that problem immediately.

  6. #6
    Mr. Raven Mr. Raven @Mr.Raven
    *

    qtinkscape  asked the following question on the other topic, but since it is a bit more technical I feel it should be in this one. Here is his question:

    Hello @Mr.Raven,
    Thanks for responding so quickly,

    I asked you for this potential method, because I am working on a project that requires Inkscape simplification. My goal is to let someone, who doesn't know the logiciel at all, manipulate it.
    I tried your extension and it worked perfectly. However, I realized that it deleted some icons that I would absolutely need.
    That's why I want to know if you think the programming may be possible to do for me, knowing that I never did programming. Do you know approximately how many lines of code that took you ?
    Could be possible to create an extension with icons that can be selected or not, to allow me to display only those that interest me ? (Or, if you agree to take time, maybe you could create an extension with a list of icons that I need, that i could send you ? But of course, I am aware that this alternative will take a lot of your time, and I'm ready to pay you if necessary)
    Regards

    What you ask is well possible and you can do it yourself if you like. However, prepare for a bit of a lengthy explanation:

    Since version 1.0, Inkscape has the option of hiding and changing some elements in the user-interface (UI). The elements that are shown in the user-interface are located in several files in the inkscape program folders. If you copy those files into your user folder, in the subfolder ui and you then change them, Inkscape will use your changed files when you restart Inkscape and the user interface will be changed. If you do not copy these files into your user folder, Inkscape simply uses the default ones it has.

    @Kirstie did this manually and changed some things to create a simpler version of the Inkscape user interface. In order to make things easier and more accessible for everyone, I made a small Inkscape extension that simply copies her changed files into the ui folder if you choose 'Simple' and if you choose 'Default', it removes those changed files. That is basically what this extension does. I will explain this in more detail below.

    On Linux, the user folder is usually in : /home/<username>/.config/inkscape/, so for me that would be : /home/MrRaven/.config/inkscape/
    On Windows the user folder is usually in :
    C:\Users\<username>\AppData\Roaming\inkscape\, so for me that would be : C:\Users\MrRaven\AppData\Roaming\inkscape\

    If you use the extension to switch to "Simple" and then open the userfolder and go to subfolder ui, then you will find three files:

       - menus.xml
       - toolbar-commands.ui
       - toolbar-tool.ui

    These are the changed files for the Simple user interface. You can open these in a text editor, like notepad. If you then study them a bit, you will see the structure of the file and you will notice some lines that start with <!-- and end with /-->  . This means that these lines have been 'disabled' and therefore the elements they describe have been hidden in the interface.
    So if you want to re-enable some elements, you can simply remove <!-- from the beginning of the line and /--> from the end of the line. If you then save the file and restart inkscape then the changed lines should result in some elements becoming visible again. It is not hard and you can change it as you like.

    For example the file menus.xml starts with these lines:

    <inkscape version="1.0"
      xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
      xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
      show-icons="false">
    
       <submenu name="_File">
           <verb verb-id="FileNew" />
           <verb verb-id="FileTemplates" />
           <verb verb-id="FileOpen" />
           <recent-file-list/>
           <!-- <verb verb-id="FileRevert" /> /-->
           <verb verb-id="FileSave" />
           <verb verb-id="FileSaveAs" />
           ...

    The first 'hidden' line I made red for clarity.

           <!-- <verb verb-id="FileRevert" /> /-->

    If you change that back to:

           <verb verb-id="FileRevert" />

    then you will again have the 'revert' item in the File menu. The .ui files basically work the same, but for icons on your toolbars.

     

    So this will probably work for you to change it as you like.

    However, if you run the extension "SimpleInkscape" again and choose either "Default" or "Simple" your brand new changes will be overwritten because SimpleInkscape keeps its own versions of those files in another folder. So beware!

    It is also possible to change the .xml and .ui files in SimpleInkscape's own folders. If you do that, then SimpleInkscape will use those changed files so you can make SimpleInkscape do exactly what you want.

    You can find the location of SimpleInkscape's folder as follows:

    On linux:         /home/<username>/.config/inkscape-simpleinkscape
    On Windows: C:\Users\<username>\AppData\Roaming\inkscape-simpleinkscape

    Remember to change <username> into you real username.

    When the SimpleInkscape extension is run for the first time, it creates the inkscape-simpleinkscape folder and moves the changed .ui and .xml files into it. Then it starts using the inkscape-simpleinkscape folder as base for its files.

    When you run the extension SimpleInkscape and choose either simple of default and press OK, then SimpleInkscape first removes all files from the userfolder/ui/ subfolder and then copies the files from the inkscape-simpleinkscape folder into the userfolder/ui folder.
    The default settings folder in inkscape-simpleinkscape is empty so if you choose Default, then the files in the userfolder/ui folder will be deleted and nothing will be copied in their place. The ui folder will then be empty and after restarting, Inkscape will use its own internal default settings.
    If you choose 'Simple' then SimpleInkscape wil copy the changed .ui and .xml files from the inkscape-simpleinkscape Simple subfolder into the userfolder/ui and after restart Inkscape will have the Simple interface.

    So if you would like to use SimpleInkscape, but change some elements, I would suggest you change them in the inkscape-simpleinkscape folder in the simple subfolder. After that the extension SimpleInkscape will use your changes after switching to simple. That way SimpleInkscape will use YOUR changes.

    This was a long story, I hope it is a bit clear. Otherwise do feel free to ask.

     

    In response to your other question : it is technically possible to change the extension so that it shows all ui elements that can be hidden and you can choose which you want to show or hide. But that would be like programming a whole new extension and a lot of work (much more complicated than this one). So I do not plan to do that at the moment, unless there is enough demand for it. It is however, quite easy for me to change the extension so that some other things become possible:

    - More profiles than just 'default' and 'simple', like 'lasercutter' or 'intermediate' or something else.
    - Include other stuff that can be changed in the userfolder, like fonts, icons, palettes, keys, templates. That is technically easily done, the code is already there, but not active. And I don't know if there is any demand for it or if it would be just confusing. So that discussion needs to take place sometime.

    I am also interested in the project you are doing, for which you need SimpleInkscape. Would you tell me a bit about it, so that I know what it is used for?

     

  7. #7
    Mr. Raven Mr. Raven @Mr.Raven
    *

    I have published the extension so other people can find it more easily. It is still version 0.1. So it's now officially available from the extensions download section on the Inkscape website! Jay!

  8. #8
    Mr. Raven Mr. Raven @Mr.Raven

    Hi All,

    I've made a new extension in which you can set menu items and toolbars items to visible or invisible. This way you can customise the user interface of Inkscape as you like.

    https://inkscape.org/~Mr.Raven/%E2%98%85customise-user-interface

    There is also a forum topic about it:

    https://inkscape.org/forums/extensions/inkscape-custom-user-interface/

    It works well, we are currently on version 0.2 and I am working on a change in the interface.

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Simple Inkscape Extension ( Children, Education, Learning, Simplified User Interface )