Commit Graph

146 Commits

Author SHA1 Message Date
Jehan 385b697a60 app: "gtk-can-change-accels" feature is ignored since GTK+ 3.10.
We had this feature "can-change-accels" where people could change their shortcut
directly by browsing the menu. It was on the property "gtk-can-change-accels" in
GtkSettings. Unfortunately this got deprecated in GTK+ 3.10 (more accurately in
dev version 3.9.8, according to GTK's NEWS file), and is therefore ignored since
then. In other words, whether we check the box or not in our Preferences, it
doesn't do a difference.

If we want to get the feature back some day, we'll have to reimplement it with
custom code. In the meantime, there is no need to leave this visible in
Preferences.
2023-04-12 22:07:07 +02:00
Jehan d3458a82d0 Issue #7023: icon size selection on GIMP 2.99.
This kinda reverts commit 6aebd30de1 ("app: remove
icon sizing preferences"), except that the code base is different enough since
this old commit was mainly for GIMP 2.10.x.
In any case, after initially thinking that GTK+3 handling for high density
display would be enough, we finally decide that adding back a Preferences-wide
setting for overriding the theme-set icon size is a good idea (additionally to
GTK+3 automatic support).

The base idea for removing the feature was that GTK+3 has high density display
support, through the "scale factor". Typically a high density display will
normally be set as using a ×2 scale factor so all icons will be double size.
Unfortunately it turns out it's not enough.

For instance, on very small screen estate, even with a scale factor of 1, if the
theme sets 24px toolbox icons, it may still take too much space.
Oppositely on huge screens, even with ×2 factor scale detected by the OS, the
icons may still feel too small (this is possibly what happens with #7023).

Furthermore there is also a matter of taste. Some people like small icons even
when they have the space. Others may want bigger icons, easy to click on.

Finally you can like a theme for its color scheme for instance, but it may not
have the icon size you want. Right now, we'd need to duplicate every theme in
small or bigger size. Instead of doing so, let's just have this global setting
overriding the theme rules.

Comparison with the 2.10 implementation:

- We still provide 4 sizes: small, medium, large and huge.
- We don't have the "Guess ideal size" setting anymore. Instead this is now a
  mix of the GTK+3 scale factor logic and the theme-set or custom size. I.e.
  that on a high density display with ×2 scale factor, we could have toolbox
  icons up to 96 pixels (48×2)!
- We now try to have less custom code in widgets as we append the CSS rules to
  the theme (similar to what we were already doing for dark theme or icon
  variants). What happens in widget code is mostly to connect to changes in
  themes and redraw the widgets which need to be.
- The custom size will now affect: toolbox icons, the FG/BG editor widget (in
  both the toolbox and the color dockable), dockable tab icons, the main
  dockable buttons, eye and lock header icons in item tree views, eye and lock
  cell icons in the item lists.

There are still a bunch of areas where it is not taken into account, such as
plug-ins, and various dialogs, but even in custom-made interface in dockables.
Ultimately it might be interesting to have a way to sync more buttons and
widgets to a global size settings.

Lastly, I fixed a bunch of existing bugs where we were updating icon sizes with
gtk_image_set_from_icon_name() using the const icon name taken from
gtk_image_get_icon_name(). As this was reusing the same string pointer, we were
ending with freeing the icon name.
2022-09-28 21:11:58 +02:00
Thomas Manni e1cdb9f54e app, icons: add Paint Select tool in the playground
A -quick done- first step towards the addition of a smart selection tool.
Require the gegl:paint-select workshop operation.
Still LOT of work to do (wip):
- fluctuations removal (GEGL side)
- multilevels pyramid approach + banded graphcut for instant result on large
   image (GEGL ? GIMP ?)
- Gaussian Mixtures for color models (GEGL side)
- drawable offsets (GIMP side)
- undo / redo (GIMP side)
- scribbles edition mode (GIMP side)
- dedicated icons
- ...
2020-11-24 12:10:40 +01:00
luz paz bb322d94d7 Fix typos
Found via:
```
codespell -q 3 -S ./ChangeLog*,*.po,./.git,./NEWS* -L als,ang,ba,chello,daa,doubleclick,foto,hist,iff,inport,klass,mut,nd,ower,paeth,params,pard,pevent,sinc,thru,tim,uint
```
2020-11-19 21:56:25 +01:00
Jehan b96bed5909 app: show unavailable actions in Action Search after available ones.
Some people had been complaining that they couldn't find some actions in
some case, which was only because they were in states where the actions
were non-sensitive. So it was "normal" (i.e. not a bug), yet I can see
how it can be disturbing especially when we don't realize that an action
is meant to be inactive in some given case.
Of course the option to show all actions already existed in the
Preferences. But as most options in Preferences, this is hardly
discoverable and many people only use default settings. Moreover showing
hidden action made the action search cluttered with non-sensitive
actions in the middle of sensitive ones.

This change gets rid of the "Show unavailable actions" settings and
always show all matching actions. In order not to clutter the list with
useless results, I simply updated the display logics to always show
non-sensitive action after sensitive ones. Note that even non-sensitive
actions will still be ordered in a better-match-on-top logics, yet they
will be after sensitive actions. So the top results will be the best
matches among sensitive actions (action in history), followed by various
levels of matches (actions with matching labels, tooltips, different
order matches, etc.); then they will be followed by best matches among
non-sensitive actions, followed by the same levels of matches as
sensitive ones.

This way, we still keep a very relevant result and there is no need to
have a settings for this.
2020-10-26 16:40:43 +01:00
Ell 3cda972100 app: add a "Use tool groups" option to the toolbox preferences
Add a new Gimp::tool_item_ui_list, which is a GimpTreeProxy over
Gimp::tool_item_list.  This allows us to use either a hierarchical
or a flat tool list in the UI, by setting the "flat" property of
the new list.

Use Gimp::tool_item_ui_list in GimpToolPalette, so that the toolbox
layout is affected by this choice.

Add a "Use tool groups" toggle to the toolbox preferences, and bind
it to the "flat" property of Gimp::tool_item_ui_list.
2020-02-01 13:19:08 +02:00
woob 39c71c6fb3 app: Add initial support for configurable editing of non-visible layers (Issue #2713)
Add a "edit-non-visible" configuration option, found under
Edit->Preferences->Tool Options as "Allow editing on non-visible layers"
2019-06-23 16:15:59 +03:00
Sergio Jiménez Herena 1ca2d74411 app: Add option in the windows menu to hide the image tab bar.
(cherry picked from commit 360aee10d8)
2018-10-23 11:52:07 +02:00
Jehan 8cfe2df866 app: allow GUI config property for icon style preference.
A single icon theme can contain both regular and symbolic icons. Let's
give possibility to switch from one style to the other within GIMP
Preferences.

This won't work very well in all cases yet, especially if an icon theme
only has symbolic icons (and no regular ones) because of inconsistencies
in glib which are being fixed (patches which I submitted and which were
merged in glib on 2018-08-17).
So this will work as expected when we will bump our glib requirement to
whatever is the next release.
2018-08-17 23:24:21 +02:00
Michael Natterer bab75b7365 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.
2018-07-14 14:19:27 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer b36205176e app, libgimp*: remove the config option to disable tooltips
Also remove all traces of it from the plug-in protocol and raise the
protocol version to 0x0100 (we now allow features and therefore
version bumps in stable, and the master protocol version should always
be higher). Fix the code that aborts plug-in startup on protocol
version mismatch, we can't use gimp_message() because we have no
protocol.
2018-06-06 19:23:30 +02:00
Jehan 6aebd30de1 app: remove icon sizing preferences.
With GTK+3, high or low density is taken care by the screen scale
factor. Having a separate preferences for this is redundant, and likely
even wrong.
It may be interesting though to have a new preference later, which would
allow smaller scale icon sizing since some people like their icon
slightly smaller or bigger, and also when you are using screens whose
density is at a limit scale factor. Right now, this can be done through
themes, but a GUI settings may be interesting. If I add such feature,
let's just do it from scratch later.
2018-05-31 04:12:05 +02:00
Michael Natterer f3f61379f7 app: remove the option to enable tearoff menus 2018-05-20 21:06:35 +02:00
Jehan 23649d65be app: allow to select if we prefer a dark variant of the current theme.
GTK+ has the concept of theme variants, and in particular if we prefer
the dark variant of a theme. This can be chosen globally but also
per-application. Make this choice customizable in the Theme tab of
Preferences.
By default, the dark variant will be prefered.
2018-05-20 21:06:30 +02:00
Michael Natterer fe932fe7ad Bug 794826 - Do not default to last used filter settings
Add GimpGuiConfig::filter-tool-use-last-settings wchich defaults to FALSE.

Honor the new option in gimp_gegl_procedure_execute_async() and add
it to prefs -> dialog defaults.
2018-04-01 14:41:20 +02:00
Michael Natterer a8b8463f16 app: minor formatting cleanup in gimpguiconfig.c 2018-01-18 01:52:30 +01:00
Michael Natterer 093295470f Bug 792606 - Resetting to defaults in Preferences disables SWM
The default value of "single-window-mode" must be TRUE.
2018-01-17 15:18:30 +01:00
Jehan 89445edee1 Bug 783614 - On a 4k Screen, the text/graphics are too small to...
... be used effectively.
We have had display pixel density detection for quite some time, but I
guess the step I set to switch to the "Huge" icon size (48px for the
toolbox icons) was too high at 300 PPI. Someone with a screen of about
280PPI reported the icons to be far too small on GIMP 2.9.8.
It seems that 240PPI is already even considered as XDPI already. Let's
just set our new "Huge" step at the 250PPI intermediate.

In any case, it seems GIMP 2.10 will have problems with even denser
displays, but the way GTK+2 handles icon sizes with a GTK_ICON_SIZE_*
enum is quite limited. That is quite a problem considering screens
getting denser in pixels nowadays. Hopefully GTK+ 3 will improve the
situation.
2018-01-12 21:03:55 +01:00
Michael Natterer 6dc2d9d91d Bug 791948 - Please enable "save tool option on exit" by the default
Enable "save-tool-options" and "save-device-status" by default,
it's the expected behavior these days.
2018-01-01 14:46:32 +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
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
Michael Natterer 4b597f9622 app: take the handle transform tool out of the playground
It seems proper enough now.
2017-06-19 22:56:07 +02:00
Jehan 628be2af92 app: fix typo s/Devics/Devices/. 2017-05-04 05:34:12 +02:00
Michael Natterer 4455cd984d Bug 779620 - "Advanced Color Options" in filter dialogs is confusing
Hide "Advanced Color Options" by default, and add a toggle to show
them to prefs -> color management.
2017-05-01 02:09:27 +02:00
Jehan f6cb74c0b5 app: core/gimpmarshal.h is generated after building in app/config/.
It is a little fuzzy whether expected or not, architecturally-wise. On
one hand, I can see some core/ header includes under config/. Though on
the other hand, app/Makefile.am explicitly sorts config/ below core/.
Anyway let's just use g_cclosure_marshal_VOID__VOID which is the same as
gimp_marshal_VOID__VOID and get rid of the include.
This fixes builds from scratch.
2017-03-21 18:56:31 +01:00
Jehan d339aef75c app: add icon size auto-guess from monitor resolution.
Current code only guess resolution for a single monitor. Ideally
the widget sizes could be different depending on the window where a
given widget is on. But that's a start.
2017-03-21 17:52:22 +01:00
Jehan cfae83623c Bug 745835 - Small icons as Option, not theme
Allow overriding icon sizes set in themes from the preferences.
This initial commit updates only toolbox icons. More to come.
4 options are available: small, medium, large and huge (the later would
likely be useful for HiDPI screens).
Uses a new widget GimpIconSizeScale.
2017-03-11 02:51:59 +01:00
Michael Natterer 439a3ff7bd Bug 667862 - Allow mouse to optionally configure tablet devices
Add new setting GimpGuiConfig:devices-share-tool. When TRUE, we never
copy any properties between the user context and the GimpDeviceInfo's
context, so no tool or anything changes.

We do however still keep track of the active device so the setting can
be enabled/disabled at any time. Also hide GimpDeviceStatus' tool,
brush etc. indicators in "shared" mode.
2016-10-04 22:32:08 +02:00
Michael Natterer 3bd783283e app: change the prefs property from image-map-tool-max-recent to filter-tool
but still parse the old property too.
2016-05-11 01:03:40 +02:00
Michael Natterer 3a837ed17c app: cruft removal and cleanup in the config classes 2016-04-17 00:32:07 +01:00
Michael Natterer 65d3ce7cb8 app: port everything to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:11:06 +01:00
Michael Natterer 406e1819d0 app: move symmetry painting out of the playground
Also fixes bug #761617 because we don't unconditionally dereference
image_editor->context in gimp_symmetry_editor_set_image() any longer.
2016-02-06 23:33:04 +01:00
Jehan 76f573c981 Bug 648776 - mirror symmetries.
You can now set any paint tool to mirror painting relatively
horizontal/vertical axis or a central point (any combination of these 3
symmetries).
This has been implemented as a new multi-stroke core, where every stroke
is actually handled as a multi-stroke (default of size 1).
This is also the first usage of custom guides for symmetry guiding.
Current version has to be activated in the playground.
2016-02-02 21:15:13 +01:00
Jehan fa9e5b8f98 app: do not hardcode default theme and icon theme all over the code.
Create GIMP_CONFIG_DEFAULT_(ICON_)?THEME in gimpguiconfig.h to set
defaults in a single place, except for libgimpwidgets/ which cannot
include from app/.
2016-01-11 03:15:36 +01:00
Michael Natterer d01ba07ed6 configure.ac, app: make libmypaint a hard dependency
and move the MyPaint brush tool out of the playground.
2015-12-21 21:39:48 +01:00
Benoit Touchette 6762bf5b9b Bug 759105 - Patch to add icon theme selection
Add support for custom icon themes much like custom theme
support. There is still work to be done but this is the
basic functionality.
2015-12-09 12:50:15 +01:00
Michael Natterer 6487d0a26a app: move the seamless clone tool to the playground
It's not release material unless somebody comes and fixes its bugs,
and its speed.
2015-06-14 13:02:31 +02:00
Jehan 5460c414db app: move the MyPaint brush into the playground. 2015-03-30 22:38:35 +02:00
Michael Natterer 4dcd48fff2 app: move the handle transform tool to the playground 2015-03-08 17:21:11 +01:00
Michael Natterer b27c5b0985 app: move the N-Point Deformation tool to the playground
It has to be enabled via Prefs -> Playground. The menu entry is always
disabled until it leaves the playground, for reasons worth fixing.
2015-03-03 20:26:58 +01:00
Michael Natterer f1573c42d2 app: default to GIMP_HELP_BROWSER_WEB_BROWSER if there is no webkit 2014-05-25 15:23:58 +02:00
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
Jehan 5903e53d51 Bug 708174 - Improve the original search dialog patch.
Fix various bugs, improve code design and efficiency, change feature
name, update the feature up to our standards (now uses GIMP preferences,
session management, less overwhelming settings...).
Also now action history is tightly tied to GimpAction and logs all
action activation (however it activates, and the show_unavailable
parameter also applies to history).
Search algorithm greatly improved with basic tokenization, better
ordering, filtering, etc.
2014-02-18 19:13:03 +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 c15f9799c1 app: tabs position saved in sessionrc and only 1 HELP-ID is enough.
The settings was saved both in sessionrc and gimprc!
2013-10-12 04:30:30 +13:00
Jehan b2e40c4ca7 Bug 667169 - Single window mode: allow tabs position setting. 2013-10-11 23:16:29 +13:00
Michael Natterer c6ba0ffbdf app/cursors/libgimpwidgets: bye bye stone age B&W bitmap cursors 2012-08-26 22:53:04 +02:00
Michael Natterer bcb45524b7 Bug 657505 - Strange behaviour with SWM
when window positions aren't automatically saved.

Save "hide-docks" and "single-window-mode" in sessionrc instead of
gimprc, so a session layout is always saved either completely or not
at all. Also change "last-tip-shown" saving a bit so all three
session-saved gimprc properties are implemented the same.
2011-11-05 17:52:45 +01:00
Martin Nordholts db008cbb88 app: Single-window mode does not require a restart 2011-08-31 18:49:38 +02:00