Commit Graph

4928 Commits

Author SHA1 Message Date
Ell c8b4c0686c app: use ICON_ONLY layout for group combo in GimpLayerModeBox
Use gimp_int_combo_box_set_layout() to set the mode-group combo box
layout to ICON_ONLY, instead of manually constructing an icon-only
cell-layout.
2017-11-30 03:10:15 -05:00
Ell f7d6805ebb */Makefile.am: add abbreviations to generated enum files
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.

Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
2017-11-30 03:10:14 -05:00
Ell 5eb6187421 app, menus: add gegl:median-blur to the menus 2017-11-17 16:46:39 -05:00
Jehan 1e5311f0e8 app: no need to show all components as icons when alpha is invisible. 2017-11-16 03:08:07 +01:00
Jehan 1e87642ef0 Bug 785061 - Add channels-select-(prev|next|top|bottom) actions. 2017-11-16 01:26:19 +01:00
Michael Natterer 8350ab4217 app: add gimp_container_tree_view_name_edited() as public default callback
and use it in GimpBufferView and GimpTemplateView.
2017-11-14 20:54:38 +01:00
Michael Natterer 7aadf34a23 Bug 790328 - Buffer dialog should support renaming of entries
Enable name editing in GimpBufferView. Evil code duplication for now,
to be refactored...
2017-11-14 20:37:19 +01:00
Ell 8aa5e7825e app: move error console highlight flags to aux-info
Move the highlight flags of the error console from GimpGuiConfig
and sessionrc to GimpErrorConsole and its aux-info, respectively.
2017-11-13 10:19:12 -05:00
Michael Natterer cbe6cd8ebd app: notify on "mode" when a GimpColorFrame mode is chosen from the menu 2017-11-12 20:32:57 +01:00
Michael Natterer f12d0d8c29 Bug 789764 - Please add Paste In Place feature
Add "In Place" variants for all sorts of pasting:

- extend the GimpPasteType enum with IN_PLACE values
- add the needed actions and menu items
- merge the action callbacks into one, taking an enum value as parameter
- refactor the pasting code in gimp-edit.c into smaller functions

We probably have too menu items in the "Edit" menu now, needs to be
sorted out.
2017-11-12 18:41:05 +01:00
Ell 531eafe41d app: sort available display filters by name 2017-11-12 12:11:30 -05:00
Ell fe3339e215 app: in GimpSearchPopup, activate selected action after closing popup
Otherwise, if the action displays a dialog, the dialog doesn't have
focus.
2017-11-10 09:54:47 -05:00
Ell 5a726a028e app: use a propgui for display filters that return a NULL config widget
When a display filter's configure() function returns NULL, use a
propgui for the filter, instead of not showing a widget at all, to
spare filters the need to manually construct a configuration gui.
2017-11-02 16:12:33 -04:00
Ell e042393199 app: small cleanup in GimpSpinScale 2017-11-02 09:04:39 -04:00
Ell ae851c34b4 app: avoid spin scale pointer wrap when value is at upper/loewr limit
When applying a relative adjustment to a spin scale, don't wrap the
pointer around the corresponding screen edge if the spin scale's
value is already minimal/maximal.
2017-11-02 02:36:39 -04:00
Ell 2bdf5372ba app: wrap pointer around screen edges during relative spin scale adjustment
While applying a relative spin scale adjusment (i.e., when dragging
from the lower half of the spin scale), wrap the pointer around the
screen edges (of the current monitor), so that the maximal possible
adjustment amount isn't artifically limited by the screen geometry.
This is especially useful for spin scales in dockables, since
dockables are normally placed near the edge of the screen.

When the mouse is released, move the pointer back to its initial
position (at the beginning of the drag), to allow for subsequent
adjustments.

Unfortunately, moving the pointer programatically isn't supported
on all envrionments (Wayland, Xephyr, ...), and worse yet,
detecting that the pointer failed to move is tricky, so we have to
resort to an ungly hack to maintain the current behavior in this
case.  Gah :P
2017-11-01 15:59:48 -04:00
Ell 262f25b319 app: fix GimpDataEditor name entry set_editable() logic
Small fix to last commit: make the name entry editable when the
data is renamable, even if it's not otherwise writable (completely
hypothetical for now.)
2017-10-30 17:25:52 -04:00
Ell bccef43049 app, pdb: prevent custom gradient from being renamed
Make internal data objects non-renamable, even if they're writable,
through gimp_data_is_name_editable().  Currently, the only such
object is the custom gradient.

Prevent changing the name of non-renamable data by making the name
entry of GimpDataEditor non-editable whenever
gimp_viewable_is_name_editable() is FALSE, even if the data is
otherwise editable.

Prevent the vairous PDB -rename() functions from renaming non-
renamable data, by adding a GimpPDBDataAccess flags type,
specifying the desired access mode for the data -- any combination
of READ, WRITE, and RENAME -- and replacing the 'writable'
parameter of the gimp_pdb_get_foo() functions with an 'access'
parameter.  Change the various .pdb files to use READ where they'd
used FALSE, and WRITE where they'd used TRUE; use RENAME, isntead
of WRITE, in the -rename() functions.
2017-10-30 17:22:29 -04:00
Ell b7b263e97b app: update GimpContainerEntry when the selected item's name changes
Keep track of the selected viewable of a GimpContainerEntry, and
update the entry text when the viewable's name changes, if the text
hasn't changed since the viewable was selected.
2017-10-30 17:22:29 -04:00
Ell 601f1bde98 app: small cleanup in gimpwidgets-utils.c
Fix comment typos, and move the gimp_widget_blink() code to the
same location as its prototype.
2017-10-29 10:19:07 -04:00
Ell 7655dd727b app: make error-console highlighting criterion configurable
Currently, the error console is highlighted (shown/blinked) only
upon errors; however, warnings, which are not shown on the
statusbar while the error console is open, often also contain
important information.

Allow the user to configure which message types (errors, warnings,
and regular messages) highlight the error console, using a new
"highlight" submenu in the error-console menu.  Add corresponding
config options, saved in sessionrc.  By default, highlight the
error console unpon both errors and warnings.
2017-10-28 10:08:13 -04:00
Ell e029795dfb app: add gimp_widget_blink(); use instead of gimp_dockable_blink()
gimp_dockable_blink() is used to attract the user's attention to a
specific dockable.  Generalize this to arbitrary widgets, by
replacing gimp_dockable_blink[_cancel]() with
gimp_widget_blink[_cancel](), in gimpwidgets-utils.c.
2017-10-28 10:07:10 -04:00
Ell e921c89496 app: improve gimp_highlight_widget() visibility on dark themes
The GTK+ implementation of gtk_drag_higlight(), used by
gimp_highlight_widget(), paints a black box around the widget,
which is not very noticable when using a dark theme.  Copy the GTK+
code (which is simple enough) over to gimpwidgets-utils.c, and use
the widget's text color for the box instead.
2017-10-28 10:07:10 -04:00
Ell 5f7c03235c app: when changing layer-mode group, check new mode against context
When changing the layer-mode group in a GimpLayerModeComboBox, check
the new mode against the combo's context, and fall back to normal if
it's not applicable.  This is necessary for the color-erase mode,
which has both a legacy and non-legacy variants.  The former is
applicable for painting contexts, so we want to map the non-legacy
mode to it when changing groups, however, it's not applicable for
layer contexts, so, in this case, we want to map the non-legacy mode
to normal.
2017-10-23 10:11:58 -04:00
Ell d027a059ef app: respond to viewable expanded state changes in container views
Add an "expanded-changed" signal to GimpViewable, which should be
emitted by subclasses when the viewable's expanded state changes.
Emit this signal when the expanded state of group layers changes.
Respond to this signal in GimpContainerView, by calling a new
expand_item() virtual function.  Implement expand_item() in
GimpContainerTreeView, expanding or collapsing the item as
necessary.
2017-10-22 12:30:21 -04:00
Ell 90a024be54 app: improve spinscale target calculation
So pedantic... :)
2017-10-18 15:43:34 -04:00
Ell 8d90999814 app: highlight upper/lower halves of spinscales while hovering
When the mouse hovers over the upper or lower half of a spinscale,
highlight the corresponding area, to hint that the two halves
behave differently.  This seems to cause a lot of confusion, so the
different cursors are apparently not enough :P

We use a low-opacity version of the current theme's text color for
the highlight, since it should have a good contrast to both the bar
color and the background color.
2017-10-18 15:01:57 -04:00
Ell 5456ddbb40 Bug 683553 - Spinscale scrollvalues in Brushsize are much too small
Increase the step and page increments of the brush radius spinscale
in the brush editor to 1.0 and 10.0, respectively, to match those of
the corresponding spinscale in the paint tool options.
2017-10-17 08:47:27 -04:00
Ell 5d2555bdb5 app: add gimp_color_panel_dialog_response(); add "response" signal
Add gimp_color_panel_dialong_response() to GimpColorPanel, which
emits a response for the color panel's color dialog, if shown.

Add a "response" signal to GimpColorPanel, which is emitted upon
color dialog response.

In both cases, the response is a GimpColorDialogState, which should
be either GIMP_COLOR_DIALOG_OK or GIMP_COLOR_DIALOG_CANCEL, and not
an actual dialog response id.
2017-10-09 12:48:52 -04:00
Jehan b1f8f60229 app: fix building GUI language store instead of empty manual language...
... store.
2017-10-03 23:37:21 +02:00
Jehan 3061333fdb app: the manual language can now be customized through the Preferences. 2017-10-03 20:49:27 +02:00
Jehan 6608196978 app: reuse GimpLanguageComboBox to show available manual languages.
Better factorize by reusing code rather than recreating a combo box
which does basically the same thing. I only added a boolean parameter to
retrieve only the sublist of manual language.
It also takes advantage of the self-translated language names from
initialization.
2017-10-03 20:49:27 +02:00
Jehan c2330f002d Bug 787951 - improve help system.
When the manual in your current language is not installed, yet other
manuals are available, the help dialog will now propose either to read
the manual online (as was already the case) or to select a manual in
another language instead. This is even more important since we don't
have as many manuals as localizations of GIMP. Therefore if one took the
explicit step to install a manual in another language, it makes sense
that means one may know the alternative language. As an example, we have
3 Chinese localizations (zh_CN|TW|HK) but only a zh_CN manual. I could
definitely imagine someone with a zh_HK GUI to go for the zh_CN manual
as a fallback. Or other languages even, whatever!

This is a first step. Right now once one chose the alternative help
language, it is not possible to reset it yet (except by editing
"help-locales" in gimprc). The next step will be to add the settings in
Help System preferences.
2017-09-25 23:12:54 +02:00
Ell 58fdaae3ad enums: add intermediate generated enum files to .gitignore 2017-08-24 15:35:27 -04:00
Michael Natterer e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
Michael Natterer 7ce77c47cc app: stop hardcoding NORMAL_LEGACY for new layers/images
Use GimpCoreConfig::default-new-layer-mode instead.
2017-08-20 15:02:46 +02:00
Michael Natterer 0cfe550639 app, pdb: change a lot of GIMP_LAYER_MODE_NORMAL_LEGACY to just NORMAL
this commit changes just those which make no difference to
functionality: property and object member defaults that get overridden
anyway, return values of g_return_val_if_fail(), some other stuff.
2017-08-19 20:33:47 +02:00
Michael Natterer c41e8eca86 Bug 785535 - Histogram not updating in real when filters are active
Add "gboolean with_filters" to gimp_drawable_calculate_histogram(),
which is passed as FALSE in almost all places, except the histogram
dockable where we want to see both the drawable's unmodified histogram
*and* the histogram after filters are applied.
2017-08-05 17:15:31 +02:00
Ell eef09abf3a app, menus: add gegl:spiral to the menus 2017-07-28 17:48:03 -04:00
Michael Natterer bb93e3401f Bug 785427 - GIMP crashes after applying any GEGL filter
Need to access GimpSettings' "time" property using gint64 variables
now.
2017-07-27 22:20:09 +02:00
Jehan 3fa2127854 app: fixes for previously contributed commit.
- trailing whitespaces cleaned out;
- vectors are called "path" in all visible strings;
- do not check for floating selection and active channel: oppositely to
  layers, a vector can be selected in the same time as a channel, and
  while there is a floating selection.
2017-07-18 13:35:02 +02:00
Lionel N 2de6beaea8 Bug 585607 - Vectors select (next, previous, top & bottom)
Now possible to have keybindings for previous/next/top/bottom vector
2017-07-18 13:27:29 +02:00
Michael Natterer 04a53dbce3 app: consistently name the filter tool presets "Presets" in the GUI 2017-07-18 00:30:55 +02:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
Michael Natterer bc1997eeeb app: fix shutdown of GimpHistogramView
Not only unref the histograms, also disconnect from their signals.
2017-07-05 12:21:23 +02:00
Michael Natterer e21be2f3d9 app: rename GimpToolInfo's "blurb" and "help" members
to "label" and "tooltip". More standard names, less confusion.
2017-07-04 21:58:11 +02:00
Michael Natterer e8ee5475b7 app: move all propgui files from app/widgets/ to new folder app/propgui/
We are getting more and app/widgets/ is already too large.
2017-07-03 12:29:41 +02:00
Ell e701700a88 app: only use area dim., not off., for ui range of pixel-distance op props
Don't offset the ui range of op properties that use pixel-distance
units to the top-left corner of the region, since they're relative;
only do that for pixel-coordinate units.  Let their ui range be
[0, width/height].
2017-07-02 20:00:19 -04:00
Ell 9de19a1f9a app: orient the spiral op line controller so that 0-degree rotation points right
This way, it runs to the middle of the spiral arm, and stays centered
even when balance != 0.
2017-07-02 19:14:38 -04:00
Michael Natterer f4f2de1b5c app: start an infrastructure for on-canvas controllers for operations
Pass a "GimpCreateControllerFunc" to all gimppropgui-*.[ch]
constructors which takes a callback (to update the config object when
the on-canvas GUI) and a controller type that determines the
callback's signature, and returns another callback (to update the
on-canvas GUI when the config object changes).

In GimpOperationTool, pass such a GimpCreateControllerFunc that
handles creating and adding on-canvas controller via the new
gimpfiltertool-widgets.[ch]. So far, a simple line like in the
blend tool is supported.

Add a custom GUI for gegl:spiral, and have its origin, radius and
angle controlled by such a line.
2017-07-03 00:45:59 +02:00