Commit Graph

11661 Commits

Author SHA1 Message Date
ffe2afb6fb Tag popup scrolling cleanup
- artificially limit the popup's height again so scrolling gets some testing.
- make sure the scroll buttons' sensitivity is always correct.
- remove obsolete utility function and other cleanups.
2009-07-12 19:26:17 +03:00
34f3c20d67 Remove more obsolete variables and indentation levels 2009-07-12 19:26:17 +03:00
e90a610e88 Factor out tag hit detection into a utility function 2009-07-12 19:26:17 +03:00
f441464656 Fix tiny miscalculation of the tag name rendering position 2009-07-12 19:26:16 +03:00
357e24aebf More tag popup cleanup
- reorder instance struct and add some spacing
- rename member "timeout_id" to "scroll_timeout_id"
- clean up constructor() even more (still the wrong place to
  do all these things)
2009-07-12 19:26:16 +03:00
3db3ad0703 Some more cleanup and a fix of a tiny earlier cleanup glitch 2009-07-12 19:26:16 +03:00
df57181899 Remove useless member "ignore_button_release" 2009-07-12 19:26:16 +03:00
7fdefa92e0 Clean up spacings, tag size calculation and tag rendering
The area sensitive to clicks now corresponds to the area that
is drawn selected, minus a border of one pixel.
2009-07-12 19:26:16 +03:00
66c54126f0 Use GTK_SHADOW_OUT for the tag popup's frame 2009-07-12 19:26:15 +03:00
59849bcb44 Use #defines instead of magic values for the tag spacing constants 2009-07-12 19:26:15 +03:00
3a1f3b4813 Remove "close_rectangles" member and the feature it implemented
Closing whatever popup by click on dead space within it is a no no,
otherwise one-pixel mis-clicks inside the widget make it go away,
which is totally unexpected.
2009-07-12 19:26:15 +03:00
094b7f5d64 Various code cleanups 2009-07-12 19:26:15 +03:00
e28727bdbd Widget construction / showing cleanup
- create the widgets in init() instead of constructor()
- don't show the popup in constructor()
- don't use gtk_widget_show_all()
2009-07-12 19:26:15 +03:00
487fc7402e Rename member "drawing_area" to "tag_area" 2009-07-12 19:26:14 +03:00
7582753661 Whitespace and minor code cleanup 2009-07-12 19:26:14 +03:00
d408bed34f app: Clarify gimp_display_shell_format_filename()
Clarify gimp_display_shell_format_filename() by using booleans with
nice names in the if conditions.
2009-07-12 19:26:14 +03:00
765fe81311 Bug 554658 – Path Dialog: Path preview pics not to see constantly
Always initialize the 'status' member of a newly allocated cairo_path_t
to the value CAIRO_STATUS_SUCCESS as required to successively call
cairo_append_path().
2009-07-12 19:26:14 +03:00
f843e590fd Bug 167604 – gimp_gradient_get_color_at() may return out-of-bounds values
This is not a problem of gimp_gradient_get_color_at(), but a typo
in gradient_editor_right_color_update().
2009-07-12 19:26:13 +03:00
96baac783f Fade dynamics. Add fade as one more dynamics driving factor on GUI. Implement fading dynamics calculation. Let fade work with all driven factors. Add pixel_dist parameter to get_dynamic_x. Adjusted function calls for get_dynamic_x.
* app/paint/gimppaintoptions.c: Add initialization for fading dynamics. Add fading related variables similar to Random. Adjust get_dynamics_mix function. Add fading calculation in get_dynamics_x functions. Adjust get_dynamic_x functions for fade dynamics.

	* app/paint/gimppaintoptions.h: Add fading_options in GimpDynamicOptions.

	* app/tools/gimppaintoptions-gui.c: Add the function fading_options_gui.

	* app/paint/gimpclone.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c
	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpconvolve.c: Adjust function calls. get_dynamic_opacity function calls were adjusted to have one more parameter, paint_core->pixel_dist.

some key words:
get_dynamic_
pixel_dist
paint_core->pixel_dist
2009-07-11 15:45:54 -03:00
27f12b2505 app: Cleanup gimp_display_shell_format_filename() 2009-07-05 23:58:55 +02:00
073d026f6c app: Show "(overwritten)" and "(exported)" status of image
When an import source has been overwritten with File -> Overwrite
<file.png>, or exported by whatever means, reflect this status in the
title bar of the image window. Do this by adding some string building
logic to gimp_display_shell_format_filename().
2009-07-05 09:28:52 +02:00
1662ff2523 app: Keep track of GimpImage export dirtiness
Since save and export are separate activities we need to keep track of
image dirtiness for both of them. For this purpose, add a
'export_dirty' member to GimpImage which has the same semantics as
'dirty', but for export. Set it to clean whenever a document is
exported by whatever means. Do this with a new function
gimp_image_export_clean_all(). Also add gimp_image_is_export_dirty().
2009-07-05 09:28:52 +02:00
c4601b298d app: Make 'Overwrite foo.png' work
In File -> Overwrite, we need to use the import source as the export
URI since there is no explicit export target given yet.
2009-07-05 09:28:52 +02:00
c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
0959414cd2 app: Simplify file_actions_update() 2009-07-03 08:20:40 +02:00
46cdf8b16c app: Put 'Export to' above 'Export...' 2009-07-03 08:16:08 +02:00
7deab857b4 app: Update default save name according to spec
Update default save name according to the spec which is
http://gui.gimp.org/index.php/Save_%2B_export_specification in case
someone forgot.
2009-07-02 22:17:36 +02:00
631e128ddd app: Forget import source after saving as XCF
Forget the import source after save. We interpret a save as that the
user is not interested in being able to quickly export back to the
original any longer. The effect of this is that if we have an
'Overwrite' menu item, it becomes insensitive and set to 'Export to'.
2009-07-02 22:17:36 +02:00
8a1e826d99 app: Show "Overwrite <filename>" in File menu
With no export target but with an import source, show
"Overwrite <filename>" in the File menu. This also means we can't set
GIMP_FILE_EXPORT_TO_URI_KEY along with import source any longer.
2009-07-02 22:17:36 +02:00
ed9c12d1e7 app: Put "[<filename>] (imported)" in window title for imported files
Put "[<filename>] (imported)" in window title for imported files
instead of "Untitled (imported from <filename>)".
2009-07-02 22:17:35 +02:00
d9136aec3f app: Support NULL ext to file_utils_uri_with_new_ext() 2009-07-02 22:17:35 +02:00
e4976d8ad2 Bump GEGL and BABL versions here too 2009-07-02 12:24:13 +02:00
f07d89de2a Bug 587543 – crash in GNU Image Manipulation Program: Pressing shift+-
Not all actions have procedures associated with them, for example
unused "plug-in-recent-[N]" actions, so check for NULL before we
invoke the plug-in action
2009-07-01 21:45:33 +02:00
05537763ef Bug 567393 – Rectangle select tool size shrinks to 0 if size is larger than
the image and the up or down arrow is pressed.

Applied patch from Massimo as found in bug #567393. This changes ROUND()
to RINT() to correct rounding for negative numbers. Also did this change
in gimp_rectangle_tool_adjust_coord().
2009-06-30 23:19:13 +02:00
4c5c158bfa Fix corner case of text tool up/down navigation
(gimp_text_tool_move_cursor): really go to the beginning/end of the
buffer when there are no further lines to go up/down to.
2009-06-28 17:27:02 +02:00
bcfaed96d2 Simplify and clean up text tool clipboard handling. 2009-06-27 21:51:52 +02:00
8e09c53637 Some more text tool cleanup
- keep around more local "buffer" variables to improve readability
- fix all comparisons between coordinates and bounding boxes,
  they were off-by-one on one or both sides.
2009-06-27 21:31:06 +02:00
afb8d07fcf Use PANGO_WRAP_WORD_CHAR so we don't cut off words which are wider than the layer 2009-06-27 21:10:34 +02:00
6d3522c737 Make up/down work within wrapped lines
(gimp_text_tool_move_cursor): use PangoLayoutLines and byte indices to
calculate x positions when moving the cursor up or down. text_tool->x_pos
is not in terms of device units within a PangoLayoutLine.
2009-06-27 15:38:30 +02:00
285c25a257 Some minor cleanup 2009-06-27 14:55:45 +02:00
51f81bd15e app: Reuse the GeglProcessor
Reuse the GeglProcessor instead of creating a new one in each call to
gimp_projection_construct_gegl(). Requires at least 0ed57a05da of
GEGL. Does not seem to give any performance improvement at all
unfortunately :(
2009-06-26 08:17:48 +02:00
1a2136408e Implement overwrite-mode in the text tool
* app/widgets/gimptextproxy.c: also swallow the "toggle-overwrite"
signal.

* app/tools/gimpdrawtool. [ch] (gimp_draw_tool_draw_text_cursor): add
"gboolean overwrite" which causes the cursor to be drawn as block.

* app/tools/gimptexttool.[ch]: implement overwriting, toggling it,
and changing the text cursor accordingly.
2009-06-25 13:22:25 +02:00
0ecf3b24d6 Some text tool code cleanup
- add some local "buffer" variables to avoid writing text_tool->text_buffer
  all the time.
- text_tool->text_buffer always exists, no need to check for it.
2009-06-25 10:45:06 +02:00
877844214c Implement select-all / unselect-all bindings 2009-06-25 10:21:56 +02:00
e78bda44b3 Implement insert_at_cursor() so bindings can insert text 2009-06-24 21:31:39 +02:00
92a89666cf Implement GTK_DELETE_WHITESPACE (code stolen from GtkTextView) 2009-06-24 21:06:31 +02:00
b5079eb1b7 Move the GimpTextProxy widget from app/tools/ to app/widgets/ 2009-06-24 19:34:36 +02:00
512c80cb05 Keep the proxy text view from doing anything
Add GimpTextProxy, a GtkTextView subclass which does nothing but
overriding the binding methods with empty implementations, so the text
view has no chance of letting e.g. the display beep or doing anything
else.
2009-06-24 19:26:24 +02:00
e170ad77b1 Remove the newly added tool clipboard facility again, we don't need it 2009-06-24 19:08:24 +02:00
919c875d65 Implement cut/copy/paste via the proxy text buffer's signals 2009-06-24 19:04:18 +02:00