After Alexandre Prokoudine's insistent demand! :-)
I am still not sure how wise this is, since this should be really
considered a "developer-only" option. Basically these tools are really
too buggy and unstable and we should not shine too much light on these.
The counter-argument is that doing so will favor the bitrot.
Well ok. At least let's add a big warning message at the top of the
Playground page, to make it very clear (if that were not already the
case) that basically this is not to be considered a secret feature, but
really more a "we are looking for contributors" option.
The debug menu is currently not included in stable versions.
Include the menu unconditionally, but hide it, and its associated
actions, by default in stable versions. Allow enabling the menu
using a new --show-debug-menu command-line option, in the same vein
as --show-playground.
Since commit 9fdf35550b, I removed the GIMP_APP_GLUE_COMPILATION check
because we need to have the whole versioning info from the new debug
widget. It just makes sense to go further and just make this a proper
internal API to get version information.
It was previously untested, hence as expected needed fixes. First I add
our own exception handler using Win32 API SetUnhandledExceptionFilter().
Second, I reorder things so that ExcHndlInit() is run after this setter,
since they will be executed as a FILO and we need backtraces to be
generated before our separate GUI runs. Last I run the backtrace GUI as
async. No need to keep the main GIMP waiting since the traces have
already been generated into a separate file.
Also replace gtk_show_uri() by the implementation taken straight from
our web-browser plug-in, since apparently gtk_show_uri() doesn't work in
Windows (and probably not macOS either since I see we have a separate
implementation for this platform as well). I would like to be able to
use the PDB but can't because this code needs to be usable both within
the main process and into a separate tool process. Ideally, this should
just be a utils function which could be included without a problem.
The feature already exists in our code and produces backtraces upon a
crash into a file. The only difference is that we are now getting the
file contents and showing it in our new debug dialog, so that it works
similarly on all platform (and therefore making the debug info visible
to people, otherwise they would never report, even though the data is
generated).
The difference with gdb/lldb is that it doesn't allow backtraces at
random points (for debugging non-fatal yet bad errors). Also the API has
just 2 functions and in particular an ExcHndlInit() but no way to unload
the feature. So we don't need the debugging page in Preferences because
the switch option would not work. On Windows, the feature will be
decided at build time only.
Last point: the code is untested on Windows so far. I assume it would
work, but there is at least one point I am unsure of: will ExcHndl have
already generated the backtrace file when gimpdebug runs? If not, I will
have to let gimp die first to be able to get the backtrace.
This will determine whether to output backtrace in a GUI and is disabled
by default on stable, and activated in dev builds. It is a bit redundant
with --stack-trace-mode option CLI and will take priority when enabled
since most people would run GIMP with a graphical interface anyway.
The GEGL ops sanity check causes all ops to be initialized. The
strings used by their properties will pick the translation selected
at the time of the check. It must therefore run after language
intiailization, otherwise the selected translation would correspond
to the system locale, even if the user selected a different language
in the preferences.
Split the sanity check into early and late stages. The early stage
is run before the call to app_run(), as it did before, while the
late stage is run during app_run(), after the configuration has been
loaded. Currently, the GEGL ops check is the only late-stage check;
all other checks are performed during the early stage.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.
This requires most of the stuff in my last few commits, and some
more changes:
GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
With this patch, there should be no more need to set PATH on Windows
before running GIMP.
This patch was tested by me and drawoc, but there could be some
undetected issues lurking. Revert if any problems arise.
The page is shown by default in unstable but needs --show-playground
in stable versions. There is nothing yet on that page. Also, the icon
needs improvement...
...when started via Windows Explorer (e.g. the file context menu)
When built against GLib >= 2.39.90, use g_win32_get_command_line()
and g_option_context_parse_strv() which handle all sorts of windows
filename encodings properly.
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
finally acknowledging the fact that app/ depends on gdk-pixbuf almost
globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.
The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
Warning
g_thread_init has been deprecated since version 2.32 and should not be used in newly-written code. This function is no longer necessary. The GLib threading system is automatically initialized at the start of your program.
Allow to dump the names of all internal deprecated PDB
procedures. This enables us to do static analysis on *.scm files and
look for usage of deprecated procedures.
Using G_OPTION_FLAG_NO_ARG with G_OPTION_ARG_NONE is not a valid combination,
glib 2.28.2 warns about it.
(gimp:20379): GLib-WARNING **: goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option "debug-handlers" of type 0
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-10-13 Sven Neumann <sven@gimp.org>
* app/Makefile.am
* app/signals.[ch]: new files with code split out of main.c.
* app/main.c: changed accordingly.
svn path=/trunk/; revision=27270
2008-08-07 Tor Lillqvist <tml@novell.com>
* app/main.c: Code built by the still unstable mingw-w64 toolchain
gets bogus argc and argv when built as subsystem:windows, so use
__argc and __argv instead, which seem to be OK.
* libgimp/gimp.h: Similar change here.
svn path=/trunk/; revision=26420
2008-07-11 Sven Neumann <sven@gimp.org>
* app/Makefile.am
* app/unique.[ch]: new files containing functionality to check
for
an already running instance of GIMP of notifying it about files
to
open. Code split out of main.c.
* app/main.c: changed accordingly.
svn path=/trunk/; revision=26117
2008-02-26 Tor Lillqvist <tml@novell.com>
* app/version.[ch]: New files. Rename gimp_show_version() to
gimp_version_show() and move here. When given both --version and
--verbose, print build-time and run-time versions of the most
important dependencies.
* app/Makefile.am: Add them.
* app/main.c: Call gimp_version_show().
* app/Makefile.am: Use -mwindows only for the GUI gimp, not for
gimp-console.
svn path=/trunk/; revision=24968
2007-12-29 Øyvind Kolås <pippin@gimp.org>
Added adapter GEGL operations for reading and writing to TileManagers.
* configure.in:
* app/Makefile.am: added gegl subdir.
* app/gegl/Makefile.am: added.
* app/gegl/gimpops.c: (gimp_gegl_ops_init):
* app/gegl/gimpoptilesink.[ch]: adapter GEGL operation for writing to
GIMP tile managers.
* app/gegl/gimpoptilesource.[ch]: adapter GEGL operation for reading
from GIMP tile managers.
* app/main.c: (main): call gimp_gegl_ops_init()
* app/gegl/gegl/: added some headers from GEGL that are not installed
since they are not public API yet.
svn path=/trunk/; revision=24458
2007-11-15 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimp-log.[ch]: new files implementing a log facility which
can be enabled using the GIMP_LOG environment variable.
* app/main.c: initialize it.
* app/display/gimpdisplayshell-callbacks.c: use it instead of
private debugging macros that need to be enabled at compile time.
svn path=/trunk/; revision=24160
2007-10-17 Sven Neumann <sven@gimp.org>
* app/main.c: added back short versions of --gimprc option and
--console-messages command-line options.
svn path=/trunk/; revision=23861
2007-06-25 Sven Neumann <sven@gimp.org>
* configure.in: removed extra check for gthread and fold it into
the GLIB and GTK checks.
* */Makefile.am: changed accordingly.
* app/main.c (main): always call g_thread_init().
svn path=/trunk/; revision=22832