1. 15 Sep, 2019 1 commit
  2. 14 Sep, 2019 1 commit
  3. 11 Sep, 2019 1 commit
  4. 10 Sep, 2019 1 commit
  5. 05 Sep, 2019 1 commit
    • Sabri Ünal's avatar
      Missing mnemonics on several dialogs · 2e766f67
      Sabri Ünal authored
      paste as brush, paste as pattern, select to new brush, select to new pattern
      fill selection outline, fill path, stroke selection, distort, rounded rectangle
      indexed color conversion, merge visible layers, new guide, new guide (by percent)
      image properties, newsprint, fractal explorer, sample colorize, new layer
      
      metadata editor (just a button), spyroplus (only common buttons)
      2e766f67
  6. 02 Sep, 2019 1 commit
    • Jehan's avatar
      plug-ins: port spyro-plus to Python 3 + new API. · 3c6360a3
      Jehan authored
      It is a nearly full port. Some things would still need to be updated
      (like deprecated use of GtkTable or gtk_range_set_update_policy()
      removed), and other stuff need to be taken care of in GIMP API first.
      But the core of the feature is there.
      3c6360a3
  7. 28 Aug, 2019 2 commits
    • Jehan's avatar
      plug-ins: port py-slice to new API. · 34c6e874
      Jehan authored
      No GUI done yet on this one either. For now it will just slice the image
      and export them, as well as a HTML table in the current directory.
      34c6e874
    • Jehan's avatar
      plug-ins: port the core of foggify plug-in. · cce5bbc3
      Jehan authored
      There are 2 TODOs to take care of here. First, there is no GUI yet for
      the interactive mode which will just use the default values.
      Second, the color argument is not working yet because I had issues
      passing a GimpRGB as argument (ideally I should create a GimpParamRGB
      with gimp_param_spec_rgb(), but since we still have the pygobject bugs
      about manipulating GParamSpec data directly, I can't).
      
      Anyway it works with default values, which is already a good first step.
      :-)
      cce5bbc3
  8. 25 Aug, 2019 1 commit
    • Jehan's avatar
      plug-ins: port file-openraster to Python 3 + new API. · 13ea5cae
      Jehan authored
      Apart from porting, only code logics change is the whole
      encode()/decode() code because it created a string vs bytes mess and the
      zipfile API apparently didn't like to deal with bytes, even though the
      docs say otherwise.
      It's hard to test on my UTF-8 system, so please anyone working with
      non-UTF-8 paths, we welcome reports if ORA load/save does not work
      properly.
      
      Other than this, load, save and load_thumb were all tested and working
      properly so far.
      13ea5cae
  9. 16 Aug, 2019 1 commit
    • Jehan's avatar
      plug-ins: add Python and JavaScript files to the DIST. · ef5c091e
      Jehan authored
      So it seems that whatever is in _SCRIPTS is not in the distribution by
      default (I suppose the reason is that even scripts can be generated). So
      let's add the non-generated scripts to EXTRA_DIST.
      ef5c091e
  10. 09 Aug, 2019 1 commit
  11. 08 Aug, 2019 1 commit
  12. 07 Aug, 2019 1 commit
  13. 06 Aug, 2019 3 commits
    • Jehan's avatar
      plug-ins: add .gitignore files. · f16ad87f
      Jehan authored
      f16ad87f
    • Jehan's avatar
      configure: fix the Python checks. · bfda31a6
      Jehan authored
      1/ First I realize we were still using AM_PATH_PYTHON() and not
         AM_PATH_PYTHON3().
      2/ We don't need to check anymore for pygtk, pycairo, nor do we need
         Python headers. Everything is now taken care of by GObject
         Introspection and we have nothing else to build GIMP-side.
      3/ Change --enable-python into --with-python. We don't actually build
         anything now. There is no Python support to enable or disable
         anymore. We simply install Python plug-ins or not. The 3 values are
         "yes" (default, configure breaks if a Python 3 interpreter is not
         found), "no" (Python plug-ins are not installed, not recommended) and
         "force" (install Python plug-ins anyway even if an interpreter is not
         found; this can be useful especially for cross-compilation since
         Python is not useful at build-time anymore).
      
         Note that --with-python=force, if an interpreter is not found, the
         file `pygimp.interp` won't be installed. This is not a problem at all
         if the interpreter can be found at runtime the standard way.
         Otherwise packagers should add themselves a pygimp.interp file with
         the known interpreter path.
      bfda31a6
    • Jehan's avatar
      plug-ins: add interactive run mode for palette-offset. · dc8f9dd1
      Jehan authored
      In interactive run-mode, the offset amount can be selected through a
      small dialog box.
      Only a WITH_LAST_VALS mode is still to be done.
      dc8f9dd1
  14. 05 Aug, 2019 5 commits
    • Jehan's avatar
      plug-ins: port palette-offset to Python 3. · 82ada55b
      Jehan authored
      Oups, I left the plug-in as Python 2. This was still a good
      proof-of-concept that GIMP 3 will support as well Python 2 and Python 3
      (even though Python 2 is end-of-life soon anyway).
      82ada55b
    • Jehan's avatar
      plug-ins: port palette-offset to new API. · dca353f8
      Jehan authored
      This first version will just offset by 1 in interactive mode, by
      default. The GIMP 2 version used to have a GUI, but it was not created
      by the plug-in itself. I am guessing that maybe our Python wrapper used
      to create GUI by default.
      If so, this will have to change. Python plug-ins will be responsible of
      their own GUI, just like C plug-ins.
      dca353f8
    • Jehan's avatar
      plug-ins: add a "palette" argument to palette-to-gradient. · 35d4b68e
      Jehan authored
      Older palette-to-gradient used to have a palette argument. Bring it
      back. The logics is that if the string is empty or None, the procedure
      will use the currently selected palette. Otherwise it will try to
      transform the named palette into a gradient and will fail with an error
      if this palette does not exist.
      35d4b68e
    • Jehan's avatar
      plug-ins: use GtkSettings values to determine whether to use header bar. · aa6a1d36
      Jehan authored
      As we do in other parts of the code.
      Also applies the same thing to the console dialog itself.
      aa6a1d36
    • Jehan's avatar
      plug-ins: GimpProcBrowserDialog with "use-header-bar" in Python-console. · 0af32861
      Jehan authored
      We have code for this in gimp_proc_browser_dialog_new(), but it cannot
      be moved in the object init() because this is a construction-time only
      property. So this needs to be passed from the python call too.
      0af32861
  15. 04 Aug, 2019 1 commit
  16. 03 Aug, 2019 2 commits
  17. 02 Aug, 2019 3 commits
    • Jehan's avatar
      libgimp, plug-ins: remove n_procedures from (init|query)_procedures(). · bc7b3588
      Jehan authored
      The way currently implemented plug-ins are, they are already
      NULL-terminating the returned arrays. Since a procedure name cannot be
      NULL itself by definition, defining the array length by a terminal NULL
      is enough. There is no need to also add a n_procedures parameters which
      is just one more possible bug source, even more as we were already
      expecting the NULL termination by using g_strfreev() to free the memory.
      
      Anyway a length parameter does not bring any advantage since a plug-in
      can still "lie" about its array size (just as it can forget to
      NULL-terminate it) and when this happens, the plug-in will segfault.
      That's it, it's just a plug-in programming error.
      
      Last but not least, some binding seem to have issues with returned array
      setting an (out) parameter as the length. In pygobject at least, the
      length parameter doesn't disappear and we end up with this ugly
      signature:
      
      > In [3]: Gimp.PlugIn.do_query_procedures.__doc__
      > Out[3]: 'query_procedures(self) -> list, n_procedures:int'
      
      See bug report pygobject#352.
      To avoid this, we should either set both the array and the length as
      (out) parameters or just set the returned array as NULL-terminated
      (which is the solution I chose).
      bc7b3588
    • Jehan's avatar
      plug-ins: localization calls must happens inside query(). · 3945701b
      Jehan authored
      It's a bit weird because this has to happen during the query() step, but
      plug-ins don't have access to this step anymore, apart from
      query_procedures(), which then turns out to be badly named.
      3945701b
    • Jehan's avatar
      plug-ins: start porting palette-to-gradient to new GimpPlugIn API. · 17667b7d
      Jehan authored
      Several aspects of the new API are kind of broken in the Python binding,
      especially the arguments. So this first version has no arguments at all.
      This also means it cannot be installed in "<Palettes>" menu for the time
      being. This is work-in-progress and the missing parts will be
      uncommented later when we figure out how to fix the problems.
      17667b7d
  18. 30 Jul, 2019 3 commits
  19. 29 Jul, 2019 2 commits
    • Jehan's avatar
      plug-ins: install the pygimp.interp file. · aab75bb1
      Jehan authored
      Python scripts should already properly run, whether you run them with a
      direct python shebang or a `env python` one (cf. previous commit). But
      it's still nice to install a `.interp` file, which allows to control
      exactly the interpreter to use, overriding the shebang. With this file,
      Python scripts will use installation-time Python interpreter.
      
      Also update old code to make the interp contents about Python 3 instead
      of 2.
      aab75bb1
    • Jehan's avatar
      app: when interpreter not found in interpreter DB, leave shebang as-is. · 9e844ae1
      Jehan authored
      In particular, if the shebang is `#!/usr/bin/env lang` and we have not
      registered a specific interpreter for `lang`, the system should leave
      the env tool search the right interpreter for us. We only bypass env
      when we set our own explicit interpreter.
      
      Apply this to palette-to-gradient.py plug-in.
      9e844ae1
  20. 28 Jul, 2019 2 commits
    • Jehan's avatar
      po-python: install again localization for Python plug-ins. · 0f0cf4df
      Jehan authored
      This used to be deactivated. Let's install them again.
      Also activate localization in the palette-to-gradient plug-in.
      0f0cf4df
    • Jehan's avatar
      plug-ins: port Python plug-in palette-to-gradient to introspected API. · 65fb7536
      Jehan authored
      Localization still doesn't work, but this is normal (po-python is not
      installed). I will later make the proper tests for this.
      
      Other than this, it is a pretty simple port. It lost all particularities
      and facilities of pygimp, but the fact that it now works similarly to
      the C API is quite nice too.
      It still uses the legacy API for plug-ins though and will have to be
      ported further when the new API will be stable.
      
      Also I still haven't figured out why we need to return the number of
      returned values. With the proper annotations, an array length parameter
      disappears in introspected Python (because it is useless as Python lists
      know their length). But it would seem that this annotation doesn't work
      the same for returned values, which is a bit sad as it creates ugly
      redundancy.
      
      It can be noted that I an going to move all Python plug-ins from
      plug-ins/pygimp/plug-ins/ to plug-ins/python/. The whole pygimp/
      subdirectory will actually be deleted eventually (I keep it around for
      now as reference) as Python plug-in should not need to be considered
      particularly from now on. They can just be considered as generic
      executables.
      65fb7536