Commit Graph

13379 Commits

Author SHA1 Message Date
Nelson A. de Oliveira c4588f1209 Bug 575911 - Add 'Rule of fifths' crop guide overlay
Implement a rule of fifths guideline for GIMP. See
http://markhancock.blogspot.com/2006/03/address-basic-composition.html
for more info.
2010-06-24 08:37:09 +02:00
Michael Natterer b43be361ff app: add a forgotten g_object_unref()
so all dockables are destroyed when a dock is destroyed.
2010-06-23 22:50:45 +02:00
Michael Natterer bbd4038e98 app: make sure all tool options widgets are properly destroyed
...and with them all references their widgets keep (which are a lot).

Take ownership of the widget after creating it, so it can be reliably
unrefed upon exit.
2010-06-23 22:48:53 +02:00
Michael Natterer e44d81bd4b app: add a debug facility that keeps track of allocated GimpObjects 2010-06-23 22:32:14 +02:00
Martin Nordholts f6781d15c4 Bug 565459 - newly opened images are put into the background
When we are going to open new image windows, unset the transient
window. We don't need it since we will use gdk_window_raise() to
keep the dialog on top. And if we don't do it, then the dialog
will pull the image window it was invoked from on top of all the
new opened image windows, and we don't want that to happen.

Patch heavily inspiried by hack from Massimo Valentini.

Also add a manual test case for the fix. (I don't think there is GTK+
API to automate it).
2010-06-23 20:17:44 +02:00
Martin Nordholts 2431740492 app: Explain gdk_window_raise() in file-open-dialog.c 2010-06-23 19:58:01 +02:00
Michael Natterer ea050b267e app: don't leak all cached GtkTreeIters in container views
This is evil: the hash table of "insert_data" is created on demand
when GimpContainerView API is used, using a value_free_func that is
set in the interface_init functions of its implementors. Therefore, no
GimpContainerView API must be called from any init() function, because
the interface_init() function of a subclass that sets the right
value_free_func might not have been called yet, leaving the
insert_data hash table without memory management.

Call GimpContainerView API from GObject::constructed() instead, which
runs after everything is set up correctly.
2010-06-23 00:20:21 +02:00
Michael Natterer a60463cd8e app: free one more list returned by gtk_container_get_children() 2010-06-23 00:19:44 +02:00
Michael Natterer 46e1410213 app: free the list returned by gtk_container_get_children() 2010-06-22 23:06:35 +02:00
Michael Natterer 865a1f4896 app: free the string returned by gimp_dock_window_get_description() 2010-06-22 23:06:35 +02:00
Michael Natterer 94e757df51 app: don't leak options->language; add finalize() to free it 2010-06-22 23:06:35 +02:00
Michael Natterer cf1cc6dc6f app: private->shells might be a list with one element upon destroy; free it 2010-06-22 23:06:35 +02:00
Michael Natterer 5df1d477b7 app: free shell->zoom_focus_pointer_queue in destroy() 2010-06-22 23:06:35 +02:00
Michael Natterer 09ebdcb06b app: don't leak each transformed brush mask 2010-06-22 23:06:35 +02:00
Michael Natterer 2a984ef51f Bug 612618 - Font selection remains visible
Connect to "grab-notify" and "grab-broken-event" and close the popup
when the grab is lost.
2010-06-22 20:09:52 +02:00
Martin Nordholts ff1da59f33 Bug 574018 - Add a manifest to executables
Patch from Jernej Simončič.
2010-06-22 19:35:16 +02:00
Martin Nordholts f0e90007f7 app/tests: Remove gimp_ui_synthesize_plus_key_event() crack
Make gimp_ui_synthesize_plus_key_event() generic and implement it with
gdk_test_simulate_key(). We can't use gtk_test_widget_send_key()
because its input window logic doesn't seem to work very well.
2010-06-21 21:19:15 +02:00
Martin Nordholts 8b344fa6ad app: Test for existance of git-version.h.tmp before comparing
Test for existance of git-version.h.tmp before comparing. Otherwise
cmp will complain when building tarballs.
2010-06-21 21:19:15 +02:00
Michael Natterer ae0ae9fcb8 app: pass all construct params to g_object_new() 2010-06-21 21:08:13 +02:00
Michael Natterer ac6ee07184 app: the tests should succeed, so should a normal gimp session
Don't divide by zero in gimp_session_info_class_apply_position_accuracy()
when klass->position_accuracy is 0, which happens on each exit in a normal
session.
2010-06-20 23:26:45 +02:00
Martin Nordholts df731fecda Make 'make distcheck' pass
Add missing CLEANFILES, make distcheck passes now.
2010-06-20 20:30:24 +02:00
Martin Nordholts ce33255588 app/tests: Also add error margin to 'gimpsessioninfo-book.c'
Also add error margin to 'gimpsessioninfo-book.c' and update reference
files. This makes 'make distcheck' pass, and it passes more reliably.
2010-06-20 20:30:24 +02:00
Michael Natterer ba3d530c9b tests: fix the directory variables in TESTS_ENVIRONMENT
Apparently, $(abs_top_srcdir) and $(abs_top_builddir) aren't set as
shell variables any longer. Instead, use @abs_top_srcdir@ and
@abs_top_builddir@ so they get substituted at configure time.
2010-06-20 12:25:32 +02:00
Martin Nordholts 49d951d49e app: Introduce error margin in sessionrc in test cases
Introduce a few pixels of error margin in sessionrc, otherwise the
tests are too fragile, widgets have a tendency to change size a bit
and window managers have a tendency to move windows a bit.

Still needs more work, should probably do the same on book positions
too...
2010-06-19 23:55:35 +02:00
Martin Nordholts 4e78fc7279 Also distribute dockrc-expected 2010-06-19 23:55:35 +02:00
Martin Nordholts d1202096e6 app: Include git commit hash in verbose version output
Note:
* Passes make distcheck
* The git commit hash is shipped with tarballs
* Build handles if git-version.h is removed from a tarball
2010-06-19 23:55:35 +02:00
Martin Nordholts ab6d5553d9 app: Don't unmaximize image window when switching tabs in swm
It is when we apply session info to the image window we unmaximize, so
don't apply session info to the image window when all we do is
switching tabs in single-window mode.
2010-06-19 11:08:17 +02:00
Martin Nordholts 1e6055060c app/tests: Also simply test-xcf.c
Simply test-xcf.c too, forgot to do that.
2010-06-19 08:26:30 +02:00
Martin Nordholts 6ad46f651a Bug 610587 - Zooming with zoom tool pans away from the cursor
Update lower and upper value of adjustments *before* we set the new
value, otherwise it will be erroneously clamped sometimes.
2010-06-19 08:09:34 +02:00
Martin Nordholts 4ca603e97d Revert "Bug 610587 - Zooming with zoom tool pans away from the cursor"
This reverts commit 1f1f20261e. It was
not proper , and correcting it reintroduces the bug :(
2010-06-18 23:00:11 +02:00
Martin Nordholts 7e3898da09 app/tests: Add keyboard zoom focus regression test
Add keyboard zoom focus regression test. We also need a new display
shell utility function
gimp_display_shell_push_zoom_focus_pointer_pos() for that.
2010-06-18 20:57:59 +02:00
Martin Nordholts 1f1f20261e Bug 610587 - Zooming with zoom tool pans away from the cursor
Connect gimp_display_shell_hscrollbar_update to "notify::" so that the
notify freeze in gimp_display_shell_scale_update_scrollbars() works.
2010-06-18 20:53:01 +02:00
Martin Nordholts 3f6a3e749c app/tests: cleanup 2010-06-18 20:31:33 +02:00
Martin Nordholts 0af34013a2 app: Add minimum gimp_display_shell_transform_xy() gkt-doc 2010-06-18 20:31:33 +02:00
Martin Nordholts b799a8bd03 app: Remove unnecessary gimp_dockbook_refresh_tab_layout_lut() calls
We don't need to call gimp_dockbook_refresh_tab_layout_lut() in
added() and removed() because we call
gimp_dockbook_update_auto_tab_style() in add() and remove().
2010-06-18 20:31:33 +02:00
Martin Nordholts 5588e15eed app: Disable snap-to-canvas by default
It's too annoying to have the Paintbrush tool snap to canvas by
default.
2010-06-18 20:07:03 +02:00
Michael Natterer 8ab8a25c99 app: some disabled cairo bling code
that draws a gradient in the background of the frame. Not meant
seriously, just something to play with for everybody interested.
2010-06-18 13:51:49 +02:00
Michael Natterer c1c715c2d1 app: don't draw any background if the overlay child is app-paintable
instead of never drawing a background. Doesn't make any difference,
but makes GimpOverlayBox a more general container. Also, the offscreen
GdkWindow doesn't need any event but GDK_EXPOSURE_MASK.
2010-06-18 13:46:39 +02:00
Michael Natterer 27ec3aa812 app: switch off double buffering on the entire offscreen widget tree
Also always return FALSE from the expose and damage event handlers.
2010-06-18 13:45:03 +02:00
Michael Natterer 6eda16d550 app: call dialogs_exit() after controllers_exit() and devices_exit()
which would have been the correct oder all the time, because these
systems are initialized in reverse order. The wrong order didn't
matter until now, but for some reason it now sometimes triggered
warnings about dialog_factories being NULL during controllers
shutdown.
2010-06-18 09:11:14 +02:00
Martin Nordholts 782ba9bcb9 app/tests: Make it easier to add tests
Minimize the effort to add a new test by removing prototypes for tests
and adding macros to register tests.
2010-06-14 18:53:38 +02:00
Michael Natterer 170f0bed00 app: use a GimpOverlayFrame for the text style editor
so it gets round corners and doesn't look so old school.
2010-06-12 23:49:55 +02:00
Michael Natterer 30de295cf4 app: make the alpha channel work on canvas overlay widgets
* app/widgets/gimpoverlaychild.c: when creating offscreen windows, try
  to set an RGBA colormap on the offscreen window's widget and use the
  RGBA colormap to create the window. This has to be done here,
  because it's not possible to get to the right screen *inside* the
  offscreen widget before it's parented, and we need that screen
  before the widget is realized, and the widget can't be parented
  before it's realized or it will get the wrong parent window.
  Everything clear now?

* app/widgets/gimpoverlayframe.c: draw the round corners only if the
  screen has an RGBA colormap.
2010-06-12 23:48:29 +02:00
Barak Itkin c37c0024af app: Fix the description of layers-merge-down
When merging down a layer, currently the selected layer will be merged with the
first visible layer below it. So, we better inform the user that the merging
operation will not necessarily be with the first layer below it, but with the
first visible layer below it.
2010-06-12 21:13:09 +03:00
Michael Natterer d3e7864b5c app: code cleanup 2010-06-12 19:37:03 +02:00
Michael Natterer fc3a89ab0e app: make GimpOverlayFrame work as standalone container
Implement size_request() and size_allocate() so it can be used to pack
an arbitrary widget without the need for being subclassed.
2010-06-12 19:23:22 +02:00
Michael Natterer cabc3aa67a app: split out the round corners code from GimpOverlayDialog
into a new GtkBin subclass called GimpOverlayFrame.
2010-06-12 19:02:51 +02:00
Michael Natterer 94dc079d44 app: forgot to save the last comment edit 2010-06-12 18:46:30 +02:00
Michael Natterer 4da97f95c9 app: don't leak a string returned by g_object_get(), and some cleanup 2010-06-12 18:45:02 +02:00
Michael Natterer 88250391b0 app: fix keyboard focus navigation in overlay children
Implement GtkWidget::focus() and override GtkContainer's focus()
implementation which would always give focus to the canvas because it
is focussable. Instead, try navigating in the focussed overlay child
first, and use GtkContainer's default implementation only if that
fails (which happens when focus navigation leaves the overlay child).
2010-06-12 18:39:21 +02:00
Martin Nordholts 5da660a14d app: Make zoom focus with keyboard work again
Make zoom focus with keyboard work again, it broke when
GimpDisplayShell stopped being a GtkWindow and thus the source of key
events.
2010-06-12 15:37:21 +02:00
Michael Natterer c1f63290bc app: add back the code that aligns the menu with the menu button 2010-06-12 11:38:15 +02:00
Martin Nordholts 6812d5bdce Bug 346881 - Remove redundant title of tab and move menu button up
Remove the dockable drag handle and move the menu button it hosts up
to the GimpDockbook, with the gtk_notebook_set_action_widget() API.

This frees up quite a lot of screen estate which can be used for the
content of dockables instead.
2010-06-12 01:24:39 +02:00
Martin Nordholts 9b86acd16b Add 'Automatic' Tab Style support
Add support for a new type of Tab Style called 'Automatic'. This tab
style makes the GimpDockbook use the biggest actual tab style it can
for its auto tab style dockables, based on its widget allocation.

The tab style candidates for auto tab style are "Status + Blurb",
"Status + Text" and "Status". A docked widget can also say that it
wants to use "Icon" instead of "Status" for its auto tab style. The
'Tool Options' dockable does this. This is to be as backwards
compatible with the old tab style setup, we make 'automatic' the
default everywhere.

We have quite a bit of dependency to internal layout code in
GtkNotebook, but the current code should be pixel perfect and rather
complete.

Also add a basic regression test.
2010-06-12 01:23:42 +02:00
Martin Nordholts 501f97b54b Add gimp_preview_tab_style_to_icon() utility function
Also fix wrong conversion from PREVIEW_NAME to ICON_BLURB
2010-06-12 00:15:13 +02:00
Martin Nordholts e8e469c53c app: Add gimp_dock_temp_add/remove()
In order to get accurate measurements of widgets that will be put in a
GimpDock, add gimp_dock_temp_add() and gimp_dock_temp_remove(). That
way we can add a widget temporarliy, measure it with the
GimpDock::font-scale property applied, then remove it when we're
done. We can't apply style properties on widget detached from a
GdkScreen hierarchy :(
2010-06-11 23:25:14 +02:00
Martin Nordholts e827e7f1bf app: Add gimp_dockable_create_event_box_tab_widget() 2010-06-11 07:35:07 +02:00
Sven Neumann 85a24f0420 app: fix compiler warning and minor formatting issues 2010-06-09 22:57:53 +02:00
Michael Natterer 3e2714508f app: add log output of key event handling in GimpWindow
using the "key-events" debug key.
2010-06-09 18:55:48 +02:00
Barak Itkin 5930b13084 app: add context to all undo descriptions
Description of undo actions should be marked as action descriptions,
and not as commands. This is required for translation for some
language (like Hebrew) that require a different grammatical tense for
describing actions
2010-06-09 18:50:23 +02:00
Michael Natterer 5dd9e4bbc3 app: remove member GimpDrawable::has_alpha
because it is always the same as GIMP_IMAGE_TYPE_HAS_ALPHA(drawable->type),
so simply use that instead.
2010-06-08 10:10:04 +02:00
Michael Natterer 8a27702ac3 app: add simple macros GIMP_TIMER_START() and GIMP_TIMER_END()
which measure the time taken between them and print out a message.
Use it for projection benchmarking and add timing to scaling.
2010-06-06 20:24:27 +02:00
Michael Natterer 17961941fc app: use gegl:scale for scaling if use-gegl is TRUE 2010-06-06 19:54:44 +02:00
Michael Natterer 301b990a46 app: add gimp_drawable_apply_operation_to_tiles()
which uses a passed-in tile manager instead of
the drawable's shadow tiles as sink.
2010-06-06 19:52:39 +02:00
Michael Natterer 6e9796850b app: more g_strcmp0() 2010-06-06 19:50:59 +02:00
Michael Natterer 8cefb2913e app: use g_strcmp0() where strings can be NULL instead of checking manually 2010-06-06 19:15:49 +02:00
Michael Natterer 6d67ffd6f0 app: some cleanup in GimpFilteredContainer 2010-06-06 18:55:07 +02:00
Michael Natterer 6cdf63cc71 app: add gimp_interpolation_to_gegl_filter() 2010-06-06 17:41:31 +02:00
Michael Natterer 3c8baf6c28 app: make sure scale and resize progress is shown in the statusbar again
The action data passed to callbacks is now a GimpImageWindow, not
a GimpDisplay, so adapt the code to take that into account.
2010-06-06 16:44:36 +02:00
Michael Natterer 72bcb72c44 app: rename gimp_template_create_image() to gimp_image_new_from_template()
and move it from gimptemplate.c to gimpimage-new.c
2010-06-05 22:42:00 +02:00
Michael Natterer 9dd373d86e Bug 620604 - Description of "histogram" procedure is slightly inaccurate
Fix totally broken value ranges of integer PDB parameters. Magically,
the bug was affecting only exactly the two cases mentioned in above
bug report.

* tools/pdbgen/pdb.pl (arg_parse): return <, <=, > and >= literally
  instead of applying a mapping that was originally meant for
  generated C code that would e.g. transform "0 <= int32 < 10" into
  "if (value < 0 || value >= 10) fail". This inversion of all
  operators is now wrong because PDB parameters have been turned into
  GParamSpecs which always need inclusive ranges as min and max
  values.

* tools/pdbgen/pdbgen.pl (arrayexpand): generated array length type
  specs must be "0 <= int32", not "0 < int32".

* tools/pdbgen/app.pl: when generating integer param specs, check if
  the value range is specified in terms of < instead of <=, and
  add/subtract 1, resuting in the inclusive range needed for integer
  GParamSpecs.

* app/pdb/color-cmds.c: regenerated, fixing the two broken ranges
  mentioned in the bug report.
2010-06-05 19:26:06 +02:00
Michael Natterer 434bfbd6fa app: rename GimpToolOverlay to GimpOverlayDialog
because it's only used by tools currently, but not related to them in
any way.
2010-06-03 22:32:30 +02:00
Michael Natterer e6983567f2 app: add GimpContainerIconView, a new GimpContainerView based on GtkIconView
This is supposed to finally replace GimpContainerGridView along with
GtkWrapBox. The code is experimental and currently even crashes
without a modified GTK+, so it's disabled. Keeping it in GIT makes
developing easier though.
2010-06-03 22:19:09 +02:00
Michael Natterer a3b93151aa app: some #if 0'ed testing code I occasionally need for debugging
(so I don't have to constantly add/remove it, will get rid of it
before 2.8)
2010-06-03 22:16:08 +02:00
Michael Natterer 15906be4d9 app: pull more code into GimpContainerTreeStore
Keep a list of GimpCellRendererViewable around and add API to add
them. When items are removed or the store is cleared, set the
renderers' "viewable" property to NULL so they don't keep refing the
viewable.

This is not really "model" code but needs to be done for all container
views that have viewable cell renderers.

GimpContainerComboBox and GimpContainerEntry lacked that clearing, so
this change might fix some cases where objects (even images) were
removed but still stuck in memory until the model changed again.
2010-06-03 22:09:02 +02:00
Michael Natterer 6571759c43 app: make sure tool overlay dialogs close on Escape when they are focussed 2010-06-03 22:04:54 +02:00
Martin Nordholts 7b4c731192 app: Add gimp_dockbook_get_tab_icon_size() 2010-06-02 07:56:25 +02:00
Barak Itkin 3f66808584 Added a function to export the Pango markup of a text layer
This is required for the PDF export plugin.
2010-06-01 21:21:40 +02:00
Michael Natterer 5ab6495350 app: say "Reset All Tool Options" in the confirm dialog
and not just "Reset Tool Options".
2010-05-31 23:06:52 +02:00
Michael Natterer 356d2fb88c app: remove #include "gimpcontainergridview.h" 2010-05-30 18:10:35 +02:00
Michael Natterer c75bab37d3 app: remove useless #includes 2010-05-30 18:08:55 +02:00
Michael Natterer 7cdf66a9a1 app: remove GtkVWrapBox because it's unused 2010-05-30 17:22:30 +02:00
Michael Natterer 6429c3de1b app: #undef GSEAL_ENABLE to build against the gtk-2-22 branch
GDK structs and objects have been sealed in gtk-2-22, but we can't
use the newly introduced accessors yet.
2010-05-30 17:19:47 +02:00
Martin Nordholts c67a8c7546 app/tests: Don't have toolbox in sessionrc in session-management test
Enable it again when we have a way to handle that the toolbox size is
likely to change due to the use of GDK_HINT_RESIZE_INC.
2010-05-29 15:46:38 +02:00
Michael Natterer 3a1c319c91 app: disable double buffering on all offscreen widgets
They are rendered only after being completely drawn anyway, so there
is no use in wasting an additional buffer for them.
2010-05-26 11:47:52 +02:00
Martin Nordholts 064c3f661a app: Add gimp_dockable_convert_tab_style() 2010-05-22 20:11:43 +02:00
Martin Nordholts 6efcab2e51 app: Add gimp_dockbook_recreate_tab_widgets() 2010-05-22 19:31:27 +02:00
Michael Natterer 649bd8f678 Bug 619131 - Attempting to flip FG/BG hard-edge gradient locks up GIMP
Don't have the "prev" pointer of the right gradient segment point to
itself, causing an infinite loop when iterating the gradient reversed.
2010-05-20 10:11:18 +02:00
Michael Natterer 788ba611af app: base multiple selection API on the GtkSelectionMode enum
change get,set_multiple_selection(gboolean) to
get,set_selection_mode(GtkSelectionMode) so the APIs are consistent
with GTK+.
2010-05-19 20:07:31 +02:00
Michael Natterer ae7449a81b app: use a GimpContainerTreeStore for GimpContainerEntry
again results in lots of removal of duplicated code.
2010-05-17 22:35:12 +02:00
Michael Natterer 0d659b0496 app: add "use-name" property and API to GimpContainerTreeStore
to allow using GimpObject::name instead of GimpViewable::description
2010-05-17 22:34:09 +02:00
Michael Natterer 998b906dcd app: use a GimpContainerTreeStore for GimpContainerComboBox
which results almost only in code removal :)
2010-05-17 22:05:08 +02:00
Michael Natterer 89f7500b79 app: add gimp_container_tree_store_columns_init()
which initializes the type array with the default columns.
2010-05-17 21:34:11 +02:00
Michael Natterer e1a88379d0 app: remove the model column enum from gimpcontainertreeview.h
and use the right enum from gimpcontainertreestore.h all over the
place instead.
2010-05-17 21:28:17 +02:00
Michael Natterer 104d0ffb3e app: add gimp_container_tree_store_columns_add()
which adds a column to the GType array used for creating a
GimpContainerTreeStore.
2010-05-17 21:22:36 +02:00
Michael Natterer 82a5c62e54 app: add GimpContainerTreeStore which is a GtkTreeStore subclass
and pulls the store handling logic out of GimpContainerTreeView so
it can be reused.
2010-05-17 21:06:28 +02:00
Sven Neumann 00f0350413 Bug 618580 - Thread pool creation fails if number of CPUs is > GIMP_MAX_NUM_THREADS
Clamp the default value for the number of processors to use to the
maximum number of threads.
2010-05-16 22:27:33 +02:00
Martin Nordholts d7dc2dc1ab app: Make tooltips in the toolbox work again
We need to be able to pass a GimpUIManager to
gimp_dialog_factory_dialog_new(), so make that possible. Also make
sure to set ui_manager in gimp_dialog_factory_dialog_new_internal()
when we create both a dock window and a dock, so tooltips works in
toolboxes created from scratch.
2010-05-16 12:19:18 +02:00
Gilles Rochefort 1ca7c6df50 Bug 613841 - Reducing toolbox width in single window mode
Allow to resize left and right dock areas arbitrarilly small.
2010-05-15 20:55:29 +02:00
Martin Nordholts e3b0bda962 app: Use 'create' not 'new' in dockable instance creation methods
Use 'create' not 'new' in GimpDockable instance creation methods to be
consistent with the rest of the code base.
2010-05-15 20:21:55 +02:00
Alexia Death 256eee9850 app: Fix Outline transforming for generated brushes 2010-05-14 21:25:09 +03:00
Alexia Death b0d02666a3 app: A few more generic aspect ratio fixes 2010-05-14 20:58:27 +03:00
Michael Natterer 67ba62154e app: fix and improve text style overlay keyboard interaction
- app/widgets/gimptextstyleeditor.c: don't block all key events so
  they can reach the canvas.

- app/display/gimpdisplayshell-callbacks.c: instead, ignore canvas key
  events when the canvas has no focus.

This fixes navigating out of the text style editor with TAB, moving
focus to the canvas. I have no clue why navigating *between* the
widgets in the style editor doesn't work.
2010-05-12 19:00:18 +02:00
Michael Natterer 4ceb72848a app: enable canvas double buffering if there is a transform preview
or it will flicker like mad.
2010-05-10 20:57:45 +02:00
Michael Natterer b925e256d3 app: don't set the GTK_HAS_FOCUS flag on the canvas manually
because it's sealed and deprecated. I don't remember why this code was
there at all (it should never be needed), so I added warnings that go
off if the widget's focus state doesn't match the received event.
2010-05-10 20:00:23 +02:00
Michael Natterer 46ea197171 app: avoid the deprecated and sealed GTK_OBJECT_FLAGS() 2010-05-10 17:54:49 +02:00
Michael Natterer 7c042df739 app: use a GtkToolPalette for the grid of tools in the toolbox 2010-05-10 17:30:17 +02:00
Alexia Death 74f907ca33 app: Fix curve application to tilt aspect ratio maping 2010-05-10 00:22:39 +03:00
Alexia Death 4816a61dcb app: Aspect ratio fixes 2010-05-10 00:21:55 +03:00
Alexia Death 0cb1ada818 app: convert aspect ratio to scale_x&scale_y just before matrix transform 2010-05-10 00:11:07 +03:00
Michael Natterer 7549f0fead app: really clip guide and sample point drawing to the exposed region 2010-05-02 16:08:47 +02:00
Michael Natterer 1f8d2e66e1 app: make clip rect and clip region parameters const 2010-05-02 16:06:15 +02:00
Michael Natterer 2a289a75f4 app: don't draw guides which are out of canvas 2010-05-02 16:01:40 +02:00
Michael Natterer 02b8eea086 app: restrict sample point drawing to the exposed region
With the same limitation as for guides in the last commit.
2010-05-02 15:58:51 +02:00
Michael Natterer 6e4be79bef app: restrict grid and guide drawing to the exposed region
Doesn't really clip yet for guide drawing, but at least doesn't bother
to draw them when they are outside the expose region's bounding box.
2010-05-02 15:40:11 +02:00
Michael Natterer fc5775f16f app: remove lots of bounds checks from gimp_display_shell_draw_area()
because we now guarantee to only pass in-image areas to draw.
2010-05-02 13:08:11 +02:00
Michael Natterer 84cf53d908 app: fix artifacts caused by delayed tool drawing
and as a "side effect", speed up rendering the image significantly:

- disable double buffering on the canvas widget.
- implement background clearing ourselves (needed after turning off
  double buffering).
- remove any fiddling with clipping regions on the tool drawing GCs
  and pull the pause/resume code out of the actual image expose
  function.
- if there are overlay widgets on the canvas, implement double
  buffering manually to aviod flicker, but do it in a way that keeps
  pausing/resuming the active tool *outside* the double buffered
  drawing.
2010-05-02 12:12:48 +02:00
Michael Natterer 656e99faf5 app: clean up and simplify gimp_display_shell_canvas_expose() 2010-05-01 18:02:42 +02:00
Michael Natterer 1833a6eaa1 app: honor the exact region when drawing and invalidate overlay children
gimp_overlay_child_expose(): clip drawing to event->region.

gimp_overlay_child_damage(): transform and invalidate event->region's
rectangles individually to avoid redundant invalidations.
2010-05-01 17:45:31 +02:00
Michael Natterer 506469f9f9 app: minor formatting cleanup 2010-04-26 18:52:49 +02:00
Alexia Death 5e1c9d228c app: Fix tool preset editor init 2010-04-24 18:51:42 +03:00
Alexia Death 06c1b290d0 app: Add tool preset editor to controll what elements get applied
I had to remove the asserrt in tool preset constructor, because with it
it wasnt possible to initalize an empty model object for the editor.
At init time the gimp object passed to the constructor is not yet available.
2010-04-24 17:55:54 +03:00
Alexia Death 93ab387fb4 app: add use flags to tool preset 2010-04-24 15:54:35 +03:00
Michael Natterer 8d3a5099f8 app: turn a g_warning() into a g_return_if_fail() 2010-04-22 17:17:02 +02:00
Michael Natterer 5b28d04674 app: queue the draw timeout only if paused_count reaches zero 2010-04-22 17:15:08 +02:00
Michael Natterer 2f5d2bc85f Bug 616342 - gimp crashes on startup if you have a contextrc file from 2.6
Remove the draw timeout in GObject::dispose() to be safe.
2010-04-22 16:45:44 +02:00
Michael Natterer 56e4585f70 app: finally apply tool presets when one is seleced
currently respects the fact that FG/BG are always global and the
global brush,pattern,... settings from gimprc. This should probably
not change, but rather be overridable on a per-preset basis as
suggested.
2010-04-21 20:56:49 +02:00
Michael Natterer 8f813ec52b app: print a warning if a wrong tool is set on a GimpToolOptions object
Use a real g_warning() because this is a programming error. Please
report all warnings.
2010-04-21 20:53:16 +02:00
Michael Natterer 94181ce538 app: don't overwrite all tool options' "tool" and "paint-info"
with bogus values from contextrc, we want them to always match the
tool option's type.
2010-04-21 20:43:27 +02:00
Michael Natterer d47aa2ba52 app: change to the preset's tool when a tool preset is selected
but don't set any tool options yet because that is a lot more tricky.
2010-04-20 20:11:37 +02:00
Michael Natterer bb00c53bf5 app: make sure tool options are created with the right tool set 2010-04-20 20:04:24 +02:00
Michael Natterer c835fad2c9 app: make sure GimpToolOptions always have the right GimpToolInfo set
Override GimpContext's "tool" property and add an evil function that
makes sure we don't set a tool that doesn't match the options. Needed
because tool options are read from disk and thus unreliable per se,
additional we were stupid and wrote wrong tool options to disk.
2010-04-20 20:00:34 +02:00
Michael Natterer 372eabdd48 app: avoid using sealed GtkStatusbar members
Instead keep a pointer to the statusbar's label around in our own
object struct. Also remove conditional compilation based in GTK+
version.
2010-04-20 09:56:59 +02:00
Michael Natterer a2c70822d4 Use accessors from GTK+ 2.20 instead of using sealed members directly 2010-04-19 19:21:07 +02:00
Michael Natterer a0358f7c64 Depend on GLib >= 2.24.0 and GTK+ 2.20.0 2010-04-19 19:03:08 +02:00
Alexia Death f53f73da19 app: Fix a typo in outline transform 2010-04-18 21:20:29 +03:00
Martin Nordholts 39349e0658 app: Remove _for_style in gimp_dockable_new_tab_widget_for_style()
It became reduntant when 'get' was changed to 'new'.
2010-04-18 18:01:14 +02:00
Martin Nordholts d35f4d5db4 app: Clarify GimpDockable tab widget interface
The function gimp_dockable_get_tab_widget() and
gimp_dockable_get_drag_widget are not getters, they create new
widgets. Furthermore, gimp_dockable_get_tab_widget() doesn't use the
instance tab style but takes a tab style paramter. Rename the
functions to gimp_dockable_new_tab_widget_for_style() and
gimp_dockable_new_drag_widget() to reflect this.
2010-04-18 17:42:26 +02:00
Michael Natterer 5c3cf19095 Revert "app: Make drawable updates happen at fixed framerate"
This reverts commit 32aca3c8b6.
Clearly needs more review, thinking and discussion.
2010-04-18 15:03:16 +02:00
Alexia Death 32aca3c8b6 app: Make drawable updates happen at fixed framerate 2010-04-18 15:53:22 +03:00
Michael Natterer 547c92d0f6 Bug 541586 - Tool options not saved/loaded correctly?
Don't overwrite the entire context part of all tool options with
values from contextrc, or we will end up with one tool option set to a
non-default values affecting all other tool options that were at their
default value in the next gimp session.
2010-04-18 12:47:18 +02:00
Michael Natterer aea305be82 app: fix tool preset editor action labels 2010-04-17 14:52:22 +02:00
Michael Natterer 4c4c861aa1 app: make sure GimpToolPreset got the "gimp" construct property passed
and pass a Gimp when creating the preset editor's local model.
2010-04-11 16:18:21 +02:00
Michael Natterer 0f47beff78 app: turn "context" into a CONSTRUCT_ONLY property and assert it being set 2010-04-11 16:17:27 +02:00
Michael Natterer 1c786ae5d4 app: don't forget to free the models of the dynamics and preset editors 2010-04-11 15:54:09 +02:00
Michael Natterer b676a1add0 app: make tool preset loading work
- add "Gimp" property to GimpToolPreset
- implement GimpConfigInterface::deserialize_property() and deserialize
  the "tool-options" locally so we can pass the required "gimp" construct
  property.
2010-04-11 15:43:29 +02:00
Michael Natterer ccf8d1930d app: add missing bits so GimpToolPresetEditor doesn't warn and crash 2010-04-11 13:40:28 +02:00
Michael Natterer caad58d203 app: add a GimpContext parameter to GimpDataLoadFunc 2010-04-11 13:12:41 +02:00
Michael Natterer 4fcf34699f app: flip context and name parameters in GimpDataNewFunc 2010-04-10 19:55:42 +02:00
Alexia Death 78a4cae2d5 app: Rewire the the feature formely known as harndess back to gui as force 2010-04-09 00:44:52 +03:00