Commit Graph

5519 Commits

Author SHA1 Message Date
Jehan aa1171ada2 Issue #2194: Action search dialog behaves as a full window using a...
... tiling window manager.
Completing commit e6364ffa81 by additionally making sure the search
dialog is non-modal. Otherwise it prevents positionning it wherever we
want and it stays in the center, potentially hiding the canvas and
darkening the main window.
2019-06-11 02:21:54 +02:00
Michael Natterer 9cbc6d0304 app: disable overlay scrolling for preferences pages
the overlay was messing with the usability of the page's widgets.
2019-06-07 12:36:59 +02:00
Ell 42d4255262 app: avoid duplicate offset actions
Blacklist the "tools-offset" action in the GUI, and only keep
"filters-offset", to avoid duplication.  Update gimp:offset's
description, so that "filters-offset" gets a proper tool-tip.
2019-06-06 04:52:25 -04:00
Ell 30429e30e2 app: various fixes/cleanups to last commits 2019-06-06 03:08:38 -04:00
Ell 3a4a00c71e Issue #40 - Layer offset tool
Add a new Offset filter tool, as a front-end to gimp:offset.  The
tool replaces, and provides the same interface as, the drawable-
offset dialog, while also providing live preview and on-canvas
interaction.

Note that we don't simply use a custom propgui constructor for
gimp:offset, since we need a little more control.
2019-06-05 19:06:56 -04:00
Michael Natterer e6364ffa81 Issue #2194 - Action search dialog behaves as a full window...
...using a tiling window manager

Set GimpSearchPopup's type hint to GDK_WINDOW_TYPE_HINT_DIALOG.
2019-06-01 17:37:49 +02:00
Michael Natterer 792264ba6a app: add gimp_suggest_trc_for_component_type()
and use it in GimpTemplateEditor and convert-precision-dialog, instead
of duplicating the logic.
2019-05-31 17:28:20 +02:00
Michael Natterer 710cfc1f47 app: fix undoing image parasite attach/detach to emit the right signals
Add "gboolean push_undo" parameters to gimp_image_parasite_attach()
and _detach() and use the API also from undo, instead of implementing
attaching/removing manually and forgetting about the signals.

Fixes updating of the image properties color profile page.
2019-05-30 16:51:29 +02:00
Michael Natterer 8251406b40 app: add the dialog buttons after creating the GimpColorDialog instance
so the "use-header-bar" property is set when the buttons are added,
fixes the order of the "OK" and "Reset" buttons.
2019-05-30 11:48:10 +02:00
Michael Natterer 476cf19747 Issue #2986 - Input controller configuration window is too small by default
Set a minimum size on the event list's scrolled window.
2019-05-29 23:35:13 +02:00
Michael Natterer 901350ba20 app: use g_clear_pointer() in more places 2019-05-27 17:47:55 +02:00
Jehan 9fa49af470 app: display the screenshot in the extension details GUI.
Further improvements should load screenshots in a thread, especially
since we are loading from a URL taken from metadata, so it makes the GUI
non-responsive for a bit too long. But this is a first working version
for now.
2019-05-27 17:31:18 +02:00
Jehan f67ac0f0ca app: improve extension list widget.
Use GtkGrid instead of GtkBox (docs says GtkBox will eventually go
away). Also remove this horrible frame in a frame (though GUI is still
not perfect yet). Finally fix the "extension" object data.
2019-05-27 17:31:18 +02:00
Michael Natterer 765abcd316 Issue #3398 - colour map picker isn't positioned on the correct...
...-last positioned- monitor

Use gimp_dialog_factory_position_dialog() in GimpColormapEditor and
GimpPaletteEditor so the color dialogs appear where they were before.
2019-05-27 14:53:55 +02:00
Michael Natterer 97b1200b38 app: forgot to remove comment in color_area_color_clicked() 2019-05-27 14:53:14 +02:00
Michael Natterer ebb6b08e62 app: add gimp_dialog_factory_position_dialog()
which is the logic that used to be in color_area_color_clicked()
factored out to proper API. It makes sure that a dialog that was
visible before (and was only hidden not destroyed) appears at the same
point on the same monitor as before. See issue #1093.
2019-05-27 14:15:09 +02:00
Ell 088827e563 app: in GimpDashboard, improve legend logic 2019-05-11 05:14:23 -04:00
luz.paz 1c91b8d97e Add a few more misc. source comment typos 2019-05-09 09:13:37 -04:00
Ell cf54f790fd app: add tile-alloc-total variable to the dashboard
Add a tile-alloc-total varaible to the dashboard's memory and misc
groups, showing the total amount of memory used by the tile
allocator (see commit
gegl@137e66e45138e8316f6403e53e8aa9a02ad523e7.)
2019-05-08 04:22:39 -04:00
Ell 8434ae42a3 app: in GimpDashboard, don't show legend for groups with no meter
in GimpDashboard, don't show field legend colors in groups without
a meter.
2019-05-08 04:22:38 -04:00
Ell c7a29e5f98 Issue #3353 - Gimp 2.10.10 freezes while changing Background color ...
... in LCh colorspace

In gimptoolbox-color-area, when setting the context's background
color in response to a color-dialog change, block the right signal
handler, to avoid re-setting the color dialog's color, which would
cause the GtkAdjustment's "value-changed" signal (assuming it was
the source of the change) to be restarted if the new value doesn't
match the current one exactly, which can happen due to conversion
errors.
2019-05-08 03:45:11 -04:00
Jehan a761ed3ae8 app: round curve point position when displaying it as int.
Int casting results to truncation. First this is a bit counter-intuitive
as we usually expect rounding to the nearest integer. Moreover with the
new GUI updates on curve and curve tool, we end up with a mismatch as
the new Input/Output spin buttons where indeed showing rounded integers
whereas the coordinate indicator was showing truncated integers.

Make all these show same rounded value.

(cherry picked from commit 7b1af1f0cb)
2019-05-08 14:11:31 +09:00
Michael Natterer 75acae40e3 app: make sure the labels of our GtkImageMenuItem replacements get updated
In GimpAction, connect to the action's "notify::label" and update the
label inside the image-plus-label hbox we use to replace the
deprecated GtkImageMenuItem.
2019-05-05 16:17:50 +02:00
Jehan 14d9606c04 app: allow undoing extension removal in the GUI. 2019-05-01 23:13:17 +09:00
Jehan f760a333a1 app: have the extension GUI listen to manager install/remove events.
The GUI is uglier than ever. I added a frame in a frame to put an
uninstall button. Please don't mind it, this is temporary. I just needed
to test uninstallation and don't know yet what are the proper widgets
to use for a nice design. :P
2019-04-29 20:56:28 +09:00
Ell bb8648a2e9 Issue #3284 - Wrong layer renamed when switching images
In gimp_container_tree_view_clear_items(), temporarily unset the
tree-view's model before clearing it, so that name editing is
stopped beforehand.  Otherwise, name editing is stopped once the
corresponding item is removed from the store, causing us to rename
the wrong item.
2019-04-21 10:34:40 -04:00
Ell b01113741e Issue #3275 - Crash when opening an image after closing existing image
In gimp_open_dialog_set_image(), use a weak pointer for storing the
current image, to avoid a segfault in file_open_dialog_response()
if the active image at the time of the open action has been closed
before confirming the dialog.
2019-04-20 14:53:19 -04:00
Ell 33e47c85a2 app: add smooth/corner curve-point types
Allow setting the type of GimpCurve control-points to either SMOOTH
or CORNER.  Smooth points produce a smooth curve, while corner
points produce a sharp curve (previously, all points were smooth).

In GimpCureView, display corner points using a diamond shape,
instead of a circle.

In the Curves tool, allow changing the curve's point types.
2019-04-19 10:34:32 -04:00
Ell 91ecca7e10 app: add "selection-changed" signal to GimpCruveView
... which gets emitted when the selected point changes.
2019-04-19 10:34:31 -04:00
Ell b6d829a1b2 app: streamline GimpCurve
In GimpCurve, replace the use of a fixed-length control-point array
with a dynamically-sized array.  Adapt GimpCurve's interface, and
the rest of the code.

In addition to simplifying the code, this fixes a bug where the
curve object could be broken by moving the mouse too fast (yep...),
and allows more accurate point placement, both in the GUI editor,
and through canvas interaction in the Curves tool (see issue #814).
2019-04-19 10:34:29 -04:00
Jehan 91c69b782c app: null the pointer after destruction.
Make sure we don't end up with a broken pointer in case it was not
immediately re-set.
2019-04-19 09:28:22 +02:00
Ell 8357c9ad64 app: in GimpCurveView, snap to curve when holding Ctrl
In GimpCurveView, when holding down Ctrl while adding/dragging a
point, snap the y-coordinate to the original curve (at the start of
the drag).  This is particularly useful for adding points along the
curve, without changing their y-coordinate.

Likewise, have the coordinate indicator show the snapped
coordinate.
2019-04-17 18:00:18 -04:00
Ell 0b9737a3ed app: in GimpCurveView, use relative motion when dragging point
In GimpCurveView, when dragging an existing curve point, don't
immediately move the point to the cursor position uppon button
press, but rather move it relative to its current position as the
cursor moves.  This allows selecting a point without moving it, and
adjusting its position more easily.

Additionally, when the cursor hovers above a point, or when
dargging a point, have the coordinate indicator show the point's
position, rather than the cursor's.
2019-04-17 18:00:17 -04:00
Ell 033082dd9a Issue #3025 - "File/New" doesn't honor "precision" choice ...
... for "Edit/Preferences/Default Image"

In GimpTemplateEditor, don't use gimp_prop_enum_combo_box_new() for
the "Precision" combo-box, and rather synchronize the combo-box and
the template manually, since we only want to update the "Gamma"
combo-box according to the precision when it changes through the
UI, and not when the template's precision otherwise changes.

This fixes an issue where we'd always set the default gamma value
when resetting the editor's template, overwriting the template's
original gamma value.
2019-03-31 15:08:05 -04:00
Ell 846d242f30 app: revert combo-box drop-down changes
Revert the use of gtk_combo_box_set_wrap_width() to change the
combo-box drop-down style, except for the status-bar unit combo.
See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for
the rationale.

This reverts commits 1d984542e9,
68a33ab5bd, and
6dfca83c2a.
2019-03-27 20:14:10 -04:00
Jehan 7cf06c3f60 app: color widget updated properly when editing colors.
Also note that GimpColorPanel doesn't need to react differently whether
GimpColorDialog returned OK or CANCEL, as the dialog keep track and
return the appropriate color to set in the end of the process.
2019-03-20 11:21:46 +01:00
Jehan 425eb83f8a app: GimpColorDialog follows the user context active image.
(when working in context-aware mode)
2019-03-19 13:37:18 +01:00
Jehan 3dc820c017 app: make active_image member a weak pointer in GimpColorDialog.
This fixes signal handler disconnections wrongly run on images which
have already been freed.
2019-03-18 23:36:31 +01:00
Jehan 0ae3f38f52 Issue #3122: gimp_color_dialog_constructed: 'colormap' action group...
... not found.
So it turns out I cannot just gtk_action_group_get_action("colormap") as
the related action group is not registered unless the Colormap dockable
is opened. Anyway I mostly needed to get icons and tooltips from these
actions. Let's just copy the strings and be done with it.
This still feel a bit like duplicate code but it's not too bad, so…
2019-03-18 17:57:08 +01:00
Jehan edb90672fb app: again properly disconnect signal handlers. 2019-03-18 14:37:32 +01:00
Jehan 4a3da7d05e app: properly disconnect signal handlers. 2019-03-18 14:02:30 +01:00
Jehan c2ab385207 app: some cleanup in GimpColormapEditor.
I should have cleaned better earlier. :-/
Also add back some horizontal alignment in the colormap entry edit
widgets. This got lost during moving apparently!
2019-03-18 13:00:42 +01:00
Jehan 6e84c47469 app: use a GtkStack instead of GtkNotebook in GimpColorDialog.
This was the original plan since it is closer conceptually to the widget
idea, but I started working on gimp-2-10 where GtkStack was not
available (as it appears in GTK+3).
2019-03-18 12:28:02 +01:00
Jehan 576e804ebf app: make the active_image into a weak pointer.
We should make sure the object exists before using it.
2019-03-18 12:15:18 +01:00
Jehan 6abb55c759 app: GimpColorDialog should actually follow the user context...
... and not the GimpContext passed in.
What we are indeed interested in is the currently active image which is
recorded in the user context.
2019-03-18 12:11:58 +01:00
Jehan 8ab04a2a3a app: use the new GimpColormapSelection in GimpColormapEditor.
Code from GimpColormapSelection is mostly coming from GimpColormapEditor
anyway, except that it is used elsewhere as well.
2019-03-18 12:10:44 +01:00
Jehan 94043529c8 Issue #2938: Painting on indexed images counter-intuitive.
When loading indexed images, the image type is not obvious at all
(basically only reference is in the title bar). The main issue is that
if you don't realize it when editing, GIMP appear broken when the
expected colors don't appear on canvas.
Commit e48c239459 was a first step by showing various color widgets with
out-of-gamut warnings contextually. This additional commits will also
allows color selection for painting tools (i.e. foreground and
background colors) to be done within the image palette by default. This
way, the fact that this image impose working with limited color palette
is obvious as soon as you try to edit colors.
2019-03-18 12:06:11 +01:00
sabri ünal d5ea4c5653 Typo - Preceptual changed to Perceptual 2019-03-14 16:47:39 +00:00
Ell 506f412a05 app: avoid pushing undo while updating colormap entries
In GimpColormapEditor, while updating a colormap entry, only push
an undo step when confirming the new color.
2019-03-13 10:57:09 -04:00
Ell 8954d1f386 libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:28:52 -05:00