Commit Graph

18805 Commits

Author SHA1 Message Date
Michael Natterer 109e01dbdd pdb, app, libgimp: rename *-paste-as-new to *-paste-as-new-image
Keep the old function names around as deprecated compat wrappers.
2016-09-20 20:20:25 +02:00
Michael Natterer be91db8107 pdb: fix typo in edit-paste's help 2016-09-20 18:54:34 +02:00
Michael Natterer 67863dabf9 Bug 637313 - Should be possible to copy/paste whole layers in a single step
Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):

- change gimp_edit_copy,cut,paste() to return/take a GimpObject
  that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
  we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
  three cases there because there is now a lot of common code
  involved
- change all callers accordingly, use only legacy buffer pasting
  from the PDB for now
2016-09-20 00:20:07 +02:00
Michael Natterer 70d6cd906c app: connect the Gimp instance's clipboard_image to the system clipboard
In gui.c's "clipboard-changed" callback, check for the clipboard_image
and set it on GimpClipboard.
2016-09-19 20:14:21 +02:00
Michael Natterer 7130ba95e1 app: add gimp->clipboard_image and API to set/get it 2016-09-19 20:13:39 +02:00
Michael Natterer f0acb3301a app: factor gimp_edit_get_paste_offset() out of gimp_edit_paste()
and also use it for "paste as new layer", so we get the same
positioning logic for both paste variants.
2016-09-19 17:30:41 +02:00
Michael Natterer 08513f50f8 app: paste as new layer if the target layer can't be modified
Which happens on layer groups and locked drawables.
2016-09-19 12:36:11 +02:00
Michael Natterer 557965e593 app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile
migration code for importing old menurc files.
2016-09-19 12:15:39 +02:00
Michael Natterer 1f00b5e70f app: add setting/getting and sending/recieving images via GimpClipboard
The new functionality is not used yet.
2016-09-18 22:01:13 +02:00
Michael Natterer 0740d8d688 app: don't keep images from the clipboard in gimp->images
They are temporary internal objects. In gimp->images they would
be visible in the GUI and PDB.
2016-09-18 21:56:47 +02:00
Michael Natterer 5136f131be app: add gimp_selection_data_set_xcf() and _get_xcf()
using the new load/save XCF stream APIs added below.
2016-09-18 21:43:45 +02:00
Michael Natterer 63bcc69827 app: factor out xcf_load_stream() and xcf_save_stream()
which can be used to load/save XCF from/to arbitrars streams. Use the
new functions from the load/save procedure invokers.

This commit also fixes a leaked open file ans input stream for each
loaded XCF.
2016-09-18 20:19:42 +02:00
Michael Natterer b092a80e51 app: reorder edit_fade_cmd_callback() in edit-commands.c
and group the prototypes in edit-commands.h
2016-09-17 19:45:45 +02:00
Michael Natterer de5bbd637e app: don't call gimp_layer_set_lock_alpha() on layer groups
in gimp_image_new_from_drawable().
2016-09-17 19:19:30 +02:00
Michael Natterer d85157c376 app: rename gimp->global_buffer to gimp->clipboard_buffer
Also rename the "buffer-changed" signal and the setter, and add a
getter.
2016-09-17 17:39:54 +02:00
Michael Natterer 9bb33914bf app: set tooltips on the tool options' brush, gradient etc edit buttons
Also make the tooltips of the edit buttons of the brush, gradient etc
dialogs consistent.
2016-09-17 17:10:20 +02:00
Michael Natterer 21f8a0fd1e app: clean up and simplify gimp_selection_extract()
It was ported to GEGL pretty much 1:1, leaving too many and even
one completely redundant if()s around.
2016-09-17 15:32:22 +02:00
Michael Natterer d5ffc50c2e app: rename w, h to width, height in gimp_item_mask_bounds() 2016-09-16 23:57:24 +02:00
Michael Natterer dba7d58b56 app: port gimp_drawable_bucket_fill() to x, y, width, height
because x1, y1, x2, y2 are evil.
2016-09-16 23:31:56 +02:00
Michael Natterer cbac0a4ddc app: don't show the "Fonts" startup status message if we don't loas fonts 2016-09-15 18:47:55 +02:00
Ell 7e6d67ac4b app: various performance improvements to fuzzy-select/bucket-fill
thru gimp_pickable_contiguous_region_by_seed()
2016-09-15 14:57:04 +00:00
Michael Natterer 3ee5df9ee8 Bug 771484 - text loading impossible, in version commit 4b4e1c8
gimp_restore(): the call to gimp_fonts_load() got lost in
commit 64a2c395d1.

Also adjust init progress percentages again.
2016-09-15 14:48:51 +02:00
Michael Natterer 0ce364ee4d configure.ac, app: require liblcms2 >= 2.7
and add an lcms2 runtime version check to app/sanity.c

Fixes:
Bug 736701 - LCMS2 rounding errors cause problems with certain GIMP blend modes
2016-09-15 12:52:20 +02:00
Michael Natterer 572d556643 Bug 553855 - Bucket fill colour is always blended with filled pixel colour...
...when threshold > 0

Add an "Antialias" toggle to the bucket fill options and set it on the
GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
gimp_pickable_contiguous_region_by_seed() instead of always defaulting
to TRUE.

The position of the toggle and its huge tooltip may need some
adjustment.
2016-09-15 12:24:37 +02:00
Michael Natterer ea6946edf0 app: small whitespace fix in gimppickable-contiguous-region.h 2016-09-15 10:22:53 +02:00
Massimo Valentini 0ecd936f57 Bug 771208: 'Y' axis name of Flow Graph Parameter...
on Paint Dynamics curve is wrong
2016-09-14 18:32:16 +02:00
Michael Natterer 20a32d970d Bug 599573 - Remember dialog defaults between Gimp sessions
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/.
2016-09-14 01:27:42 +02:00
Michael Natterer 7daa7d080a app: implement GimpConfig::serialize() in GimpFillOptions
so it doesn't inherit GimpContext's changed implementation.
2016-09-14 00:27:31 +02:00
Michael Natterer 6fe900f7a7 app: always call gimp_load_config() on a newly created Gimp instance
Simply creating and destroying a Gimp now creates and destroys more
members, and some of them always need a gimp->config object.
2016-09-13 12:55:17 +02:00
Michael Natterer f1897b655e app: free Gimp members in reverse order of creation 2016-09-13 12:44:10 +02:00
Michael Natterer 7f3090febb app: gimp_fonts_exit() don't disconnect from a NULL gimp->config 2016-09-13 12:24:15 +02:00
Michael Natterer 314027f0c9 app: create members of the Gimp instance earlier
Move fonts, data factories, document list, paint methods and user
context creation to gimp_init() or gimp_constructed() so that most
members are created when gimp_new() is done. This does not load any
data earlier, it just makes sure that all containers exist when
gimp_load_config() is called. It's also cleaner and less fragile,
2016-09-13 09:47:27 +02:00
Michael Natterer 631110e061 app: merge units.[ch] into core/gimp-units.[ch]
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.
2016-09-12 23:51:29 +02:00
Michael Natterer 9188f549e8 app, pdb: remove useless include of "core/gimpunit.h" 2016-09-12 23:46:21 +02:00
Jehan 5289a25b7c icons, app: "folder-new" icon used for new layer group. 2016-09-12 22:26:46 +02:00
Jehan 4b4e1c8e60 app: use Freedesktop standard "edit-paste" icon rather than "gtk-paste". 2016-09-12 03:59:53 +02:00
Michael Natterer 64a2c395d1 app: add gimp-data-factories.[ch] with some code from gimp.c
This should improve readability in gimp.c, and moves all data factory
handling code to a common place.
2016-09-12 02:55:49 +02:00
Jehan 0377e61cc4 app: "help-action-search" has been renamed to "dialogs-action-search"...
... since commits 36f87b5b and 2b6a10b7.
With the renaming, action-search was showing itself in its list.
2016-09-12 01:49:08 +02:00
Michael Natterer 61c260c727 app: add a trivial attach-dialog-to-arbitrary-object utility
Namely dialogs_attach_dialog(), _detach_dialog(), _get_dialog()

So we don't create the same dialogs multiple times, but raise the
already existing ones. Port some places that did this manually
to the new functions, and use it for many other dialogs.
2016-09-12 00:07:41 +02:00
Michael Natterer 6bc8b4ee74 app: don't copy alpha in gimp_operation_profile_transform_process()
GimpColorTransform abstracts that lcms problem away.
2016-09-10 01:09:11 +02:00
Michael Natterer b5cc2a977f Bug 768966 - Keyboard Shortcut hint disappears from tooltips...
...after entering single window mode

In GimpToolPalette, implement GtkWidget::hierarchy_changed() and
re-set the tooltips using the new toplevel's actions.

In gimp_widget_set_accel_help(), make sure we don't connect to the
same action twice, and make sure we disconnect everything if either
the widget or the accel_group go away.
2016-09-10 00:26:23 +02:00
Michael Natterer a5868e1f13 app: some cleanup in GimpSearchPopup 2016-09-09 21:40:09 +02:00
Timm Bäder 53f34ebc0b Chain up in some size-allocate implementations
The default implementation does just the right thing for most widgets.
2016-09-09 21:31:09 +02:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Timm Bäder f4f7b894ed app: fix position of "inline" keyword in about-dialog.c 2016-09-07 20:23:36 +02:00
Michael Natterer 4033415a79 app, libgimpwidgets, plug-ins: kill gtk_scrolled_window_add_with_viewport()
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
2016-09-07 20:12:28 +02:00
Michael Natterer f91a19b1ef libgimpwidgets: merge some GimpColorButton API from gtk3-port 2016-09-07 02:22:57 +02:00
Michael Natterer 308efbb514 Bug 767830 - Help browser does not launch on OS X
Try harder to show help when webkit is missing or the help browser
won't start:

- offer to switch to the web browser when the help browser is
  present, but won't start for some reason
- in prefs, don't bother showing the help browser GUI when webkit
  is missing, otherwise show a warning label if the help browser
  is not installed even though webkit is there. Switch to the web
  browser in both cases (modified patch from lisanet)
- add OS X replacement for gtk_show_uri() in plug-in-web-browser
  (modified patch from lisanet)
2016-09-06 20:51:47 +02:00
Massimo Valentini b7d41c83c6 Bug 770928: Critical warning clicking history color button
(gimp-2.9:3): Gimp-Core-CRITICAL **: gimp_marshal_VOID__OBJECT_POINTER: assertion 'n_param_values == 3' failed

Conflict between signal marshal function
and signal emission.
2016-09-06 18:39:52 +02:00
Massimo Valentini 61530c74a4 app: plug a memory leak
AddressSanitizer output (paths manually shortened)

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7f543247d1d0 in realloc (/lib64/libasan.so.3+0xc71d0)
    #1 0x7f542d3ad02f in g_realloc glib/glib/gmem.c:159
    #2 0x57918d in gimp_color_history_set_property gimp/app/widgets/gimpcolorhistory.c:169
    #3 0x7f542d681ec0 in object_set_property glib/gobject/gobject.c:1423
    #4 0x7f542d681ec0 in g_object_new_internal glib/gobject/gobject.c:1817
    #5 0x7f542d6839ed in g_object_new_valist glib/gobject/gobject.c:2042
    #6 0x7f542d683c73 in g_object_new glib/gobject/gobject.c:1626
2016-09-06 18:39:45 +02:00