Commit Graph

16606 Commits

Author SHA1 Message Date
Mikael Magnusson 3c2cb65088 app: don't potentially overread buffer
If a file has more than 4kB on the first line and starts with #!, then
we would pass a non-null terminated string to strchr. Found by coverity.
2013-06-15 22:40:49 +02:00
Mikael Magnusson 1947d8def8 app: avoid reading uninitialized memory
gimp_rgb_to_hsl and hsl_to_rgb reads the a member, so set it before
calling them. Add gimp_hsl_set_alpha() for this purpose.

Found by coverity
2013-06-15 22:40:49 +02:00
Simon Budig 4852e59ec1 remove some disabled nonfunctional code with german comments. 2013-06-15 22:17:48 +02:00
Michael Natterer 5b999990cb Bug 702359 - 'New Layer Group' menu command should not have ellipsis
so remove them.
2013-06-15 21:09:55 +02:00
Michael Natterer 0a73a787ba app: remove GimpSpinScale's "factor" API again
The method of replacing the spinbutton's adjustment was just waiting
for some future bugs to appear.
2013-06-15 20:53:37 +02:00
Michael Natterer a009b18a6e app: use gimp_prop_widget_set_factor() not gimp_spin_scale_set_factor() 2013-06-15 20:52:57 +02:00
Michael Natterer 3fb16c8849 app: GimpHistogramView: fix display when the number of bins changes
Also look at "bg_histogram", but only if "histogram" is not set. Fixes
curves tool display after changing image precision.
2013-06-15 20:29:42 +02:00
Michael Natterer 731360a8f7 app: add gimp_prop_widget_set_factor()
which allows adjustment-based prop widgets to display the property
value multiplied by factor. Remove gimp_prop_opacity_spin_scale_new()
because that's simply a factor of 100.0.
2013-06-15 01:28:54 +02:00
Michael Natterer efbe095b66 app: configure GimpBrightnessContrastTool's scales according to image precision 2013-06-14 08:17:39 +02:00
Michael Natterer 0046f0eed6 app: fix gimp_spin_scale_set_factor() to not break if called more than once 2013-06-14 02:22:57 +02:00
Michael Natterer afb767fcc1 app: use 0..1 axes in GimpCurveTool's curves widgets on != 8-bit images 2013-06-13 00:23:49 +02:00
Michael Natterer edca08e1c2 app: fix rendering glitches on changing the axis ranges in GimpCurveView
and honor the x-axis range when displaying the set "xpos".
2013-06-13 00:22:20 +02:00
Michael Natterer f70e4cdba9 app: don't reset the mode node's opacity when changing the layer mode
gimp_gegl_mode_node_set_mode(): re-set the previously set opacity.
2013-06-12 22:13:01 +02:00
Michael Natterer 3dafeeed15 app: add a generic fast path to GimpOperationPointLayerMode
If there is no "aux" buffer, or opacity is 0.0, pass through the input
buffer as-is.
2013-06-12 21:08:04 +02:00
Michael Natterer 4edba97932 app: port GimpThresholdTool to the new variable # of histogram bins 2013-06-12 16:35:15 +02:00
Michael Natterer 945e57af1d app: GimpHistogramBox: map the range to 0..1 for != 8 bit histograms 2013-06-12 11:18:07 +02:00
Michael Natterer 9ba866dc38 app: a drawing off-by-one was corrected wrongly in GimpHandleBar
Wasn't noticable before because we didn't have handle bars
in the range of 0..1.
2013-06-12 11:16:33 +02:00
Michael Natterer 571350270b app: return 0.0..1.0 from gimp_histogram_get_mean(), median(), std_dev()
Display the float values in the histogram dockable and add a compat
hack to the gimp_histogram() PDB wrapper.
2013-06-12 02:01:24 +02:00
Michael Natterer 6c97908a9e app: add "gboolean gamma_corrected" to gimp_histogram_new()
so we can make histograms of the gamma-corrected image data. Pass
TRUE all over the place so the histogram works perceptually. This
needs more thinking...
2013-06-12 01:02:25 +02:00
Michael Natterer 96d1a9392e app: gimp_histogram_editor_info_update(): use the real number of bins
for displaying histogram info, not always 255.
2013-06-12 01:01:39 +02:00
Michael Natterer 0f0590426d app: must CLAMP() all valus to 0..1 for calculating histogram bins
The histogram does only 0..1, there are no bins outside that range.
2013-06-11 23:11:37 +02:00
Michael Natterer d26cd268ba app: start using the new histogram property notifications in the widgets
This is only WIP, but it at least updates the selected range correctly
when the image precision changes.
2013-06-11 22:36:33 +02:00
Michael Natterer 8d1cbd95d2 app: rename gimp_histogram_get_channel() to get_component()
Because that's what it is. It also takes a "gint component"
(0..4) and not a "GimpHistogramChannel channel".
2013-06-11 21:32:08 +02:00
Michael Natterer a7f42de4c0 app: turn GimpHistorgram into a GimpObject, no other changes 2013-06-11 21:23:32 +02:00
Michael Natterer 48d312ed94 app: create > 8-bit histograms with 1024 bins
Seems to calculate and draw correctly, just the view's range is
broken now, will fix.
2013-06-11 08:49:28 +02:00
Michael Natterer 88a971f6c9 app: port GimpHistogramView drawing to a flexible amount of bins 2013-06-11 08:48:25 +02:00
Michael Natterer 96d569a50e app: make GimpHistogram use floats, and make the number of bins flexible
It's still always 256 currently.
2013-06-11 02:24:53 +02:00
Michael Natterer 875b1705fc app: don't ROUND() all input/output values to int in GimpLevelsTool
That was a leftover from before the change to 0..100 sliders for
non-8-bit images. Spoted by Elle Stone.
2013-06-10 21:51:15 +02:00
Michael Natterer 0ced7458cc Revert "pdb: Mark unused args as dead"
This reverts commit d2cac94a49
and commit 7241a35b93.

gimp-drawable-foreground-extract will be revived before 2.10, the
warnings are a nice reminder :)
2013-06-10 11:25:16 +02:00
Mukund Sivaraman 7241a35b93 app: Update generated code 2013-06-10 14:44:05 +05:30
Michael Natterer 48d611b5c2 app: don't overallocate, a double is 64 bits not 64 bytes :) 2013-06-10 01:12:06 +02:00
Michael Natterer a1e7591351 app: show the real pixel values in GimpColorFrame's "Pixel" mode
Rewrite gimp_color_frame_update() to use gimp_babl_print_pixel()
2013-06-10 00:30:18 +02:00
Michael Natterer d6b3a81821 app: add gimp_babl_print_pixel (format, pixel)
which returns a NULL-terminated string array with the pixels's
components, converted to text in the current locale.
2013-06-10 00:30:18 +02:00
Michael Natterer 330d511b33 app: gimp_pickable_pick_color(): return the right color index 2013-06-10 00:30:17 +02:00
Michael Henning 87bcc4aa3d app: Use gegl:scale-ratio instead of the deprecated gegl:scale 2013-06-09 15:10:15 -04:00
Michael Natterer 4e9661bd20 app: use RGBA double to pick and average in gimp_pickable_pick_color()
It was still putting all picked colors through a guchar[4].
2013-06-09 20:13:50 +02:00
Michael Natterer d2b254c4dc app: use GimpIntComboBox' label in generated GEGL op GUIs
Makes the property widget table less noisy.
2013-06-08 22:01:24 +02:00
Michael Natterer 934edb75ab app: redo commit "make sure overlay widgets are keyboard navigatable"
Letting just tab presses bubble up when an overlay canvas child didn't
handle a key event isn't enough. Instead, let all key presses and
releases bubble up if the canvas itself doesn't have the focus.
Read: don't make assumptions.
2013-06-08 17:27:05 +02:00
Michael Natterer 25cc5922b6 app: add gimp_tool_gui_set_focus_on_map() and use it 2013-06-08 15:34:23 +02:00
Michael Natterer 2d68b1d4f9 app: make sure overlay widgets are keyboard navigatable
Tab key events are not handled by the widget itself, they are supposed
to bubble up until they hit the generic keyboard navigation code
that knows about the focus chain, therefore:

gimp_display_shell_canvas_tool_events(): if an overlay widget is
focussed, don't handle Tab events and toggle dock visibility. Instead,
simply bail out with FALSE so the event reaches te keyboard navigation
code.

Also treat GDK_KEY_KP_Tab like GDK_KEY_Tab all over the place.
2013-06-08 15:27:14 +02:00
Michael Natterer 90797f0927 app: add an embedding toggling test button to the transform dialogs 2013-06-08 01:33:35 +02:00
Michael Natterer 1982cf1db7 app: add gimp_tool_gui_set,get_overlay()
which allow to toggle embedded and dialog style gui.
2013-06-08 01:32:34 +02:00
Michael Natterer ad8d12ed69 app: add "response" signal to GimpToolGui
and connect to it instead of to gimp_tool_gui_get_dialog()'s signal.
One more step towards on-the-fly embedding/detaching.
2013-06-07 23:45:11 +02:00
Michael Natterer e7bb2805c2 app: keep around all settable stuff in GimpToolGui
so the gui can be recreated when switching from embedded to detached
or vice versa.
2013-06-07 23:20:20 +02:00
Michael Natterer 2e5d1ff05e app: enable tools_fg_select_brush_size_cmd_callback() again 2013-06-07 22:27:59 +02:00
Michael Natterer 0afa7d30f0 app: add gimp_tool_gui_set_description() and use it 2013-06-07 17:01:39 +02:00
Michael Natterer 9a811d276e app: add gimp_tool_gui_set_alternative_button_order() and use it
Also make some of GimpToolGui's memory management proper, there was
no leak but it needs to be proper in order to add runtime switching
between dialog and overlay.
2013-06-07 15:18:24 +02:00
Michael Natterer 170b987b99 app: put tool overlays into the canvas upper-right corner 2013-06-07 12:21:38 +02:00
Michael Natterer 88387d6e8d app: remove the "shell" parameter from gimp_tool_dialog_new() and gui_new() 2013-06-07 12:19:42 +02:00
Michael Natterer 3def3a1ade app: raise the dialog if already visible in gimp_tool_gui_show() 2013-06-07 12:12:28 +02:00