Commit Graph

321 Commits

Author SHA1 Message Date
Michael Natterer 701ba8656a app: use gimp_image_get_color_profile() instead of gimp_image_get_icc_parasite() 2015-08-16 20:39:16 +02:00
Michael Natterer 1ca3812396 app: rename gimpimage-profile.[ch] to gimpimage-color-profile.[ch] 2015-08-02 22:18:43 +02:00
Michael Natterer ee2f9ee846 app: rename gimp_image_get,set,validate_icc_profile() to _icc_parasite()
to make sure we don't have some _icc_profile() functions that deal
with raw data/size and some that deal with GimpParasite.
2015-06-16 23:56:53 +02:00
Alexandre Prokoudine 3d4d3b793e Fix a user-visible typo 2015-05-02 23:43:06 +03:00
Michael Natterer 2480d69341 Bug 748505 - Don't do nothing and report no error when trying to open a fifo
Remove the check for opening a regular file from
file_open_dialog_response() and call the functions in file-open
unconditionally. This is the actual fix because the check was simply
bailing out with no message or anything when trying to open a
non-regular file, whereas the checks in file-open return proper error
messsages.

In file_open_image(), do the checks for being a regular and readable
file first, so we don't run into reading from other files when trying
to figure the file format.
2015-04-29 19:01:36 -04:00
Kristian Rietveld cea42c73d8 app: fix implicit enum casting
Silences clang.
2015-01-10 00:02:28 +01:00
Michael Natterer ba065a31ec app: don't leak the GFileInfo in file_open_image() and file_save() 2014-10-07 15:23:19 +02:00
Jehan 56c2e19733 Removes various easy compilation warnings. 2014-09-28 18:18:00 +02:00
Michael Natterer 81aaa1decd app: use g_str_has_suffix() in file_utils_file_get_ext()
g_strrstr() is wrong for checking for suffixes.
2014-08-02 15:55:32 +02:00
Michael Natterer 7d7180dcaa app: s/uri/file/ in a comment in file-open.c 2014-07-31 12:22:27 +02:00
Jehan fccf7174ab app: typo s/Premission/Permission/ 2014-07-28 19:03:39 +00:00
Michael Natterer 208c3ecd2a app: file_procedure_find(): check magics only for native files 2014-07-23 21:37:13 +02:00
Michael Natterer 7e7c22fc32 app: separate the mount logic from uploading/downloading
We need to mount every non-native GFile's volume, regardless of
whether the file procedure uses GIO directly or needs file-remote to
download/upload the file. Move the entire mount logic to a new
file-remote function and change gimp-gui.c and gui-vtable.c to only
return a GMountOperation. Try to mount every non-native file in
file-open.c and file-save.c and bail out if mounting fails. Simplify
the uploading and downloading code accordingly.
2014-07-23 21:37:13 +02:00
Michael Natterer 57e6b22b9d app, plug-ins: remove file-uri completely
and enable the new file-remote code in app unconditionally.
2014-07-23 21:37:13 +02:00
Michael Natterer f8848f06fd app: paranoia: ref file_save()'s GFile during save, see previous commit 2014-07-13 15:08:45 +02:00
Michael Natterer a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Natterer 335381579c app: don't dereference a NULL GError in file_remote_copy_file() 2014-07-12 23:02:01 +02:00
Michael Natterer 2c28b271cc app: disconnect from the progress' "cancel" signal in file_remote_copy_file() 2014-07-11 09:21:59 +02:00
Michael Natterer 3bffdd9766 app: set the return status reliably in file_save()
and make sure that GIMP_PDB_EXECUTION_ERROR is returned when uploading
fails.
2014-07-11 02:03:18 +02:00
Michael Natterer c91b63f8ab app: port file-open and file-save to the new file-remote utilities
but only use them if GIMP_HANDLE_REMOTE_FILES is set.
2014-07-11 01:52:17 +02:00
Michael Natterer 9680a28deb app: add file-remote.[ch] which implements uploading/downloading
and will make the file-uri plug-in obsolete.
2014-07-11 01:23:11 +02:00
Michael Natterer 4bd2f3e87c app: add back code that only checks local files for type and permissions
I've seen these tests failing on remote files that load and save just
fine if the test is removed.
2014-07-08 20:27:07 +02:00
Michael Natterer f049ac68b8 app: fix leak and remove unused variable in file-utils.c 2014-07-08 20:27:07 +02:00
Michael Natterer c884c4f630 app: change file_utils_filename_to_uri() to file_utils_filename_to_file() 2014-07-08 10:25:25 +02:00
Michael Natterer 3ba0589f14 app: make file_utils_filename_is_uri() private 2014-07-08 10:14:53 +02:00
Michael Natterer ba00571756 app: file_utils_file_get_ext() now returns an allocated string 2014-07-08 09:10:29 +02:00
Michael Natterer 5e13f81b99 app: change file_utils_uti_get_ext() to file_utils_file_get_ext() 2014-07-08 02:58:59 +02:00
Michael Natterer a43730390c app: remove obsolete cruft from file-utils.[ch] 2014-07-08 01:42:44 +02:00
Michael Natterer b17cc3823b app: fix file_utils_file_with_new_ext() to not just cut off the extension 2014-07-08 00:39:55 +02:00
Michael Natterer ff6ea69569 app: change the image's various URIs to GFiles
which gets rid of a lot of temporarily added GFile code again because
we don't need to convert between URI and GFile any longer.
2014-07-07 23:58:11 +02:00
Michael Natterer a6aa35df57 app: port file_open_from_command_line() to GFile
Use g_file_new_for_commandline_arg() and remove
file_utils_any_to_file().
2014-07-07 23:58:11 +02:00
Michael Natterer 0f8d84d5e9 app: port all file_open() and file_save() functions to GFile 2014-07-07 23:58:11 +02:00
Michael Natterer 3f52828896 app: change GimpImageFile and GimpDocumentList to speak GFile 2014-07-07 23:58:11 +02:00
Michael Natterer bc1e8ab3fc app: port file magic checking to GIO 2014-07-05 00:58:46 +02:00
Michael Natterer c885af6c3e app: only add supported image files to the document history
Initialize the history after plug-ins, and check each item listed by
GtkRecentManager against the mime-types supported by our load
plug-ins.
2014-07-04 20:01:08 +02:00
Michael Natterer 3dbae5e4d9 Bug 727854 - Export file type should not be based on filename extension
Keep the export proc acound in the image (just as we keep around
the save proc), and use it when exporting again.
2014-07-02 14:24:02 +02:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Michael Natterer e80eaf2524 app: start an image profile API in core/gimpimage-profile.[ch]
add lowlevel functions gimp_image_get,set_icc_profile() which deal
with ICC profiles in a GimpParasite.
2014-03-16 23:50:41 +01:00
Michael Natterer 4fb7fc918a Bug 704896 - pop ups are annoying when opening multiple files...
...from the command line on some platforms/window managers

file_open_from_command_line(): display the progress in the active
display if there is no empty display. This way the progress appears in
the display that was opened from the previous command line argument.
2013-11-20 23:17:40 +01:00
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
Jehan c7aa623a55 app: clean out a big bunch of leading tabs.
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Nils Philippsen f232a2bb6f app: simplify finding matching extensions
Use g_slist_find_custom(), g_ascii_strcasecmp() rather than iterating
over lists of extensions, then over single characters again and
comparing the output of g_ascii_tolower().
2013-08-30 11:50:57 +02:00
Massimo Valentini 8a7d5c9d16 app: don't pass NULL to g_object_add_weak_pointer
opening many images from the command line used to print:

(gimp-2.9:): GLib-GObject-CRITICAL **: g_object_add_weak_pointer:
assertion 'G_IS_OBJECT (object)' failed

because only the first finds the empty display
2013-07-05 18:13:46 +02:00
Massimo Valentini 6c62eb2238 app: file_open_from_command_line(): don't access a dangling display pointer
Happens if GIMP is quit while the image is being loaded.
2013-07-04 21:07:20 +02:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 308431f7b6 Bug 701053 - Opening jpg files from Canon camera displays...
...PNG Description encoding error.

Don't unconditionally display all error messages from thumbnail saving.
Instead, return the error from gimp_imagefile_create_thumbnai()
and gimp_imagefile_save_thumbnail() and display it only if thumbnail
creation was the actual user-intended action (like clicking the preview
in a file dialog). Do not display the error when thumbnailing is just
a side effect of loading/saving an image.
2013-05-26 21:31:06 +02:00
Michael Natterer a484066813 app: fix file magic matching
file_procedure_find(): check all procedures' magics and not the first
precedure's magics #procedures times, sigh.
2013-05-02 20:50:29 +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
Michael Natterer 086793d040 Make it harder to "save" to foo.png.gz or "export" to foo.xcf.gz
Remove plain .gz .bz2 .xz from the extensions the file-compressor
plug-in registers, and make sure is only ends up in "save_procs", so
at least "exporting" to foo.xcf.gz is not possible any longer. With
some effort, one can still "save" to foo.png.gz tho, but it's much
harder now.
2013-02-15 00:01:27 +01:00