1. 19 Nov, 2018 1 commit
  2. 19 Aug, 2018 1 commit
    • Jehan's avatar
      app: fix "Bad interpreter" error messaging. · b67d7c44
      Jehan authored
      If I override the `program` variable, and it is not found in PATH
      environment, then it is NULL and the error message is unhelpful. Make
      the return value of g_find_program_in_path() into a separate variable
      instead, and only override `program` in the end, when we know it is
      non-NULL.
      
      (cherry picked from commit 87a9feb6)
      b67d7c44
  3. 15 Aug, 2018 2 commits
    • Jehan's avatar
      app: reorder function definitions/declarations. · b4f7a90a
      Jehan authored
      Just make so that the declarations and definitions are in the same
      order for easy maintenance.
      
      (cherry picked from commit 91cb86d2)
      b4f7a90a
    • Jehan's avatar
      Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit... · 624edf90
      Jehan authored
      ... Windows installation of GIMP.
      
      Our default installer installs 32-bit version of the various DLLs in
      32/bin/ (under the installation prefix). Currently this additional
      folder is simply added in the PATH, so it works most of the time.
      Unfortunately the PATH is searched last for DLLs, and in particular, it
      is searched after system directories. So it means that if any misbehaved
      application is installing DLLs in system dirs (and in particular
      incompatible/older versions of the same DLLs a GIMP plug-in uses), it
      breaks the 32-bit plug-in.
      
      SetDllDirectoryW() bypasses this order and the set folder is searched in
      between the binary directory and the system dirs. We were already
      setting this for our main bin/ directory, which was good for 64-bit
      plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
      run plug-ins check the bitness of the executable before running it, and
      updates the DLL folder accordingly.
      The alternative 32-bit folder can be overridden by the configure option
      --with-win32-32bit-dll-folder (default: 32/bin/). This option can only
      be set when building for 64-bit Windows obviously.
      
      Alternatively we could have put copies of 32-bit DLLs in a subfolder
      with each 32-bit plug-in, but this is at best a terrible workaround, as
      we would duplicate DLLs for every such case. And this would not have
      protected third-party plug-ins which wish to use some of our DLLs.
      Last alternative is to use AddDllDirectory(), but it works since Windows
      7 with a given update only. And our current official support is any
      Windows since Windows 7. So we don't want to use this right now (also
      I'm not sure it would actually be much better than current
      implementation, and it seems to have a bit more limitations than
      SetDllDirectoryW(), though I have not tested).
      
      (cherry picked from commit 91c139f4)
      624edf90
  4. 18 Jul, 2018 1 commit
  5. 17 Jul, 2018 2 commits
    • Ell's avatar
      app: indentation fix in gimppluginmanager-restore.c · bfc26817
      Ell authored
      bfc26817
    • Ell's avatar
      app, pdb: add gimp-register-file-handler-priority procedure · b4ac9568
      Ell authored
      Add a gimp-register-file-handler-priority procedure, which can be
      used to set the priority of a file-handler procedure.  When more
      than one file-handler procedure matches a file, the procedure with
      the lowest priority is used; if more than one procedure has the
      lowest priority, it is unspecified which one of them is used.  The
      default priority of file-handler procedures is 0.
      
      Add the necessary plumbing (plus some fixes) to the plug-in manager
      to handle file-handler priorities.  In particular, use two
      different lists for each type of file-handler procedures: one meant
      for searching, and is sorted according to priority, and one meant
      for display, and is sorted alphabetically.
      b4ac9568
  6. 13 Jul, 2018 1 commit
  7. 11 Jul, 2018 1 commit
  8. 10 Jul, 2018 1 commit
  9. 03 Jul, 2018 1 commit
  10. 02 Jul, 2018 1 commit
  11. 26 Jun, 2018 1 commit
  12. 22 Jun, 2018 1 commit
  13. 18 Jun, 2018 1 commit
  14. 16 Jun, 2018 3 commits
    • Jehan's avatar
      app: also search interpreters executable in $PATH. · 0af3ae81
      Jehan authored
      Same as we did for binfmt-style lines, if the executable part (for
      instance in `pygimp.interp`) is not an absolute path, let's allow
      ourselves to find it in the environment $PATH.
      
      (cherry picked from commit f3c5ed55)
      0af3ae81
    • Jehan's avatar
      app: gimp_interpreter_db_add_extension() should check $PATH if needed. · c0cc5abe
      Jehan authored
      So basically our binfmt set for Python simply never worked since we just
      set 'python' and not a full path, but current code was not looking in
      the $PATH environment. This was dead code. Now it's fixed.
      
      (cherry picked from commit 6080178a)
      c0cc5abe
    • Jehan's avatar
      app: actually resolve the interpreter through extension as last resort. · 51a8ff9c
      Jehan authored
      Current code of gimp_interpreter_db_resolve() was only resolving the
      interpreter by the file extension when the file could not be opened for
      reading or if it was empty/coult not be read. This basically made this
      test completely useless.
      Let's fix this. Now it will be run all the time, but simply at the end,
      if shebang and magic failed.
      
      (cherry picked from commit 8509117f)
      51a8ff9c
  15. 06 Jun, 2018 1 commit
    • Michael Natterer's avatar
      app, libgimp*: remove the config option to disable tooltips · b3620517
      Michael Natterer authored
      Also remove all traces of it from the plug-in protocol and raise the
      protocol version to 0x0100 (we now allow features and therefore
      version bumps in stable, and the master protocol version should always
      be higher). Fix the code that aborts plug-in startup on protocol
      version mismatch, we can't use gimp_message() because we have no
      protocol.
      b3620517
  16. 29 May, 2018 1 commit
    • Ell's avatar
      libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config · 97925de8
      Ell authored
      Pass the current icon theme directory to plug-ins through the
      config message, and add a gimp_icon_theme_dir() libgimp function
      for retrieving it.  Note that we already have a similar
      gimp_icon_get_theme_dir() PDB function, which we keep around, since
      it can be used to dynamically query for the current icon dir,
      unlike the former, and since it returns a dynamically-allocated
      string, while the rest of the config-related functions return
      statically allocated strings.
      
      Use the new function, instead of gimp_get_icon_theme_dir(), in
      gimp_ui_init().  This allows gimp_ui_init() to run without making
      any PDB calls.  Consequently, this allows us to start plug-ins that
      call gimp_ui_init() without entering the main loop in the main app.
      We're going to add a plug-in that displays an interactive dialog
      while the main app is blocking waiting for an operation to
      complete, and we need to be able to start the plug-in without
      entering the main loop, to avoid the possibility of arbitrary code
      being executed during the wait.
      
      Bump the protocol version.
      97925de8
  17. 26 May, 2018 1 commit
  18. 20 May, 2018 5 commits
  19. 07 May, 2018 1 commit
    • Michael Natterer's avatar
      app: add layers/channels/vectors freeze/thaw to gimpplugin-cleanup · 7e1df2c8
      Michael Natterer authored
      so plug-ins cannot thaw what they haven't frozen, and the code
      can clean up frozen stuff left behind by crashed or broken plug-ins.
      
      Also redo the cleanup code so it only keeps track of the undo group
      counts and freeze counts of what *this* GimpPlugInProcFrame did
      itself. That should make it even stricter against broken code that
      could mess up internals.
      7e1df2c8
  20. 29 Apr, 2018 1 commit
    • Jehan's avatar
      app: expand/unexpand locale paths in pluginrc. · 0fce8fdb
      Jehan authored
      It doesn't look like it is actually much of a problem, but anyway it's
      better to have non-absolute paths in config files when possible.
      
      Thanks to jtojnar on IRC for reporting these (and MyPaint brush paths
      from my previous commit).
      0fce8fdb
  21. 14 Apr, 2018 1 commit
  22. 08 Apr, 2018 1 commit
  23. 06 Mar, 2018 1 commit
    • Ell's avatar
      app, libgimp: don't close parent pipes in libgimp; use gimp_spawn_set_cloexec() · 1b1fba19
      Ell authored
      In gimp_plug_in_open(), use gimp_spawn_set_cloexec() to prevent the
      parent's end of the read/write pipes from being inherited by the
      spawned plug-in, instead of passing the corresponding file
      descriptors to the plug-in as command-line arguments, and having
      gimp_main() close them.
      
      Adding new command-line arguments to plug-ins is problematic, since
      their ability to handle them depends on their protocol version,
      which is only communicated after the plug-in is spawned.
      
      Regardless, this is much simpler.
      1b1fba19
  24. 05 Mar, 2018 2 commits
    • Ell's avatar
      app: fix buffer overflow in gimp_plug_in_open() · c6e8dd88
      Ell authored
      Commit b9e629ab added two more
      command-line arguments when spawning plug-ins, but failed to expand
      the args array...
      c6e8dd88
    • Ell's avatar
      app, libgimp: use gimp_spawn_async() when spawning plug-ins · b9e629ab
      Ell authored
      In gimp_plug_in_open(), use gimp_spawn_async(), added in the
      previous commit, instead of g_spawn_async().  See the previous
      commit for the rationale.
      
      Since gimp_spawn_async() doesn't provide a mechanism to perform any
      cleanup in the child before exec()ing, move the closing of the
      parent's end of the read/write pipes from the app to the plug-in's
      gimp_main(), passing the relevant file descriptors to the plug-in
      through argv.
      b9e629ab
  25. 11 Feb, 2018 1 commit
  26. 11 Jan, 2018 1 commit
  27. 10 Jan, 2018 1 commit
  28. 30 Nov, 2017 1 commit
    • Ell's avatar
      */Makefile.am: add abbreviations to generated enum files · f7d6805e
      Ell authored
      Update the dprod production of generated enum files to include
      abbreviated value descriptions, as per the previous commits.
      
      Add a comment for translators above the abbreviated descriptions,
      specifying the full description they abbreviate.
      f7d6805e
  29. 24 Aug, 2017 1 commit
  30. 28 Jul, 2017 2 commits