Commit Graph

28 Commits

Author SHA1 Message Date
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- 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
2013-10-15 01:58:39 +02:00
Michael Natterer e99c0045a2 app: fix saving/loading of .xcf.gz and other compressed XCFs
Make file_utils_uri_get_ext() public and use it instead of
strrchr(uri, '.'). Also add "xz" to the list of matched special cases,
and some cleanup.
2013-05-02 20:05:35 +02:00
Martin Nordholts d8f3cd1b26 app: Support default types for save and export 2009-05-16 13:02:54 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer 88ac187c84 new function, fixed and factored out of file_utils_filename_to_uri().
2007-05-14  Michael Natterer  <mitch@gimp.org>

	* app/file/file-utils.[ch] (file_utils_filename_is_uri): new function,
	fixed and factored out of file_utils_filename_to_uri().

	* app/main.c (gimp_dbus_open): use it here instead of a simple
	strstr(filename, "://").


svn path=/trunk/; revision=22484
2007-05-13 23:15:34 +00:00
Sven Neumann cc2a076df5 app/file/Makefile.am app/file/file-procedure.[ch] split functions dealing
2007-05-11  Sven Neumann  <sven@gimp.org>

        * app/file/Makefile.am
        * app/file/file-procedure.[ch]
        * app/file/file-utils.[ch]: split functions dealing with file
        procedures into their own file and renamed them.

        * app/file/file-open.c
        * app/dialogs/file-save-dialog.c
        * app/actions/file-commands.c
        * app/widgets/gimpthumbbox.c
        * app/widgets/gimpdnd-xds.c
        * app/widgets/gimpimagepropview.c
        * tools/pdbgen/pdb/fileops.pdb: changed accordingly

        * app/pdb/fileops_cmds.c: regenerated.


svn path=/trunk/; revision=22474
2007-05-11 18:50:35 +00:00
Sven Neumann 20b331da7f let the filename -> uri functions take a Gimp parameter instead of the
2007-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: let the filename -> uri functions take
	a Gimp parameter instead of the list of load procedures.

	* app/core/gimpimage.c
	* app/app_procs.c
	* app/dialogs/file-open-location-dialog.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c: regenerated.

svn path=/trunk/; revision=21736
2007-01-19 11:48:48 +00:00
Sven Neumann d4249a1038 app/app_procs.c moved code from app_procs.c to file-utils.
2007-01-19  Sven Neumann  <sven@gimp.org>

	* app/app_procs.c
	* app/file/file-utils.[ch]: moved code from app_procs.c to file-utils.


svn path=/trunk/; revision=21735
2007-01-19 11:33:45 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 3fbf7436c9 added a GError parameter to file_utils_find_proc().
2006-08-10  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: added a GError parameter to
	file_utils_find_proc().

	* app/actions/file-commands.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/widgets/gimpdnd-xds.c
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c: regenerated.
2006-08-10 21:22:05 +00:00
Michael Natterer 98a10a08df app/file/file-utils.[ch] fix typo: s/thumnail/thumbnail/
2006-04-11  Michael Natterer  <mitch@gimp.org>

	* app/file/file-utils.[ch]
	* tools/pdbgen/pdb/fileops.pdb: fix typo: s/thumnail/thumbnail/

	* app/pdb/fileops_cmds.c: regenerated.
2006-04-11 00:30:06 +00:00
Michael Natterer f0f8f04515 added file_utils_load_thumbnail() and file_utils_save_thumbnail().
2006-04-10  Michael Natterer  <mitch@gimp.org>

	* app/file/file-utils.[ch]: added file_utils_load_thumbnail() and
	file_utils_save_thumbnail().

	* tools/pdbgen/pdb/fileops.pdb: remove lots of code and includes
	and use the new functions.

	* app/pdb/fileops_cmds.c: regenerated.
2006-04-10 12:59:17 +00:00
Michael Natterer 086d0b6371 app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a
2006-04-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-types.h
	* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
	and made a GObject derived from GimpProcedure (instead of having
	a pointer to a GimpProcedure). Added image_types and file_magic
	utility functions taken from plug-ins.[ch]. Still lives in the
	same crappy files because I am undecided where to put it...

	* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
	switch() statement and always call the internal marshaller because
	GimpProcedure::execute() is properly overridden by
	GimpPlugInProcedure now.

	* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
	utilities added to GimpPlugInProcedure.

	* app/actions/file-commands.c
	* app/actions/plug-in-actions.[ch]
	* app/actions/plug-in-commands.[ch]
	* app/core/gimp-gui.[ch]
	* app/core/gimp.[ch]
	* app/core/gimpimage.[ch]
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.[ch]
	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins-query.c
	* app/widgets/gimpactiongroup.[ch]
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.[ch]
	* app/widgets/gimpfileprocview.[ch]
	* app/widgets/gimppluginaction.[ch]
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2006-04-05 08:38:33 +00:00
Sven Neumann ee64ca3c90 introduced variants of file_utils_uri_to_utf8_filename() and
2005-10-02  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: introduced variants of
	file_utils_uri_to_utf8_filename() and
	file_utils_uri_to_utf8_basename() that use g_filename_display_name()
	and g_filename_display_basename().

	* app/actions/data-commands.c
	* app/actions/documents-commands.c
	* app/actions/file-actions.c
	* app/actions/file-commands.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-title.c
	* app/file/file-open.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpthumbbox.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimpviewabledialog.c: use the new functions.

	* plug-ins/help/domain.c: use g_filename_display_name().
2005-10-01 22:43:22 +00:00
Sven Neumann 8b3481f3ff added new utility function file_utils_filename_from_uri().
2005-02-03  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: added new utility function
	file_utils_filename_from_uri().

	* app/file/file-open.c (file_open_image)
	* app/file/file-save.c (file_save_as):
	* app/file/file-utils.c (file_utils_find_proc)
	(file_utils_uri_to_utf8_filename): replaced calls to
	g_filename_from_uri() with file_utils_filename_from_uri().
2005-02-03 23:14:42 +00:00
Sven Neumann ec693d7b09 app/config/gimpcoreconfig.[ch] added new gimprc option
2004-10-08  Sven Neumann  <sven@gimp.org>

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added new gimprc option
	"thumbnail-filesize-limit" that allows to control the maximum
	filesize for automatic thumbnail creation.

	* app/dialogs/preferences-dialog.c: added a GUI for it, needs
	review.

	* app/core/gimpimagefile.[ch]: minor cleanups. Moved call to
	gimp_thumbnail_peek_image() from gimp_imagefile_save_thumb() to
	 gimp_imagefile_save_thumbnail() to avoid it being called twice.

	* app/file/file-utils.[ch]: export utility function
	file_utils_find_proc_by_extension() that allows to check for a
	file plug-in by looking at the filename extension only.

	* app/widgets/gimpthumbbox.[ch]: automatically create or update
	thumbnails for image files with a known extension that are smaller
	than "thumbnail-filesize-limit".  Fixes bug #137176.
2004-10-08 19:29:33 +00:00
Michael Natterer 9ffc00be80 app/plug-in/Makefile.am removed... ...and added with a new name.
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-proc.[ch]: removed...
	* app/plug-in/plug-in-proc-def.[ch]: ...and added with a new name.

	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.[ch]
	* app/plug-in/plug-in-progress.[ch]
	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.[ch]
	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly plus some
	minor cosmetic cleanups.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2004-09-22 15:12:24 +00:00
Michael Natterer 1f07af7223 removed inclusion of <stdio.h> and "plug-in/plug-in-types.h".
2004-01-19  Michael Natterer  <mitch@gimp.org>

	* app/file/file-utils.h: removed inclusion of <stdio.h> and
	"plug-in/plug-in-types.h".
2004-01-19 02:34:47 +00:00
Sven Neumann a70698c4d9 removed file_utils_filename_to_utf8() ...
2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...

	* libgimpbase/gimputils.[ch]: ... and added it here as
	gimp_filename_to_utf8(). Added some docs that promise less than
	the current implementation holds so that we can change the
	implementation later.

	* app/*/*.c: use gimp_filename_to_utf8() where
	file_utils_filenames_to_utf8() has been used before.

	* libgimpbase/gimpbase.def: changed accordingly.

	* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-19 01:08:43 +00:00
Tor Lillqvist 18485018b3 Add new function file_utils_filename_to_utf8(), which is to be used when
2004-01-14  Tor Lillqvist  <tml@iki.fi>

	* app/file/file-utils.[ch]: Add new function
	file_utils_filename_to_utf8(), which is to be used when converting
	file names (which are kept in the on-disk encoding) to UTF-8 for
	passing to GTK, or to g_print() etc.

	* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
	of the warnings generated by non-UTF8 pathnames. See #130118.

	* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
	strings in the on-disk encoding.

	* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
	g_filename_to_utf8()) before passing to g_print().
2004-01-14 02:03:37 +00:00
Sven Neumann 929fef0d57 added some sanity checks to temp_buf conversion routines.
2003-05-15  Sven Neumann  <sven@gimp.org>

	* app/base/temp-buf.c: added some sanity checks to temp_buf
	conversion routines.

	* tools/pdbgen/pdb/fileops.pdb (file_load_thumbnail_invoker): use
	GimpImagefile to load a thumbnail. Only works for RGB images yet.
	This adresses bug #113033.

	* app/pdb/fileops_cmds.c: regenerated.

	* app/file/file-utils.[ch]: removed file_utils_readXVThumb(). It
	is not needed any longer since GimpImagefile also handles the
	old-style .xvpics.

	* plug-ins/script-fu/scripts/copy-visible.scm: fixed typo.
2003-05-15 13:33:30 +00:00
Michael Natterer 99d93b9255 added vitrual function GimpViewable::get_description() which returns the
2003-04-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added vitrual function
	GimpViewable::get_description() which returns the string that
	should be presented to the user plus an optional tooltip with more
	information. The default implementation just returns the object's
	name and no tooltip.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpimage.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimptoolinfo.c: implement get_description().

	* app/core/gimpimagefile.[ch]: ditto. Renamed
	gimp_imagefile_get_description() to
	gimp_imagefile_get_desc_string(). Well, um, gimme a better name...

	* app/gui/file-open-dialog.c: changed accordingly.

	* app/file/file-utils.[ch]: renamed readXVThumb() to
	file_utils_readXVThumb().

	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/widgets/widgets-types.h: removed GimpItemGetNameFunc typedef.

	* app/widgets/gimpcontainerview-utils.[ch]: removed the the actual
	get_name_funcs. They now live in the core as
	GimpViewable::get_description() implementations.

	* app/widgets/gimpcontainermenu.[ch]
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpmenuitem.[ch]
	* app/widgets/gimpviewabledialog.c: removed get_name_func stuff
	and use gimp_viewable_get_description().

	* app/widgets/gimpcontainermenu.[ch]: added "preview_border_width"
	to gimp_container_menu_set_preview_size().

	* app/widgets/gimpimagedock.c: changed accordingly.

	* app/pdb/fileops_cmds.c: regenerated.
2003-04-08 16:01:01 +00:00
Michael Natterer 095314f01d made gimp_imagefile_save_thumbnail() return a gboolean indicating success.
2002-04-19  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagefile.[ch]: made gimp_imagefile_save_thumbnail()
	return a gboolean indicating success.

	* app/file/file-save.c
	* tools/pdbgen/pdb/fileops.pdb: use gimp_imagefile_save_thumbnail()
	to save thumbnails.

	* app/file/file-utils.[ch]: removed the .xvpics thumbnail saving code.

	* app/pdb/fileops_cmds.c: regenerated.
2002-04-19 17:15:39 +00:00
Michael Natterer 99e575d17d fixed temp_buf_copy() and temp_buf_to_[color|gray]() to (1) not crash and
2002-04-16  Michael Natterer  <mitch@gimp.org>

	* app/base/temp-buf.c: fixed temp_buf_copy() and
	temp_buf_to_[color|gray]() to (1) not crash and (2) to assume the
	correct pixelformat. Bugs were never noticed because the code was
	never used until today...

	* app/core/gimpviewable.c (gimp_viewable_get_new_preview_pixbuf):
	use temp_buf_copy() to convert GRAY* TempBufs to RGB* before
	creating the pixbuf.

	* app/app_procs.c: don't try to open command line images if the
	filename could not be converted to an URI.

	* app/file/file-open.c
	* app/file/file-save.c: use g_file_test() instead of stat().

	* app/file/file-utils.[ch]: cleanup, changed
	file_utils_filename_to_uri() to take a list of procs, not a Gimp
	pointer.

	* app/core/gimpimage.c: changed accordingly.

	* app/core/gimpimagefile.[ch]: implemented thumbnail saving
	following the thumbnail standard v0.5 (the implementation is not
	yet fully standard compliant).

	* app/gui/file-open-dialog.c: use the new thubmnail functions and
	removed all .xvpics code. Not finished yet...

	* app/core/gimpdocuments.c
	* app/widgets/gimpdocumentview.c: changed accordingly.

	* tools/pdbgen/pdb/fileops.pdb (file_save_thumbnail): set "success"
	correctly.

	* app/pdb/fileops_cmds.c: regenerated.
2002-04-16 20:25:27 +00:00
Michael Natterer 65cfa8db19 added utility functions file_utils_uri_to_utf8_basename() and
2002-04-14  Michael Natterer  <mitch@gimp.org>

	* app/file/file-utils.[ch]: added utility functions
	file_utils_uri_to_utf8_basename() and
	file_utils_uri_to_utf8_filename().

	* app/nav_window.c
	* app/undo_history.c
	* app/display/gimpdisplayshell.c
	* app/gui/info-window.c
	* app/gui/menus.c
	* app/gui/palette-import-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/widgets/gimpcontainerview-utils.c: use the new functions.
2002-04-14 17:28:58 +00:00
Michael Natterer 5e51cebc15 Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile.
2002-04-14  Michael Natterer  <mitch@gimp.org>

	Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile.

	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]: port everything to using URIs, removed
	file_open_absolute_filename() and added file_utils_filename_to_uri()
	instead.

	* app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which
	works like the old gimp_image_[get|set]_filename().
	Changed gimp_image_[get|set]_filename() to call uri conversion
	functions.

	* app/app_procs.c: removed lots of code and use the new uri
	functions to open images passed on the command line.

	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c: changed accordingly.

	* app/nav_window.c
	* app/undo_history.c
	* app/display/gimpdisplayshell.c
	* app/gui/info-window.c
	* app/gui/palette-import-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/widgets/gimpcontainerview-utils.c:
	s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add
	a utility function which returns the basename in unescaped UTF-8.

	* app/gui/file-commands.c
	* app/widgets/gimpdocumentview.c: use "uri", not "filename" as
	variable name where appropriate.

	* app/gui/menus.c: some broken code for the "Open Recent" items,
	will be fixed soon...

	* app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped
	filenames to uris.

	* tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified
	the meaning of the "raw_filename" parameter.

	* tools/pdbgen/pdb/message.pdb: use g_message("%s", message),
	*not* g_message(message).

	* app/pdb/fileops_cmds.c
	* app/pdb/message_cmds.c
	* libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 14:38:55 +00:00
Michael Natterer 06f63a44d5 added RunModeType. removed RunModeType. don't scan app/plug_in.h for
2001-04-28  Michael Natterer  <mitch@gimp.org>

	* app/appenums.h: added RunModeType.
	* app/plug_in.h: removed RunModeType.
	* tools/pdbgen/Makefile.am: don't scan app/plug_in.h for enums.
	* tools/pdbgen/enums.pl: regenerated.

	* app/file-open.[ch]
	* app/file-save.[ch]
	* app/file-utils.[ch]: removed all GUI specific code.

	* app/gui/Makefile.am
	* app/gui/file-dialog-utils.[ch]
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.[ch]: new files.
	Renamed file_open() to 	file_open_with_display().

	* app/app_procs.c
	* app/docindex.c
	* app/gimpdnd.c
	* app/gui/commands.c
	* app/gui/gui.c
	* app/gui/menus.c: changed accordingly.
2001-04-28 15:11:29 +00:00
Michael Natterer 7e8f21f547 app/fileops.[ch] removed...
2001-03-30  Michael Natterer  <mitch@gimp.org>

	* app/fileops.[ch]
	* app/fileopsP.h: removed...

	* app/file-open.[ch]
	* app/file-save.[ch]
	* app/file-utils.[ch]: ...and split up into more hackable chunks.
	(didn't change any logic, just moved the functions around)

	* app/Makefile.am
	* app/app_procs.c
	* app/commands.c
	* app/docindex.c
	* app/gimpdnd.c
	* app/gimprc.c
	* app/menus.c
	* app/pdb/fileops_cmds.c
	* po/POTFILES.in
	* tools/pdbgen/pdb/fileops.pdb: changed accordingly (mostly changing
	#include's).
2001-03-30 13:31:41 +00:00