Commit Graph

11826 Commits

Author SHA1 Message Date
Michael Natterer b141bcdb60 Minor plug-in sensitivity refactoring
* app/plug-in/gimppluginprocedure.[ch]
  (gimp_plug_in_procedure_get_sensitive): change GimpImageType
  parameter to GimpDrawable and do the type check internally.

* app/actions/plug-in-actions.c (plug_in_actions_update): pass the
  active drawable instead of its type.
2009-08-22 11:03:05 +02:00
Martin Nordholts ee8b53934b app: Use original layer names when importing multi-layered images
We have no reason to believe that the original layer names when
importing multi-layered images are not good enough, so stop adding the
filename as a prefix to the names.
2009-08-22 10:34:15 +02:00
Martin Nordholts b574ae9275 app: Name layers of imported files to filename
After having imported a single-layered image, rename the layer to the
file name.
2009-08-22 10:24:53 +02:00
Martin Nordholts 92df6ae6cd app: Introduce helper function file_open_get_layers() 2009-08-22 09:00:18 +02:00
Martin Nordholts 51cd8c2981 app: Only show 'File->Overwrite' if the source URI has an exporter 2009-08-21 21:40:32 +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 cb8a611e93 Don't PDB-modify locked vectors 2009-08-21 18:06:58 +02:00
Michael Natterer 45aa584b3e Make all vectors PDB manipulation undoable 2009-08-21 17:57:56 +02:00
Michael Natterer 345f88ab04 Make sure we don't PDB-modify locked text layers
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" to
  gimp_pdb_layer_is_text_layer() because that's called on
  all text layers anyway.

* tools/pdbgen/pdb/text_layer.pdb
* tools/pdbgen/pdb/vectors.pdb: pass TRUE if we want to modify the layer.

* app/pdb/text-layer-cmds.c
* app/pdb/vectors-cmds.c: regenerated.
2009-08-21 14:33:12 +02:00
Michael Natterer 256ac5e62e Add "lock_content" PDB getters and setters for drawables and vectors 2009-08-21 14:30:41 +02:00
Michael Natterer b929a7a67c Don't allow to drop stuff to locked drawables 2009-08-21 14:10:22 +02:00
Michael Natterer a7efe42870 Use a GtkToggleButton instead of GtkCheckButton for "Grab event"
A GtkToggleButton doesn't have to be told that it has no indicator,
because it doesn't have one in the first place.
2009-08-21 13:53:34 +02:00
Michael Natterer b793146bde Remove redundant call to gtk_toggle_button_set_mode()
No need to call that function on an actual GtkToggleButton, because
they never have check indicators anyway.
2009-08-21 13:52:29 +02:00
Michael Natterer b277454760 Don't allow to drop stuff to locked drawables 2009-08-21 13:50:07 +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 0953146be1 Check if there is an active layer if active_layer_only is TRUE 2009-08-20 22:41:49 +02:00
Michael Natterer de409ea52a Fix sensitivity of the "Merge down" action
The command doesn't simply need the next layer in the stack, it
needs the next *visible* layer.
2009-08-20 22:22:17 +02:00
Michael Natterer 3309c35f18 Fix typo: defualt -> default (spotted by Alexia) 2009-08-20 22:11:33 +02:00
Michael Natterer 35a7052b8d Add actions and callbacks to toggle "lock-content" on drawables and vectors 2009-08-20 21:19:43 +02:00
Michael Natterer 28061c23f1 Don't modify locked items from PDB wrappers
* app/pdb/gimppdb-utils.[ch]: add "gboolean writable" parameter to
  gimp_pdb_item_is_attached() because this function is called on
  almost all items where a check for locked is needed.

* tools/pdbgen/pdb/*.pdb: pass writable = TRUE in all checks for items
  that are modified. Add explicit calls to gimp_pdb_item_is_writable()
  in some rare cases.

* app/pdb/*-cmds.c: regenerated.
2009-08-20 20:47:01 +02:00
Michael Natterer b5c3e5a6b6 Also copy "lock_content" when duplicating an item 2009-08-20 19:34:30 +02:00
Michael Natterer 774850c46f Add gimp_pdb_item_is_writable() which sets an error if the item is locked 2009-08-20 18:50:55 +02:00
Michael Natterer 7262e45df9 Made modifying actions insensitive when the active item is locked
Use the term "writable" in the code as a shortcut for "there is an
active item and it is not locked".
2009-08-20 17:11:31 +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 ee5b8c6552 Make the appearance of the "lock content" toggle configurable
* app/widgets/gimpitemtreeview.[ch]: add class members for the lock
  content button's icon, tooltip and help_id and use them when
  creating the button. Create the button in constructor() instead of
  init() so we have access to our real class structure without the
  need for a custom get_type() function.

* app/widgets/gimpdrawabletreeview.c: configure the button as "Lock pixels".

* app/widgets/gimpvectorstreeview.c: configure it as "Lock path strokes".
2009-08-20 12:50:40 +02:00
Michael Natterer ff31975305 Keep the lock buttons at the end of the options vbox 2009-08-20 12:33:01 +02:00
Michael Natterer 86ad1ff70e Add a "lock content" toggle that needs some more refinement hacking 2009-08-19 21:30:48 +02:00
Michael Natterer a16bfe749f Fix a comment 2009-08-19 21:30:48 +02:00
Michael Natterer fb1a672546 Bug 61019 - add a 'lock' flag per layer to protect it
Took patch from Martin Nordholts and ported it to add a "lock-content"
property, signal and API in the same way as it's done for "visible"
and "linked".
2009-08-19 21:30:48 +02:00
Michael Natterer f7ba1d1f2e Add missing blank line after the vectors group of functions 2009-08-19 21:30:47 +02:00
Michael Natterer 7f94f3213b Pack boolean members into a bitfield to save two integers per item 2009-08-19 21:30:47 +02:00
Michael Natterer 5260a535e5 Use the new option box API of GimpItemTreeView, remove own code for it 2009-08-19 21:30:47 +02:00
Michael Natterer 36530dd8be Add generic code for boxes of options to GimpItemTreeView
- new API to add widgets to a box of options, for stuff like the paint
  mode menu and opacity scale. Set it sensitive automatically and
  update its spacings in GtkWidget::style_set().
- new API to get a hbox for "lock" toggles, for stuff like lock
  pixels and lock alpha.
2009-08-19 21:30:47 +02:00
Sven Neumann d655f03607 correct a comment 2009-08-19 16:59:15 +02:00
Martin Nordholts 966b81992b app: Add "FG to BG (Hardedge)" gradient
Add internal gradient "FG to BG (Hardedge)" based on gradient by
Saul Goode. See bug #589371.
2009-08-15 11:58:08 +02:00
Martin Nordholts 98aaae7cac app: Clean up internal gradient construction
Move code that is not shared between all gradients out of
gimp_gradients_add_gradient() and group the code with comments.
2009-08-15 11:48:36 +02:00
Martin Nordholts b72e5a35b1 Revert "Add a button to create a group layer to the layers dialog"
This reverts commit d2e1f2ac74. If we
keep the layer group button in 2.7.0 people will expect layer groups
to fully work and get mad when that is not the case. We can enable it
again after the release.
2009-08-15 09:41:20 +02:00
Martin Nordholts 8414cf77b0 app: Change default brush to "Round Fuzzy" 2009-08-14 19:57:06 +02:00
Martin Nordholts 1dbf732943 app: Add temp_buf_dump()
Add temp_buf_dump() which can be used to dump TempBufs to disk for
easier analysis, for example with GIMP.
2009-08-14 19:23:01 +02:00
Martin Nordholts 3d0c025a51 app: Support obsolete data resources
Add support for having obsolete data resources. An obsolete resource
is not shown in the UI or managed in any way, but it will be
considered when plug-ins requests resources. This in order to maintain
backwards compatibility for plug-ins.
2009-08-13 21:54:00 +02:00
Martin Nordholts 4df574acd6 Use separate shortcuts for 'File->Export to' and 'File->Overwrite'
Since Ctrl+E previously meant something harmless, don't use that
keyboard shortcut for the destructive command 'File->Overwrite'. We
still keep Ctrl+E for 'File->Export to' though, and we do this by
having 'File->Overwrite' as a separate GtkAction with its own keyboard
shortcut slot.
2009-08-13 21:53:23 +02:00
Sven Neumann 60f11e18ae Bug 591017 – Tablet pan is not working as fast as it should
Use motion event compression for display scrolling.
2009-08-13 20:24:14 +02:00
Michael Natterer ae6828c1cc Add more precondition checks to vectors import functions
(gimp_vectors_import_file)
(gimp_vectors_import_buffer): check the parent item the same
way gimp_image_add_vectors() does.
2009-08-10 13:28:14 +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
Michael Natterer 28aa03e525 Move gimp_image_raise_layer_to_top() around
Reorder functions so layer reorder function are in the same
order as channel and vectors ones.
2009-08-10 00:45:25 +02:00
Michael Natterer dc53e81705 Make sure items passed as "parent" are actually group items
Add precondition checks to all image add() and reorder() functions
2009-08-10 00:45:24 +02:00