Commit Graph

1467 Commits

Author SHA1 Message Date
Michael Natterer 394bc25be1 libgimpwidgets: return the formats from gimp_widget_get_color_transform()
Turn the src_format and dest_formats into "const Babl **" and make
them return the actually used formats. Change the lcms display module
accordingly.
2015-05-11 00:45:18 +02:00
Michael Henning af84148fed libgimpwidgets: Fix the order of #includes
Otherwise, G_OS_WIN32 and GDK_WINDOWING_QUARTZ will never be
defined by the time we reach the #ifdefs.
2015-05-08 22:53:49 -04:00
Michael Natterer f21f6e5a28 libgimpwidgets: add gimp_widget_get_color_transform()
Which returns a GimpColorTransform to transform a GimpColorManaged's
pixels to a GtkWidget's color space, using a GimpColorConfig's
settings. This is *unfinished* API and in the end will enable simple
display color management for the app, libgimp and plug-ins.
2015-05-09 01:20:50 +02:00
Michael Natterer 6b0b774302 libgimpwidgets: add gimpwidgetsutils.[ch]
Move some functions from libgimpwidgets/gimpwidgets.[ch]
and from app/widgets/gimpwidgets-utils.[ch]. Newly add
gimp_widget_get_color_profile() which is extracted from
modules/display-filter-lcms.c.
2015-05-06 22:15:30 +02:00
Michael Natterer 6c800db1cc Use the newly added profile utility functions all over the place 2015-05-06 16:38:57 +02:00
Michael Natterer 957471604f icons, app, libgimpwidgets: use GResource for the compiled-in icons
And a small improvement in cursors/Makefile.am
2015-04-21 21:57:08 +02:00
Michael Natterer c72bc50e5d Bug 747057 - Usability issues with GimpFileEntry
Make the "Show in File Manager" button insensitive when the file entry
is empty.
2015-04-15 22:56:19 +02:00
Michael Natterer 7c36f94f7f cursors,app,libgimpwidgets: include cursors using GResource
instead of deprecated inline pixbufs. Require on gdk-pixbuf >= 2.30.8.
2015-04-14 22:55:10 +02:00
Michael Natterer 071ede915a app: first draft of GimpMybrushTool, which uses MyPaint brushes 2015-03-30 22:38:34 +02:00
Michael Natterer 9b6bacc0d8 Bug 723901 - Add open in file manager button in Folders settings
Add the button, using the new gimp_file_show_in_file_manager() API.
2015-03-29 23:52:11 +02:00
Michael Natterer f8a9f39466 libgimpwidgets: use gtk_window_set_default_icon_name()
instead of gtk_window_set_default_icon_list() which requires having
actual GdkPixbufs around. Move the 32x32 and 48x48 wilber images to
the icon theme, and remove all inline pixbuf generation stuff from
libgimpwidgets.
2015-03-29 21:00:11 +02:00
Johannes Matschke 2989bad35a Bug 721009 - new transform tool with freely placeable handles
Add new tool GimpHandleTransformTool which allows to freely place up
to 4 handles on the image, then move any one of them, which transforms
the image so that the remaining handles keep their position.

Did quite some cleanup on the code before pushing --Mitch
2015-03-05 12:36:59 +01:00
Marek Dvoroznak f15a7bc71d app: add NPD tool basics 2015-02-27 20:21:51 +01:00
Michael Natterer 36548fd1ad Bug 745126 - gimp_preview_area_blend() fails for RGBA image...
...if buf1 and buf2 have same alpha value

Fix a misplaced } that was causing the final write to the destination
buffer to be executed only for the case where the alphas are
different. Thanks to Jonathan Tait.
2015-02-27 09:50:34 +01:00
Massimo Valentini 20863440fb Bug 736411 - Ruler updates cause slowdown when painting
Reuse the cairo_t from expose() in gimp_ruler_draw_pos() instead of
creating a new one.
2015-01-10 23:37:31 +01:00
Michael Natterer 1dd2752949 Bug 742202 - new layer/path dialog opens always in the upper left corner
gimp_dialog_set_property(): when setting a non-toplevel parent widget,
don't just set the dialog's screen, also set the window position to
GTK_WIN_POS_MOUSE, so the window opens at the mouse position.
2015-01-08 21:13:41 +01:00
Michael Natterer 9df726cbad Bug 742229 - "pixels" entries get added to unit menus on each popup
_gimp_unit_store_sync_units(): don't trigger a sync of newly added
units if we encounter GIMP_UNIT_PERCENT, it has a special value that
is always larger than any other unit. All unit menus containing
"percent" were broken the same way.
2015-01-03 17:22:50 +01:00
Michael Natterer aafc2368cd libgimpwidgets: make GimpColorSelection's main_hbox expand vertically
so the color dialogs become properly resizable again. This must have
been broken for ages.
2014-11-29 12:52:26 +01:00
Michael Natterer 7cbb04c0f9 libgimpwidgets: don't leak the empty_iter in GimpIntStore 2014-10-06 20:31:51 +02:00
Jehan 8c1cd7caac Makefile: fix VPATH builds for win32. 2014-09-14 18:28:26 +02:00
Michael Natterer b7863269f0 libgimpcolor: change gimp_lcms_profile_open_from_file() from filename to GFile
and change most of the lcms plug-in to using GFile too.
2014-07-04 23:57:27 +02:00
Michael Natterer b78d9c9f35 libgimpwidgets: forgot two gimp_spin_button_new() 2014-06-22 00:00:46 +02:00
Michael Natterer eaea58f5e3 libgimpwidgets: deprecate gimp_spin_button_new()
it should have never been added in the first place. Port all users
to using gtk_spin_button_new() directly.
2014-06-21 22:35:39 +02:00
Michael Natterer b9265ebfb9 Bug 731765 - "Value Propagate" dialog's "Propagating rate" spinbuttons...
...are much too quick

In gimp_scale_entry_new(), set the spinbutton's climb_rate to the same
value as step_increment instead of hardcoding 1.0. This should make
many spinbuttons behave better.
2014-06-21 16:52:18 +02:00
Michael Natterer 77a515dd0f app, libgimpwidgets: don't set unchanged object properties again
gimp_prop_adjustment_callback(): compare the property's current value
before setting it.
2014-06-19 02:01:10 +02:00
Michael Natterer 306e81b11d icons, libgimpwidgets: get rid of compiled-in icons
Register the stock icons with icon-name sources instead of inline
pixbuf sources so they simply use the icon theme icons insatead of
duplicating them.
2014-05-20 02:15:24 +02:00
Michael Natterer bbf01ebabf libgimpwidgets, app: add gdk_screen_get_monitor_workarea()
to the gimp3migration hack and use it where appropriate, so in the
gtk3-port branch windows will not overlap with docks, panels etc.
2014-05-19 14:37:32 +02:00
Michael Natterer ae331bc7ac libgimpwidgets: add the EEK Wilber as builtin icon
so gimp_widget_load_icon() always returns a pixbuf and GIMP doesn't
crash.
2014-05-15 15:40:47 +02:00
Michael Natterer 8be52f6aa7 app, libgimp*: pass translated blurbs to GIMP_CONFIG_INSTALL_PROP_FOO()
instead of passing N_()-strings; and remove gettext() calls on these
strings when using them. Reduces complexitx, and fixes double- and
untranslated strings. Also enables to treat properties of GIMP and
GEGL objects the same way, which was totally broken before.
2014-05-14 23:34:01 +02:00
Michael Natterer 65a65947d9 app, libgimp: replace GTK_STOCK_FOO by icon names
unless it's a stock ID used for an action button, will address that
later.
2014-05-11 22:49:22 +02:00
Michael Natterer 4b629e984b libgimpwidgets: add GimpColorDisplayClass::icon_name
and deprecate its stock_id.
2014-05-10 11:53:07 +02:00
Michael Natterer 1ec64abb8b libgimpwidgets: add GimpColorSelectorClass::icon_name
and deprecate its stock_id.
2014-05-10 08:34:42 +02:00
Michael Natterer 9331ef2456 libgimpwidgets: change GimpController's stock_id to icon_name
This API change is OK since the entire controller API is marked as
unstable and needs a special #define to be visible at all.
2014-05-09 09:19:06 +02:00
Michael Natterer 63c5508d4d libgimpwidgets: use the renderer's icon-name in GimpIntComboBox 2014-05-09 02:04:25 +02:00
Michael Natterer 3e4485fdcf libgimpwidgets: forgot a few image_new_from_stock() -> from_icon_name() 2014-05-09 00:56:25 +02:00
Michael Natterer ed7cdba5b6 libgimpwidgets: add gimp_prop_icon_image_new()
and deprecate gimp_prop_stock_image_new().
2014-05-09 00:56:24 +02:00
Michael Natterer 3372ca82da libgimpwidgets: properly implement GimpCellRendererToggle's icon-name property
and change the parameter of new() from stock_id to icon_name.
2014-05-08 12:38:50 +02:00
Michael Natterer 16e9188b1f icons: rename gimp-eye.png to gimp-visible.png 2014-05-08 12:37:42 +02:00
Michael Natterer 2980f18973 libgimpwidgets: use gtk_icon_theme_load_icon() in GimpPageSelector 2014-05-08 09:22:46 +02:00
Michael Henning ab36f26e63 libgimpwidgets: Fix error in docs for gimp_enum_combo_box_set_icon_prefix
This function was just added in 79bd9c60de
2014-05-07 19:15:52 -04:00
Michael Natterer ae4a41d7a5 themes, icons: move icons from themes/Default/images/ to the toplevel icons/
and install them in datadir/icons.
2014-05-07 21:57:21 +02:00
Michael Natterer 6615891990 libgimpwidgets: fix warnings in last commit in GimpHintBox 2014-05-07 21:56:53 +02:00
Michael Natterer 79bd9c60de libgimpwidgets: mostly port from stock IDs to icon names
Add some new API and deprecate old one.
2014-05-07 21:32:09 +02:00
Michael Natterer b7e50079a6 libgimpwidgets: add a hackich "icon-name" property to GimpCellRendererToggle
half-implemented, just for the purpose of having an "icon-name", it
uses the icon name as stock ID, which works as long as we keep
both icon systems around.
2014-05-07 15:28:51 +02:00
Michael Natterer 1814641a50 themes, libgimpwidgets: install an index.theme and prepend our icon theme...
to the search path. The index.theme is a copy of the upstream hicolor
index.theme with our custom sizes added, and it has to be first in the
path to be used at all. This. Is. Broken.
2014-05-07 15:02:33 +02:00
Michael Natterer 9ed5b3f45e app: port GimpAction and friends to icon names 2014-05-06 23:47:38 +02:00
Michael Natterer bfa6edf519 libgimpwidgets: add our installed icon theme to the search path 2014-05-06 22:45:19 +02:00
Michael Natterer cffc8234fa themes, libgimpwidgets: prepare the icons to be named icons from an icon theme
Rename them and move them into folders, e.g.:

stock-foo-16.png -> 16/gimp-foo.png

This change only moves internal stuff around,
it's not visible on any API.
2014-05-06 19:13:04 +02:00
Rickard 5ec413a5e8 Bug 729326 - Errors found using a static code analysis program cppcheck
Fixed some memory and file leaks. And removed some code and variables
that are not used.
2014-05-05 10:34:08 +02:00
A Kelday c808789e1d Bug 728911 - Fixes to libgimpwidgets for c++ plugins using gimpui
Add missing G_END_DECLS to libgimpwidgets headers.
Avoid use of c++ "private" keyword.
2014-04-25 00:33:29 +02:00
Michael Natterer c2ab3f6d50 libgimpwidgets: add a string to GIMP_STOCK_TOOL_FOREGROUND_SELECT 2014-04-18 22:14:41 +02:00
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer 661317f74c libgimpwidgets: make using GimpColorProfileComboBox easier
If the passed dialog is a GimpColorProfileChooserDialog, handle its
"response" signal automatically and also destroy it when the combo box
is destroyed (before we leaked all dialogs). Remove the same callback
from all places using GimpColorProfileComboBox.
2014-04-04 17:09:54 +02:00
Michael Natterer 3f826d02fa libgimpwidgets: make GimpColorProfileComboBox use lcms
and improve gimp_color_profile_combo_box_set_active() to get the
profile's label from the ICC file if no label was provided. Simplifies
all its callers and removes code duplication.
2014-04-02 13:03:52 +02:00
Michael Natterer d7037650df libgimpcolor: add gimp_lcms_profile_get_label()
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
2014-03-30 03:12:42 +02:00
Michael Natterer 32e47cf70d libgimpcolor: add gimp_lcms_profile_is_equal()
and remove all of our own MD5 digest code and API. is_equal() uses
lcms' own MD5 API which I missed before. Thanks Elle for pointing that
out :)
2014-03-29 10:40:47 +01:00
Michael Natterer f6ee562884 libgimpwidgets: add padding to GimpColorProfileChooserDialogClass 2014-03-23 23:59:40 +01:00
Michael Natterer dc8a3e8de5 libgimpwidgets: remove gimp_color_profile_chooser_dialog_get_desc()
and port its only user (the prefs dialog) to the code all other users
of GimpColorProfileChooserDialog use.
2014-03-23 23:50:54 +01:00
Daniel Sabo 5cee9408be app,gimpwidgets: Add some missing libs so the tests build 2014-03-20 03:15:50 -07:00
Michael Natterer 76f47708fa libgimpwidgets: #include gimpimageprofileview.h from gimpwidgets.h 2014-03-16 18:36:12 +01:00
Michael Natterer c6ac6913af libgimpwidgets: use a GimpColorProfileView in GimpColorProfileChooserDialog 2014-03-16 18:36:12 +01:00
Michael Natterer dc6b8ec8f6 libgimpwidgets: add new widget GimpColorProfileView
which is a totally trivial GtkTextView subclass and displays
color profile information.
2014-03-16 18:36:11 +01:00
Michael Natterer abb3f27cdb libgimpwidgets: use gimp_lcms_profile_open_from_file() in the profile chooser 2014-03-16 15:57:14 +01:00
Daniel Sabo b54b59c9e8 Use EXTRA_foo_DEPENDENCIES for adding .def files
The foo_DEPENDENCIES rule replaces the default dependencies, where
EXTRA_foo_DEPENDENCIES just appends to it. This was causing libgimp
and libgimpui to build out of order.
2014-03-15 14:23:38 -07:00
Michael Natterer 3ac04f9fe1 libgimpwidgets: more spacing around the profile chooser's preview textview 2014-03-15 00:09:35 +01:00
Michael Natterer 13ee151a1e libgimp*: use LIBADD and DEPENDENCIES consistently in all Makefiles 2014-03-14 22:39:51 +01:00
Michael Natterer 9c7cd2508f app, libgimpwidgets: move GimpProfileChooserDialog to libgimpwidgets
and call it GimpColorProfileChooserDialog. Make libgimpwidgets
depend on lcms and make it query the profile directly.
2014-03-14 22:03:08 +01:00
João S. O. Bueno 72ac53705f Adds "fill" arrange modes to the Align Tool
The Align Tool had to be used in a very hacky way if one
intended to evenly distribute items across an image,
or other reference object (it would actually require one to
calculate the item spacing out of GIMP). This adds vertical
and horizontal fill modes: the reference object is divided
in N equal segments, where N is the number of items,
and each item is placed in the center of one of
these segments. The existing "offset" parameter
is used as an extra margin for the distribution,
and can be set to negative values, so that the items can
even get moved outside the boundaries of the reference object.
2014-03-13 03:38:53 -03:00
Michael Natterer 66298ba869 Bug 605872 - Units dropdown list is not updated
Add private API _gimp_unit_store_sync_units() which emits
"row-inserted" on each unit that didn't exist when the GimpUnitStore
was created, or when sync_units() was called the last time.

In GimpUnitComboBox, call sync_units() each time the combo is popped
up, or a unit is set on the combo.
2014-03-10 00:17:15 +01:00
Michael Natterer 7385e030dd app, libgimp: add increment parameters to gimp_prop_widget_set_factor()
Step and page increments can't be reasonable calculated or guessed
based on the GUI widget's factor, so pass them each time we call
set_factor(). This change reintroduces sane ranges for the levels tool
for != u8 images again.
2014-02-03 22:57:51 +01:00
Michael Natterer 219bf35299 Bug 723177 - After opening an ICC profile with a long description...
...dialogs are too wide

Ellipsize GimpColorProfileComboBox' label.
2014-01-28 18:54:46 +01:00
Daniel Sabo afc40ffda0 Add automake 1.13+ test outputs to .gitignore 2014-01-10 15:31:34 -08:00
Michael Natterer fb01bb37d2 Bug 721067 - Opacity slider broken in "Edit/Fade [plugin]..." dialog
gimp_prop_opacity_entry_new(): need to pass FALSE not TRUE to
gimp_prop_scale_entry_new()'s limit_scale parameter, it has the
inverse meaning than the same boolean in gimp_scale_entry_new().

This is perhaps a bug, but we can't change that now; instead, fix the
argument names and docs of gimp_prop_scale_entry_new() to point out
the difference.
2013-12-26 14:01:34 +01:00
Michael Natterer f489ef2c5a libgimpwidets: don't pick transparent colors in gimp_pick_button_pick()
Full opacity in gimp_rgba_set_uchar() is 255, not 1.0.
2013-11-16 22:53:16 +01:00
Michael Natterer 50d4fe3496 libgimpwidgets: add GimpColorDisplay::convert_buffer()
which takes a GeglBuffer and a GeglRectangle.
2013-11-01 22:34:09 +01:00
Michael Natterer 5fd46384a5 libgimpwidgets: include <gegl.h> in all files that include gimpcolordisplay.h 2013-11-01 22:32:31 +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
Michael Natterer 5466caa064 libgimpwidgets: return an opaque color from gimp_pick_button_pick()'s OSX code
and fiddle with whitespace a bit.
2013-10-11 22:52:38 +02:00
Daniel Sabo e6ed0a4c50 Use the Quartz core graphics API to implement gimp_pick_button_pick when building with GDK Quartz.
Signed-off-by: Clayton Walker <clayton.m.walker@gmail.com>
2013-10-11 13:57:49 -06:00
Michael Natterer ad2a577606 libgimpwidgets: support the same "factor" logic as in app's prop widgets 2013-06-17 02:14:17 +02:00
Michael Natterer c8b7ce7006 libgimpwidgets: fix formatting in gimpscaleentry.c 2013-06-17 00:39:15 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Nils Philippsen 755861cc65 libgimpwidgets: fix typo 2013-06-04 10:41:10 +02:00
Michael Natterer 8a2474a371 libgimpwidgets: never ellipsize anything in the combo box' popup
The popup can be wider than the widget, so show the full strings.
2013-06-03 21:33:21 +02:00
Michael Natterer 34ee988a93 libgimpwidgets: only ellipsize GimpIntComboBox's text if requested 2013-06-03 16:57:42 +02:00
Michael Natterer 418a310f36 libgimpwidgets: add a "label" property and API to GimpIntComboBox
If set, the label is displayed left-aligned inside the combo box, and
the normal content moves to the right. Reconfigure the combo's
contents when the popup is shown/hidden, so the popup widget is not
affected by the label. This requires an evil hack because of a bug in
GtkCellView. The hack automatically disables itself once GTK+ 2.24.19
(which has a fix) is used.
2013-06-03 16:36:25 +02:00
Michael Muré c86daeabb1 libgimpwidgets, themes: setup a dumb icon for the tool
(Add the icon in advance so the gimpstock.h change doesn't trigger
a full rebuild when switching branches)
2013-05-18 10:40:41 +02:00
Clayton Walker 05ac996881 Register GIMP_STOCK_TOOL_SEAMLESS_CLONE 2013-05-15 00:25:32 +02:00
Alexandre Prokoudine aaaa9eef85 Bug 699257 - Duplicated shortcut for Set Image Canvas Size dialog
Stock Reset and Resize buttons had clashing _R accelerator in the
Resize Canvas Size dialog.
2013-05-13 01:06:12 +02:00
Michael Natterer f45e7c26be libgimpwidgets: add gdk_cairo_get_clip_rectangle() to gimpwidgets.def 2013-04-20 14:49:25 +02:00
Michael Natterer 89bf66d471 libgimpwidgets: add gdk_cairo_get_clip_rectangle() to gimp3migration.[ch] 2013-04-19 02:23:21 +02:00
Téo Mazars 24a2113170 Bug 656522 - Scaled Image Rounds Up To Nearest Pixel
Prevent gimp_coordinates_callback () to be called recursively
when x and y are chained.

One call puts all values in a consistent state, a recusive call can
cause side effects (calculations with rounded values)
2013-03-27 01:04:33 +01:00
Michael Natterer d1503ead83 Bug 694477 - GimpSizeEntry input validation doesn't snap to min/max values
gimp_size_entry_eevl_input_callback(): CLAMP() the input value before
passing it back to GtkSpinButton, or it will revert too large/small
inputs back to the old value, instead of using the field's max/min
values.
2013-02-22 21:22:03 +01:00
Michael Natterer 0bbc2b6231 libgimpwidgets: set a min size of 8 chars on GimpColorHexEntry
because GtkEntry's default min size is way too large for this use
case.
2013-02-06 23:23:14 +01:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Michael Natterer f1c785fb37 libgimpwidgets: remove all item width logic from GimpPageSelector
It seems GtkIconView got fixed, and now the pile of code I added to
make the layout nice has exactly the opposite effect. Get rid of the
pile.
2012-11-23 23:29:44 +01:00
Massimo Valentini 67525c0d47 Bug 688305: drag and drop for guides broken 2012-11-15 19:02:42 +01:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 9e5ed1e70a Bug 684003 - When using the main window in secondary monitor...
If gimp_window_set_transient_for() fails (due to platform
restrictions), at least set GTK_WIN_POS_CENTER on the window, so it
gets centered on the monitor where the mouse is. This also removes the
need for OSX specific centering code in GimpDialog (bug 677776).
2012-11-11 21:09:46 +01:00
Michael Natterer fe19ad9706 Bug 683694 - Spelling errors
Reworded all places that used to say "allows to".
2012-11-11 15:50:25 +01:00