Commit Graph

1467 Commits

Author SHA1 Message Date
Michael Natterer f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
Jehan 30e4826473 app, libgimpwidgets: update gimp_prop_foo_new() documentation comments.
Explains what happens when NULL labels are used.
2016-02-11 16:35:45 +01:00
Michael Natterer 9c4dd960a0 app, libgimpwidgets: allow NULL labels in some gimp_prop_foo_new() functions
and fall back to the GParamSpec's nick.
2016-02-09 23:35:06 +01:00
Jehan 96b5e5345e libgimpwidgets: add new symbols in def file. 2016-02-02 21:54:30 +01:00
Jehan 1f4839288e Bug 648776 - fixes symmetry painting after Massimo and Mitch's reviews.
Use a GType for the PROP_SYMMETRY property of GimpImage, and create
a default "identity" symmetry for an image.
I still use a GimpIntComboBox but store the property value in the
user-data column because gpointer isn't a subset of gint.
Adds in libgimpwidgets:
- gimp_int_combo_box_set_active_by_user_data()
- gimp_int_combo_box_get_active_user_data()
- gimp_int_store_lookup_by_user_data()
- gimp_prop_pointer_combo_box_new() to create a GimpIntComboBox and
  attach it to a gpointer property.
Thanks Massimo and Mitch for reviewing my code.
2016-02-02 21:15:13 +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
Michael Natterer a940300525 libgimpwidgets: make GimpDialog's help_id settable after construction 2016-01-17 17:35:33 +01:00
Benoit Touchette fdb582b95c icons: fix compile errors
Fixed "gimpicons.c:30:45: fatal error: icons/Default/gimp-icon-pixbufs.c:
No such file or directory" after commits :
ee512b610d
fa9e5b8f98
Fixed "ln: failed to create symbolic link ‘12/gimp-default-colors.png’:
File exists" by forcing new symlinking on creating get-default-colors.png
for Symbolic-inverted to prevent error during make.
2016-01-11 08:48:14 -05:00
Jehan ee512b610d icons: "Default" icon theme renamed to "Color".
Conveys well the duality of Color vs. Symbolic icons, terms usually
used by designers in recent design texts.
2016-01-11 03:20: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 ccd6e31673 libgimpwidgets: use g_printerr() not g_warning() for wrong icon theme paths 2016-01-04 00:30:51 +01:00
Jehan da1b4dac42 libgimpwidgets: missing link library for GetICMProfile() on Win32.
This function is available in gdi32 library.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd316948%28v=vs.85%29.aspx
2015-12-29 18:43:41 +01:00
Michael Natterer d4aa39a7cd app, libgimpwidgets, icons: rename mypaint brush icons and help ID
from "mybrush" to "mypaint brush".
2015-12-21 00:09:55 +01:00
Michael Natterer a5eff27149 app: add new GimpData subclass GimpMybrush and infrastructure around it
- GimpContext API and property
- a GimpDataFactory
- List and grid views with GimpDataFactoryView
- actions and a context menu

None of this is connected to the actual tool yet, or depends on
libmypaint in any way.
2015-12-20 23:51:44 +01:00
Michael Natterer a33daf99fe libgimpcolor: rename RGB and GRAY gimp_color_profile_new_*() functions
to be more consistent, as discussed in bug #756389.
2015-12-15 20:42:21 +01:00
Michael Natterer 71894bd787 libgimpwidgets: rename gimpstock.[ch] to gimpicons.[ch]
because stock is on its way out, so we better start renaming and
deprecating stuff sooner than later.
2015-12-12 20:44:46 +01:00
Michael Natterer 69f87bcc84 libgimpwidgets: be smarter when changing icon themes, and have fallbacks
Add gimp_stock_set_icon_theme() which can be called at any time, also
before gimp_stock_init(), in which case we avoid setting the configured
icon theme twice on startup. Call it from libgimp/gimpui.c and
from app/gui/icon-themes.c so the app and plug-ins use the same
icon theme.
2015-12-12 19:32:11 +01:00
Jehan 5beb69d009 icons: new symbolic icon theme for GIMP.
Images originally created by Jakub Steiner and Barbara Muraus as the
"Art Libre" icon set.
The contributor jEsuSdA later worked on it.
It will now be available in the new icon theme selection through
preferences.
Many icons/size are still missing but this first commit makes a start
for complementary work.
2015-12-09 23:00:14 +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 494398e3b8 Bug 756019 - Color pickers UX inconsistencies
Switch the axes of the GimpColorSelect color area so that on the X
axis, we always modify the first of the two channels of RGB or HSV
that are edited here, and on the Y axis the second.
2015-10-08 23:47:16 +02:00
Michael Natterer cda4ab7492 libgimpwidgets: argh... 2015-10-08 22:47:32 +02:00
Michael Natterer 560d481083 libgimpwidgets: some more cleanup in GimpColorSelect 2015-10-08 22:24:13 +02:00
Michael Natterer 494ec0ace5 libgimpwidgets: change GimpColorSelect's handle positions to double
so we can select more than 256 values on each color channel.
2015-10-08 21:10:33 +02:00
Michael Natterer 30a86e38b8 libgimpwidgets: slightly redo how GimpPickButton calls its new backends
to make porting to GTK+ 3.x easier, for less diff to the gtk3-port
branch.
2015-10-06 23:44:36 +02:00
Michael Natterer 1debefb20f Bug 756019 - Color pickers UX inconsistencies
Increase spacing between the HSV and RGB slider groups in
GimpColorScales. Yes there was spacing before, but hardly visible.
2015-10-06 23:39:49 +02:00
Michael Natterer a89e1d6d8c libgimpwidgets: fix signal emission in gimppickbutton-default.c
so color picking works again on != OS X ;)
2015-10-06 23:31:21 +02:00
Kristian Rietveld 153b19ac56 Only build Quartz-specific color picking code on OS X/Quartz builds 2015-10-04 18:11:16 +02:00
Kristian Rietveld e570eb0be4 Make gimp_pick_button_clicked properly private 2015-10-04 17:14:10 +02:00
Kristian Rietveld 0d88399eb8 Bug 753175 - color picker locks down the GUI
The common code relies on X11 pointer grabbing semantics, which does
not work well on OS X. An attempt using event taps also proved
problematic, in particular with regard to setting the mouse cursor.

This patch implements a fully separate code for use on OS X platforms.
It works by simply overlaying the desktop with big transparent windows
on which the mouse cursor is set and motion events are captured. Evil,
but it works.
2015-10-04 16:27:17 +02:00
Michael Natterer f6df750714 libgimpwidgets: minor formatting changes in gimpruler.c
to make rebasing this file in gtk3-port a little less painful.
2015-09-27 13:45:13 +02:00
Michael Henning 8c02b360fb libgimpwidgets: Disconnect ruler's idle handler in dispose
As discussed on irc, this is more appropriate than finalize because
we shouldn't be making any gtk calls after dispose.
2015-09-06 17:41:09 -04:00
Michael Henning 3233a70bae libgimpwidgets: Avoid updating the rulers too often.
Ever since 72617e42b, whenever the user generated a lot of mouse
input, we would constantly queue redraws to the rulers. These redraws
had a higher idle priority than updating the canvas, so we would
rarely get around to canvas updates, which made certain tools
(painting with dynamics, the blend tool) feel very unresponsive.

This fixes it by only redrawing the rulers if the mouse has moved
far from the last location, or if there are no idle handlers with
a priority above LOW.
2015-09-06 17:18:12 -04:00
Michael Natterer fd0203ce80 libgimpwidgets: change parameters of gimp_widget_get_color_transform()
Change GimpColorManaged to GimpColorProfile.
2015-09-01 23:40:57 +02:00
Michael Natterer 0d3978df87 libgimpwidgets: improve the looks of GimpColorProfileView 2015-08-22 22:00:51 +02:00
Michael Natterer 10e4a261a7 libgimpwidgets: simplify GimpColorProfileChooserDialog's preview widget
There is no need for a frame around a scrolled window, the scrolled
window has the same shadow type API.
2015-08-22 11:20:00 +02:00
Michael Henning 72617e42b4 Bug 736411 - Ruler updates cause slowdown when painting
We now avoid drawing rulers in the position property setter and use
gtk's region invalidation instead. Previously, we were basically
redrawing the ruler inside the mouse event handler, which is pure evil.
2015-08-13 11:41:18 -04:00
Michael Natterer 5672e80ea1 libgimpwidgets: port GimpColorProfileStore and -ComboBox to GFile
and deprecate the old filename-based API. Port everything to use the
new GFile functions.
2015-08-01 16:20:14 +02:00
Michael Natterer cbae4cb20a Bug 752377 - Incorrect UTF-8 string for ICC files, Pango error
gimp_color_profile_combo_box_set_active(): don't unref the profile
then use its label (which is owned by the profile). Found by Massimo.
2015-07-16 19:17:38 +02:00
Michael Natterer 0693298d63 libgimpcolor, *: change all GimpColorConfig getters to return const gchar*
instead of a gchar* which has to be freed. Cache all the strings in
the GimpColorConfig instance.
2015-07-12 14:10:18 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer 16971ff186 libgimpwidgets: formatting cleanup in gimp_widget_get_color_transform() 2015-06-16 23:43:04 +02:00
Michael Natterer affef350e7 libgimpwidgets: fix registration of GimpRuler's "unit" property
Install it with the PROP_UNIT id not PROP_LOWER (probably a copy &
paste mess). Spotted by John Cuppit.
2015-06-14 22:57:46 +02:00
Michael Natterer 3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 2dd6d7fa65 libgimpwidgets: remove /* GIMP_DISABLE_DEPRECATED */ from #endif
It seems to confuse gtk-doc.
2015-05-30 21:55:53 +02:00
Michael Natterer 263fabbb9b libgimpwidgets: simplify gimp_widget_get_color_transform()
Make sure src_profile and dest_profile always exist. Also optimize
things by not returning a transform if the profiles are equal.
2015-05-30 01:07:34 +02:00
Michael Natterer d3e11c5b2c modules, libgimpwidgets: use gimp_color_managed_get_color_profile()
which always returns a profile, instead of code that uses the ICC
blob and falls back to GimpColorConfig's profile, then falls back
to the built-in profiles.
2015-05-27 12:53:46 +02:00
Michael Natterer 4c55f45552 libgimpwidgets: don't try to open non-regular files as ICC profiles
Instead, show proper messages in the profile chooser's preview pane.
2015-05-19 13:12:34 +02:00
Michael Natterer d93ed29f45 libgimpwidgets: gimp_widget_get_color_transform: honor display-profile-from-gdk 2015-05-13 01:12:03 +02:00