Commit Graph

14 Commits

Author SHA1 Message Date
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