Commit Graph

25920 Commits

Author SHA1 Message Date
Michael Natterer 892363605c Random doc fix 2009-09-14 21:36:50 +02:00
Claude Paroz 1cf5bfd9c0 Updated French translation
Contributed by Julien Hardelin and Claude Paroz
2009-09-13 23:05:05 +02:00
Michael Natterer fd224caa10 Make sure don't lose the selected item when the tree get collapsed
Collapsing the tree gets rid of any selection in the collapsed branch,
and doesn't restore it upon exapnding. So connect to the
GtkTreeView::row-expanded signal and select the active item manually.

Had to add evil hack that makes sure we don't try this on child items
that are currently being inserted, because our parent class has no
choice but to expand the tree while the item is not completely
inserted in all subclasses yet.
2009-09-13 22:39:01 +02:00
Michael Natterer 717b4e6a07 Fix undoing a group layer type conversion
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
  GimpDrawable::convert_type().

* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
  conversion functions.

* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
  because it can be called on unattached items only.

* app/core/gimpimage-convert.c: pass TRUE.

* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
  which simply calls gimp_drawable_convert_type() with the old type
  when undone/redone.

* app/core/gimpgrouplayer.c: push a group layer convert undo so this
  can be properly undone/redone.
2009-09-13 19:24:19 +02:00
Martin Nordholts 2ac7cedbfc app: Make GimpDockbook instance data private
Make GimpDockbook instance data private and add necessary getters and
setters.
2009-09-13 16:30:09 +02:00
Martin Nordholts 67128d6034 app: Add GimpDock::set_host_geometry_hints()
In order to allow the toolbox dock to set geometry hints on the
GtkWindow it is in, introduce host geometry hint setting through a new
virtual function GimpDock::set_host_geometry_hints() and a new
"geometry-invalidated" signal.

Docks that needs to setup geometry hints on the window they are in
call gimp_dock_invalidate_geometry(). The GimpDockWindow will listen
to this and give the dock a chance to set geometry hints (or any setup
really) on the GimpDockWindow.
2009-09-13 14:14:08 +02:00
Martin Nordholts a23a220d60 app: Add and use GimpDockWindow window title infrastructure
Add a "title-invalidated" signal to GimpDock and a virtual function
GimpDock::get_title(). When GimpDocks have a state change that their
title depends on they call gimp_dock_invalidate_title(). The
GimpDockWindow listens to this signal and update its window title
using GimpDock::get_title() in an idle handler.
2009-09-13 13:14:18 +02:00
Martin Nordholts 0d4e8d0526 app: Move 'Recently Closed Docks' logic to GimpDockWindow
Move 'Recently Closed Docks' logic from GimpDock to
GimpDockWindow. GimpDock is now free of explicit GtkWindow
dependencies.
2009-09-13 12:04:50 +02:00
Martin Nordholts dc3521e074 app: Add and use gimp_dock_get_n_dockables() 2009-09-13 11:51:39 +02:00
Martin Nordholts fb99f99788 Move dock window themeing to GimpDockWindow
Move the dock window related themeing namely default dock heght and
font scale from GimpDock to GimpDockWindow to get rid of yet another
GtkWindow dependency from GimpDock.

Note that this change requires gtkrc updates where "GimpDock::" needs
to be repaced with "GimpDockWindow::".
2009-09-13 11:23:02 +02:00
Martin Nordholts fc3ab53645 app: Get rid of GimpImageDock typedef 2009-09-13 11:08:38 +02:00
Martin Nordholts 12494097b0 app: Explicitly init dialog_factory member in GimpDockWindow::_init() 2009-09-13 10:14:26 +02:00
Martin Nordholts 88e6fe1e62 app: Add GimpDialogFactory property to GimpDockWindow
Add a GimpDialogFactory property to GimpDockWindow so that it can get
rid of its GimpDock dependency. We need to call the property
"gimp-dialog-factory" instead of "dialog-factory" though as long as
GimpDock subclasses GimpDockWindow.
2009-09-13 09:49:56 +02:00
Martin Nordholts 0fc1a32ad0 app: Kill GimpImageDock
Get rid of GimpImageDock and make its subclasses inherit directly from
GimpDock instead.
2009-09-13 09:31:21 +02:00
Martin Nordholts 3532acbec6 app: Move UI manager from GimpImageDock to GimpDockWindow
Move the GimpUIManager from GimpImageDock to GimpDockWindow. This
includes making the ui_manager_name class-member of GimpImageDock a
normal instance member of GimpDockWindow since the UI manager name no
longer can be configured at the class level.
2009-09-13 09:22:59 +02:00
Martin Nordholts f5d1c1ba4d app: Add and use gimp_image_dock_get_ui_manager() 2009-09-12 22:23:10 +02:00
Julien Hardelin e2c02dbc12 Updated French translation 2009-09-12 22:18:14 +02:00
Sven Neumann 65e09758ef Bug 595003 - Error in string "Lower this tool Lower this tool..."
Fix tooltips for raise/lower buttons in the GimpToolEditor widget.
2009-09-12 20:33:25 +02:00
Michael Natterer 2af860e6a6 Add GimpProjectable::get_image_type()
Needed because a group layer's projection can have a different type
than its image, at least at some pathologic moment during image type
conversion. But even if it didn't, it's cleaner this way anyway.

* app/core/gimpprojectable.[ch]: add the new vfunc plus public API.

* app/core/gimpprojection.c: use it instead of using the type of the
  image returned by gimp_projectable_get_image(). The get_image()
  function is now unused in the projection and only needs to stay
  because the projection is also a GimpPickable.

* app/core/gimpgrouplayer.c: implement GimpProjectable::get_image_type().
2009-09-12 19:24:01 +02:00
Martin Nordholts 8794d2481a Bug 594998 - Keyboard shortcuts does not work for first image when dock is focused
The dock needs to listen to image changes in the context and not only
display changes since the introduction of the empty-image-window does
not cause any display changes when creating the first image.
2009-09-12 14:57:46 +02:00
Martin Nordholts e2388ed123 app: Clarify why each dock has its own context 2009-09-12 13:29:34 +02:00
Hleb Valoshka 22f2586cc9 Updated Belarusian translation 2009-09-12 13:51:42 +03:00
Michael Natterer 0f918e75a4 Implement GimpDrawable::convert_type()
Don't convert the pixels but reallocate the group's projection for the
new type. This breaks badly on undo, don't bother to try yet...
2009-09-11 22:03:55 +02:00
Michael Natterer 53c9eeee82 Use gimp_drawable_convert_type() to convert to gray and rgb 2009-09-11 22:03:55 +02:00
Michael Natterer cd60b9ef5c gimp_channel_convert(): use gimp_drawable_convert_type() 2009-09-11 22:03:54 +02:00
Michael Natterer c6fb6d0ceb Implement GimpDrawable::convert_type()
Move pixel conversion code from gimp_layer_convert() to the new
gimp_layer_convert_type() implementation and call
gimp_drawable_convert_type() from convert(). In convert_type(), simply
chain up to convert to gray and rgb and only implement indexed
conversion ourselves.
2009-09-11 22:03:54 +02:00
Michael Natterer 86a264e9f2 Add new virtual function GimpDrawable::convert_type()
This may look like duplication of GimpItem::convert() but in fact will
fix the longstanding uglyness that GimpItem::convert() both transfers
an item to another image *and* converts the image type of drawables.
When this refactoring is done, GimpItem::convert() will only move an
item to another image, and its implementation in GimpDrawable classes
will call GimpDrawable::convert_type() to convert the pixels to
whatever format.

Takes a "dest_image" parameter anyway because for converting to
indexed we need the destination colormap. The default impl in
GimpDrawable can only convert to gray and rgb however.
2009-09-11 22:03:54 +02:00
Manish Singh f857e70e26 Ignore libapp.a 2009-09-11 12:58:13 -07:00
Manish Singh 2182dec09b Bug 594651 - layer.scale() raises RuntimeError
Add "interpolation" to kwlist for pygimp layer.scale()
2009-09-11 12:55:25 -07:00
Martin Nordholts 45a8d1f487 app: Pass dock roles as construction parameters
In order to keep window specific settings as local as possible, also
move the role setting to dock construction instead of having it in
init.
2009-09-10 22:25:00 +02:00
Martin Nordholts 5b74dd27ef app: Move window init code from GimpDock to GimpDockWindow
Move window init code common to all docks from GimpDock to
GimpDockWindow.
2009-09-10 22:13:21 +02:00
Martin Nordholts 26fbeebf02 app: Set the dock-window-hint centrally in GimpDockWindow
Set the dock-window-hint centrally in GimpDockWindow instead of both
in GimpToolbox and GimpMenuDock.
2009-09-10 22:03:39 +02:00
Martin Nordholts 81d961423a app: Add GimpContext property to GimpDockWindow
The GimpDockWindow will need to have a GimpContext so add such a
property but call it "gimp-context" for now to avoid clashing with
"context" of GimpDock.
2009-09-10 22:03:30 +02:00
Manish Singh 15497c1d68 Explicit shared lib deps to support gold 2009-09-09 17:41:20 -07:00
Manish Singh 3682f7680f Fix syntax error 2009-09-09 17:38:42 -07:00
Martin Nordholts 76a2522a43 app: Cleanup PROP_WEB_BROWSER code 2009-09-09 23:40:44 +02:00
Martin Nordholts e1faf82e7d Get rid of toolbox-window-hint, use dock-window-hint instead
Since the toolbox no longer is the main window with a menu, use the
same hint for the toolbox (which actually is a dock) as for the other
docks.
2009-09-09 23:37:38 +02:00
Martin Nordholts 0110eb0cdf app: Introduce GimpDockWindow
Introduce GimpDockWindow and make GimpDock inherit from it. Right now
it is just a GimpWindow, but window logic from GimpDock and subclasses
will gradually be moved here so that we eventually can make GimpDock a
GtkBin. That in turn will allow us to put several GimpDocks next to
each other in columns, or GimpDocks in an image window.
2009-09-09 18:22:05 +02:00
Michael Natterer 45f05b272c gimp_item_real_duplicate(): don't set lock-content if it can't be set
Also use the proper APIs to set visible, linked and lock-content
instead of accessing the item struct directly.
2009-09-08 22:09:53 +02:00
Michael Natterer a8b0e3c943 gimp_layer_duplicate(): don't set lock-alpha if it can't be set 2009-09-08 22:09:03 +02:00
Michael Natterer 0c57e8c68e gimp_layer_transform_color(): don't assume the dest region has alpha
Don't blindly fill the dest region's alpha channel even if it has
none. Fixes longstanding bug that made things without alpha dropped
to indexed images to arrive broken.
2009-09-08 20:54:51 +02:00
Michael Natterer f2f741a26e Add gimp_drawable_convert_rgb() and gimp_drawable_convert_grayscale()
The new functions reall convert the drawable this time, using the
previously renamed convert_tiles functions. Remove tile manager
fiddling from all callers and leave it there only for converting to
indexed.
2009-09-08 20:36:51 +02:00
Michael Natterer 83c79bad5d Use gboolean instead of gint for boolean value 2009-09-08 19:57:50 +02:00
Michael Natterer f3bae9ac57 Remove "old_base_type" parameters from gimp_drawable_convert_tiles_foo()
I have no idea how ancient these parameters were, but the drawable
knows about its type itself, so no need to pass it in.
2009-09-08 19:46:20 +02:00
Michael Natterer 1ecf6b5bc8 Rename the functions in gimpdrawable-convert.[ch]
Rename them from gimp_drawable_convert_foo() to
gimp_drawable_convert_tiles_foo() because they don't convert the
drawable itself, they convert its tiles into passed-in tiles.
2009-09-08 19:46:19 +02:00
Michael Natterer e77f6b10f4 Use gimp_drawable_type() instead of drawable->type 2009-09-08 19:46:19 +02:00
Michael Natterer 13ac22d800 Add %T which expends to the active drawable's type
This is not really generally useful, but I needed it for debugging and
it doesn't hurt.
2009-09-08 19:46:19 +02:00
Michael Natterer 42fe565f5d Add the new drawable and vectors lock-content APIs to the docs 2009-09-08 19:46:19 +02:00
Michael Natterer 332ebeb5d3 Add enum GimpTextHintStyle and gimp_rectangle_union() to the docs 2009-09-08 19:46:18 +02:00
Michael Natterer d1f767d9b6 Make gimp_image_get_layer,channel,vectors_by_name,tattoo() more readable
Add local GimpItemStack variables instead of having the functions'
entire code in one line.
2009-09-08 19:46:18 +02:00