Commit graph

2926 commits

Author SHA1 Message Date
Michael Natterer
2da2c510d2 Use gtk_widget_get_window() instead of widget->window 2009-10-09 21:19:05 +02:00
Michael Natterer
33150b4a1b Use gtk_widget_get_window() instead of widget->window 2009-10-09 21:19:05 +02:00
Michael Natterer
e57b0eee63 Don't call gimp_display_get_image() on a NULL display 2009-10-07 19:46:01 +02:00
Michael Natterer
08f35de4ac Use gimp_display_get_image() instead of display->image 2009-10-07 19:00:42 +02:00
Michael Natterer
c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer
d1ded0617f More gimp_display_get_shell() instead of display->shell 2009-10-05 19:58:03 +02:00
Michael Natterer
7d878f6f4b Use the GimpDisplayConfig from GimpDisplay where possible
...instead of going via display->gimp and casting.
2009-10-04 20:22:06 +02:00
Michael Natterer
8ba18309eb Use display->gimp intead of display->image->gimp 2009-10-04 20:05:28 +02:00
Michael Natterer
ac98c2c234 Use gimp_display_get_shell() instead of directly accessing it 2009-10-04 19:56:39 +02:00
Michael Natterer
dee0afed79 Move the statusbar back to GimpDisplayShell
Keeping it in GimpImageWindow was a bad idea because
- it wasted space
- it produced evil code because
- it conceptually didn't belong there
2009-10-04 15:33:03 +02:00
Michael Natterer
f6fd3aed51 Move GimpDisplayShell's expose functions to separate files 2009-10-02 23:55:26 +02:00
Michael Natterer
1c430a2b19 Move all GimpImageWindow members to a private struct
Add accessor functions for publically available members and visibility
functions for menubar and statusbar.
2009-09-29 21:44:43 +02:00
Michael Natterer
253b8e2cbe Use gimp_display_shell_get_window() instead of gtk_widget_get_toplevel()
The new function does the right thing, unlike get_toplevel() which
returns the shell itself if it is not in a window. Check the return
value of get_window() for being non-NULL.
2009-09-29 20:32:26 +02:00
Michael Natterer
54edc20113 Add missing #include "gimpimagewindow.h" 2009-09-28 22:55:54 +02:00
Michael Natterer
0b12978761 Go via gtk_widget_get_toplevel() to get to the statusbar 2009-09-28 22:55:42 +02:00
Michael Natterer
10b98034d4 Move the statusbar to GimpImageWindow
As with the menubar, port some code properly, and add some
horrible /* FIXME image window */ hacks to make it work.
2009-09-28 22:55:38 +02:00
Martin Nordholts
8bfcd14f9a app: Add GimpSessionInfo getters and setters 2009-09-20 14:51:03 +02:00
Michael Natterer
9e18f771c4 Replace "Group Layer" by "Layer Group" in all user visible strings 2009-09-03 14:57:18 +02:00
Michael Natterer
0b09278c17 Don't access item->width and ->height directly 2009-09-03 01:00:14 +02:00
Michael Natterer
a12a9fa70e gimp_vector_tool_button_press(): don't edit locked vectors 2009-09-01 12:43:43 +02:00
Michael Natterer
02903d6970 Use gimp_item_is_content_locked() instead of gimp_item_get_lock_content()
Use the new API whenever we want to determine the item's effective
lock state (whether we can write to the item's content or not). Use
gimp_item_get_lock_content() only in code that actually deals with
*this* item's locked state, which is only the PDB wrappers and GUI to
modify the flag on the item itself.
2009-08-29 15:27:04 +02:00
Michael Natterer
e979c08133 Start separating the logic for "locked" and "is group" again
The idea that group layers count as locked was a bad one, start adding
separate checks for group layers, and refuse to modify them with
distinct error messages.
2009-08-28 20:07:14 +02:00
Michael Natterer
6aadd0bbc9 Rename gimp_image_pick_correlate_layer() to gimp_image_pick_layer() 2009-08-25 23:18:34 +02:00
Michael Natterer
f61f435699 Filter out linked children of linked items to translate 2009-08-25 15:57:04 +02:00
Michael Natterer
9040afc0fc Set BAD cursors if the active drawable is locked 2009-08-21 19:34:59 +02:00
Michael Natterer
ed2c002fd8 Make the checks in GimpTool::initialize() work reliably
Set tool->display and tool->drawable to NULL in button_release()
so initialize() is actually called before each button_press().
2009-08-21 19:04:45 +02:00
Michael Natterer
c9c28be9df Make the checks in GimpTool::initialize() work reliably
Set tool->display and tool->drawable to NULL in button_release()
so initialize() is actually called before each button_press().
2009-08-21 18:27:50 +02:00
Michael Natterer
cca194ed04 Don't transform the item if it was locked while using the tool
Add additional check to gimp_transform_tool_doit() so it won't
transform an item that was locked while we were adjusting the
transform.
2009-08-21 12:07:55 +02:00
Michael Natterer
7b5e176eee Really don't paint on locked drawables
Remove GimpTool::initialize() implementation again and check for the
drawable being locked in GimpTool::button_press() so we can't paint if
the tool has been used before on the same drawable when it was
unlocked.
2009-08-21 11:55:18 +02:00
Michael Natterer
e95b5d9f72 When cropping the active layer, error out if there is none or it is locked 2009-08-20 22:43:01 +02:00
Michael Natterer
ec6600a0b3 Refuse to edit locked drawables
Check whether the drawable to edit is locked in GimpTool::initialize()
and bail out with an appropriate error if it is. This currently
prevents cloning from locked drawables, will fix that later.
2009-08-20 17:05:23 +02:00
Michael Natterer
d53aad9ffb Use gimp_image_get_layer_list() instead of layer_iter(), some cleanup 2009-08-10 12:15:54 +02:00
Sven Neumann
57ceb04b32 Only add the language entry if the iso-codes package is available 2009-08-04 22:46:02 +02:00
Sven Neumann
516735f10c add a blurb to the GimpText:language property 2009-08-04 22:46:02 +02:00
Sven Neumann
bf8885f637 Bug 132509 – Allow to choose language in text tool
Remove the commented out language entry from the text editor and add
one to the text tool options instead. Work in progress...
2009-08-04 22:46:01 +02:00
Michael Natterer
a53d4566da Use GIMP_IMAGE_ACTIVE_PARENT instead of a NULL parent in all obvious places 2009-08-03 22:30:36 +02:00
Michael Natterer
c4075975bf Bring parent items to the public API in the core
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().

* app/vectors/gimpvectors-import.[ch]: add parent parameters to
  the vectors import functions.

* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
  removing layers, channels and vectors.

* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-quick-mask.c
* app/core/gimplayer-floating-sel.c
* app/core/gimpselection.c
* app/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
  functions and add FIXMEs all over the place because there is some
  more hacking needed to make adding with index = -1 (on top of the
  current item) work again.

* app/pdb/image-cmds.c
* app/pdb/paths-cmds.c
* app/pdb/vectors-cmds.c: regenerated.

* app/core/gimpimage-duplicate.c: duplicate the original image's
  tree structure in the copy.

* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
  add utility function gimp_item_tree_view_get_drop_index() which
  figures where to add something dropped to an item tree.

* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
  new GimpItemTreeView API.
2009-08-03 19:21:51 +02:00
Michael Natterer
01c77b18d5 Use the new item iter API instead of the image APIs in some straightforward places 2009-08-01 23:07:07 +02:00
Michael Natterer
997111bf0a Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 16:19:32 +02:00
Michael Natterer
c9171a3fbf Clean up various calls to the response() callback
(gimp_image_map_tool_control): call gimp_image_map_tool_response() directly
instead of gtk_dialog_response().

(gimp_image_map_tool_key_press): must not call response() if there is
no dialog (if the tool wasn't used yet).
2009-07-12 17:14:08 +02:00
Michael Natterer
669d26ee39 Move dialog destruction to a utility function 2009-07-12 16:45:18 +02:00
Sven Neumann
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
Michael Natterer
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
Michael Natterer
bcfaed96d2 Simplify and clean up text tool clipboard handling. 2009-06-27 21:51:52 +02:00
Michael Natterer
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
Michael Natterer
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
Michael Natterer
285c25a257 Some minor cleanup 2009-06-27 14:55:45 +02:00
Michael Natterer
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
Michael Natterer
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
Michael Natterer
877844214c Implement select-all / unselect-all bindings 2009-06-25 10:21:56 +02:00