Commit Graph

14812 Commits

Author SHA1 Message Date
Martin Nordholts 75259bf4bb app: Call gimp_image_window_session_update() early
Call gimp_image_window_session_update() at the end of
gimp_image_window_constructed() so that if GIMP is closed right after
being started, the image window session info has the widget
initialized (and also so that the correct size is setup initially).
2011-06-04 12:22:20 +02:00
Michael Natterer d27b7a985c app: make gimp_selection_tool_start_edit() much easier to use correctly
- Add a "display" parameter and ignore tool->display
- Require the tool to be inactive, not active when calling it

This exactly matches all its use cases, which is "delegate to
GimpEditSelection tool if we are not doing anything ourselves", and
enables removing all delegate_button_press() functions because they
became one-liners after adapting to this change.
2011-06-03 09:49:40 +02:00
Alexia Death 52cd1b9043 app: share brush modifiers along with the brush or dynamics 2011-06-02 21:17:52 +03:00
Michael Natterer 1bff2c8df2 app: sprinkle const qualifiers in the tool event callback functions 2011-05-31 23:18:11 +02:00
Martin Nordholts bed298be13 app: Remember column width in multi-column dock windows 2011-05-31 23:15:39 +02:00
Martin Nordholts 981546c02e app/tests: Make sessionrc-2-6 more realistic
GIMP 2.6 session files can't have many docks in a dock window, so
remove that from the GIMP 2.6 session file we use for compatibility
testing. Also remove the "gimp-single-image-window" entry.

The downside is that we need a separate 'expected'-file, but we need
to live with that.
2011-05-31 23:15:38 +02:00
Martin Nordholts b4ed281f9a app: Call gimp_session_info_aux_set_list() generically
gimp_session_info_aux_set_list() is not a per-GimpDialogRestoreFunc
thing.
2011-05-31 23:15:38 +02:00
Martin Nordholts 6fc587c643 app: Add GimpSessionManaged
Add a GimpSessionManaged interface to generalize
gimp_session_info_aux_get_list() and gimp_session_info_aux_set_list().
2011-05-31 23:15:14 +02:00
Michael Natterer da18c1114b app: gimpdisplayshell-tool-events.c: move Tab handling to a utility function
instead of having separate utility functions for the different
functions triggered by various Tab combinations.
2011-05-31 09:24:14 +02:00
Michael Natterer 8e5f18fb9e app: make Alt+Tab and Alt+Shift+Tab cycle through all open displays
in both multi- and single-window mode. This is useful especially in
multi-window mode because in single-window we can already cycle
through all tabs with Ctrl+PageUp/Down.
2011-05-30 23:46:50 +02:00
Michael Natterer edad544e73 app: don't redundantly check for (foo && GIMP_IS_FOO (foo)) in GimpSessionInfo 2011-05-30 23:39:39 +02:00
Martin Nordholts 10aa3921a0 app: Rememeber if image windows are opened
Rememeber if image windows are opened because we want the
gimp_session_info_restore() code to run for the single-image window
once that code is in place.
2011-05-28 16:18:34 +02:00
Martin Nordholts a456a70bfd app/tests: Add test for gimp_session_info_read_geometry() fix
Add regression test for "app: Give configure event info to
gimp_session_info_read_geometry()", commit
93fd257c52, which fails without that fix
being present.
2011-05-27 22:34:24 +02:00
Martin Nordholts 93fd257c52 app: Give configure event info to gimp_session_info_read_geometry()
When we get to gimp_dialog_factory_dialog_configure() and do
gimp_session_info_read_geometry(), the window geometry has not yet
been updated, i.e. gimp_session_info_read_geometry() gives the session
info the size of the *previous* configure event.

Solve this by giving gimp_session_info_read_geometry() the configure
event so it can use that size when availble.

If we don't do this change, then we get bogus values of the size of
image window when repeatedly switching between single- and
multi-window mode.
2011-05-27 22:33:55 +02:00
Martin Nordholts cd72389404 app/tests: Add '/gimp-ui/close_image'
Add '/gimp-ui/close_image', mainly so that we can do tests that
becomes much harder if there is an image around.
2011-05-27 22:33:55 +02:00
Martin Nordholts 2095c9307b app/tests: Fix typo in gimp-app-test-utils.c 2011-05-27 22:33:54 +02:00
Martin Nordholts 396d5fd5e8 app: Add a 'restore_func' to GimpDialogFactoryEntry
In gimp_session_info_restore() there is code to create a dialog from a
session info. GimpSessionInfo lives in the widgets module. Thus we
can't add restoration code that depends on a higher level module. In
particular, we can't add code to restore docks in an GimpImageWindow
since GimpImageWindow lives in the display module. And we need such
code to be able to restore a single-window mode session.

Since dialogs are defined in the dialogs module, it makes sense to
also have the code that restores a dialog in that module.

So, add a 'restore_func' member to GimpRestoreDialogFunc of type
GimpRestoreDialogFunc and move the code there.
2011-05-27 21:55:41 +02:00
Massimo Valentini ddf09b3a36 Fixes two minor issues when builddir != srcdir 2011-05-26 20:17:21 +02:00
Massimo Valentini 71bedb0ccd app: clear current path from the context after copying it
otherwise the first time it is drawn twice.
2011-05-26 20:17:21 +02:00
Massimo Valentini 1371602383 app: call cairo_surface_flush before drawing directly 2011-05-26 20:17:08 +02:00
Michael Natterer 92e3b5532f app: update the color picker tool's dialog properly
Set its shell to the shell the user clicked on, so raising it won't
implicitly raise its old shell (which is very evil). Set its viewable
to the active drawable so it shows the right preview.
2011-05-25 23:03:16 +02:00
Michael Natterer a6a6dd880a app: use hline/vline utility functions in GimpCanvasRectangleGuides 2011-05-25 10:23:02 +02:00
Michael Muré 0d510bfa23 fix a typo in cage tool 2011-05-24 23:35:28 +02:00
Michael Natterer c1c20e4c38 app: fix GimpCanvasRectangleGuides' extents 2011-05-24 20:49:49 +02:00
massimo v ef15fd8623 app: remove deprecated gtk_range_set_update_policy 2011-05-24 20:46:31 +02:00
massimo v 63cc68561a app: SIOX memory leaks 2011-05-24 20:46:31 +02:00
Michael Natterer 6c85014473 app: gimpalignoptions.c: fix typo s/distrubution/distribution/ 2011-05-24 20:11:34 +02:00
Michael Natterer 4e6f43a890 app: add new item class GimpCanvasRectangleGuides and use it
Removes a lot of code from the rectangle tool and fixes off-by-one
drawing problems because in image coordinates, lines can't be aligned
correctly with rectangles.
2011-05-22 22:09:09 +02:00
Michael Natterer 6b34f79e51 app: gimp_rectangle_tool_draw(): lose "pub_" from local rectangle variables
to improve readability.
2011-05-22 17:54:29 +02:00
Michael Natterer 2f51c8afd4 app: GimpRectangleToolPrivate: don't keep a copy of the guides type around
It was needed only for XOR drawing.
2011-05-20 19:48:11 +02:00
Michael Natterer 0dcdfe9e80 app: move enum GimpRectangleGuide from tools/ to display/
and rename it to enum GimpGuidesType.
2011-05-20 19:41:48 +02:00
Michael Natterer da380504bf app: don't call gimp_tool_control_halt() in gimp_rectangle_tool_halt()
It's not the rectangle tool's business to manage press/motion/release
cycles. Fixes warnings in the crop tool.
2011-05-20 19:15:31 +02:00
Michael Natterer 9aae53802f app: s/filepath/filename/ in order to avoid introducing new terminology 2011-05-20 19:06:57 +02:00
Martin Nordholts 9325120291 app/tests: Distribute new session files 2011-05-20 18:19:56 +02:00
Martin Nordholts 2d5ffd4f2e app: Add the concept of 'side' of a dock
Add GimpDockContainer::get_dock_side() and write that info in the
sessionrc file. In single-window mode, a dock can be either on the
left or right side of the image window. In a dock window however, the
side concept doesn't apply ('side' has nothing to do with what column
a dock is in in a GimpDockColumns)
2011-05-19 20:57:40 +02:00
Martin Nordholts 87e69d2312 app/tests: Add test for GIMP 2.8 multi window session files
Move code in test-session-management.c to a common place so we can
have several variants of session management tests. We can't easily run
all session management tests in a single process, because some parts
of Gimp (the GObject) initialization eeks if done twice in the same
process.

Rename test-session-management.c to test-session-2-6-compatibility.c
and create a new test for GIMP 2.8 multi-window mode session files,
namely test-session-2-8-compatibility-multi-window.c. Copy and rename
sessionrc files accordingly.
2011-05-18 21:30:04 +02:00
Martin Nordholts 4121ac3738 app: Use GLib test framework in test-session-management.c
Use GLib test framework in test-session-management.c. Also rename the
test to 'session_2_6_compatibility'.
2011-05-18 21:11:07 +02:00
Martin Nordholts e255998775 app/tests: Expose gimp_test_utils_set_env_to_subpath() 2011-05-18 21:11:07 +02:00
Martin Nordholts 091360fac4 app: For testing, support to override names of "sessionrc" and "dockrc"
Allow tests to specify specific sessionrc and dockrc files to use, so
they can share other files in the testing gimpdirc.
2011-05-18 21:11:07 +02:00
Massimo Valentini 3efa2062c5 Bug 650426 - Missing call to cairo_surface_flush
app: before drawing directly on the surface.
2011-05-18 08:41:10 +02:00
Michael Natterer 3e51484b18 app: fix off-by-one x2,y2 in gimp_rectangle_tool_draw_guides()
the 1.0 was subtracted explicitly, I have no clue why but the reason
for it is obviously gone.
2011-05-17 23:18:19 +02:00
Michael Natterer a75a9d9469 app: when opening an image, don't unref it if no display could be created
we normally do this because the initial display takes ownership of the
newly created image, but in no-interface mode we would simply unref
the image away, which is bad.
2011-05-17 14:55:57 +02:00
Michael Natterer cebd34293c app: don't populate the tool preset factory with data in no-interface mode
but keep the factory around anyway so the code stays simple.
2011-05-17 14:54:40 +02:00
Michael Natterer ab0b88b5db app: replace the last GtkObject members by GtkAdjustment
Also get rid of some unneeded GTK_ADJUSTMENT() casts and replace some
local GtkObject veriables by GtkAdjustment.
2011-05-15 17:00:41 +02:00
Michael Natterer 5642297109 app: fix PDB parameter type mapping for GIMP_TYPE_ITEM_ID
and return GIMP_PDB_ITEM for GIMP_TYPE_ITEM_ID.
2011-05-15 01:47:21 +02:00
Martin Nordholts cf4a4bf5a6 app: Make gimp_session_info_dock_restore() take a GimpDockContainer 2011-05-13 21:25:39 +02:00
Martin Nordholts 7edf717bae app: Add image_window boolean to GimpDialogFactoryEntry
Add image_window boolean to GimpDialogFactoryEntry and rename
FOREIGN_NOT_HIDEABLE() to IMAGE_WINDOW(). We need to treat image
windows a bit special when we restore a single-window mode session.
2011-05-13 21:25:39 +02:00
Martin Nordholts 0f19471e22 app: Make GimpDockContainer::get_docks() return a new list
Make GimpDockContainer::get_docks() return a new list and not just a
pointer to a list so that GimpImageWindow can implement it (who needs
to merge its two GimpDockColumns lists).
2011-05-13 21:04:23 +02:00
Martin Nordholts 00c2d15a3a app: Add GimpDockContainer::add_dock()
Add GimpDockContainer::add_dock() and use it in
gimp_session_info_dock_restore().
2011-05-13 21:04:23 +02:00
Martin Nordholts ab1b50ad4a app: Add GimpDockContainer::get_ui_manager()
Add GimpDockContainer::get_ui_manager() and make GimpDockWindow
implement it. Primary client is session restoration code.
2011-05-13 18:56:41 +02:00
Michael Natterer 896e29c5f1 app: gimp_session_info_dock_restore(): remove empty dockbooks after restoring
so we don't end up with empty windows if restoring all dockables in
the dock failed.
2011-05-12 21:23:07 +02:00
Michael Natterer 6bf7f7e429 app: ref the session info in gimp_dialog_factory_add_session_info()
and unref it in the callers after adding it. That's the proper way of
doing it and fixes another warning when restoring a dock fails.
2011-05-12 21:23:07 +02:00
Michael Natterer 9e60dd547d app: keep a ref to the session info in gimp_session_info_restore()
because failing to restore a dock can destroy the newly created dock
and implicitly unref the session info.
2011-05-12 21:23:06 +02:00
Michael Natterer 68a56a861e app: gimp_session_info_book_restore(): don't set a non-existing current page
Don't set the first page of the restored dockbook active if there are
less than two pages. Also add a comment that explains why we return
the dockbook even though we know that all its dockables failed to
restore.
2011-05-12 21:23:06 +02:00
Michael Natterer 80cf95319e app: gimp_session_info_dockable_restore(): don't return existing singletons
Instead, return NULL. The singleton dockable can't be restored in this
dock because it's already open in another dock.
2011-05-12 21:23:06 +02:00
Martin Nordholts c70dc8f86d app: Add NULL check in gimp_dock_container_get_docks() 2011-05-12 06:51:40 +02:00
Mikael Magnusson 80e18bdee0 app: Fix tooltip for "Use editor" checkbox 2011-05-11 22:09:21 +02:00
Michael Natterer 3184c0f339 app: use g_object_bind_property() to set sensitivity here too 2011-05-11 11:43:19 +02:00
Martin Nordholts 6d421f9d4d app: Add and use gimp_session_info_get_info_with_widget()
Add and use helper function
gimp_session_info_get_info_with_widget(). Might need it for
GimpImageWindow later...
2011-05-09 19:55:51 +02:00
Martin Nordholts 4b9243fc60 app: Make GimpDockWindow implement GimpDockContainer
Make GimpDockWindow implement the GimpDockContainer interface. The
plan is to make GimpImageWindow also implement the GimpDockContainer
interface when we start to session manage docks in single-window mode.
2011-05-09 19:55:51 +02:00
Martin Nordholts 2287b6e008 app: Add a GimpDockContainer interface
We now have to classes that contain docks, GimpDockWindow and
GimpImageWindow (in single-window mode). Introduce a GimpDockContainer
interface so we can cope with these in an abstract way.
2011-05-09 19:43:28 +02:00
Martin Nordholts 1d12dc8e86 app: Sort widgets/widgets-types.h 2011-05-09 18:37:40 +02:00
Michael Natterer e91890f659 app: always use the first display's image window as single-window
so the tabs are in the order of the global display list which is the
order of the image menu items and their ALT+number shortcuts.
2011-05-08 21:41:06 +02:00
Michael Natterer 3b71b71c4c app: always add ALT+number accelerators to the image window menu items
There is no reason why we should have them only in single-window-mode.
The accels are numbered in the order the displays are opened, which is
also the order they appear in the menu. The only thing that needs to
be taken care of is that switching to SWM swallows the image windows
into the single window in the right order. Fixes bug #647524.
2011-05-08 00:00:55 +02:00
Michael Natterer 1ebd2b5113 Revert "app: Make alt+[number] switch tabs in single-window mode"
This reverts commit 110b3daa97.
2011-05-07 23:54:54 +02:00
Michael Natterer d7b8f8e81f app: formatting in gimpdisplayshell-selection.c 2011-05-07 22:33:05 +02:00
Mukund Sivaraman 24ac01bfa9 app: Fix corruption while in use of imported uri 2011-05-07 05:52:31 +05:30
Mikael Magnusson a4cf150191 Bug 649610 - Gimp does not initialize as long as the splash screen is not mapped
app: don't use gtk_widget_show_now as that blocks until the window maps.
2011-05-07 00:14:59 +02:00
Martin Nordholts dfc11599d1 app: Small --dump-pdb-procedures-deprecated cleanup 2011-05-06 07:29:01 +02:00
Martin Nordholts d9264c6bd5 app/tests: Fixup test-gimpidtable.c
Fixup of test-gimpidtable.c of things sleepy eyes and brains missed.
2011-05-06 07:23:16 +02:00
Michael Natterer b77b94d3ed app: don't rely on gimp_brush_tool_create_outline() returning an outline
It can just as well return NULL.
2011-05-05 12:19:25 +02:00
Martin Nordholts ed01101429 app: Add hidden --dump-pdb-procedures-deprecated option
Allow to dump the names of all internal deprecated PDB
procedures. This enables us to do static analysis on *.scm files and
look for usage of deprecated procedures.
2011-05-05 01:01:17 +02:00
Martin Nordholts 3474a385f2 app: Add gimp_pdb_get_deprecated_procedures() 2011-05-05 01:01:17 +02:00
Martin Nordholts be91f01291 app: Add gimp_procedure_name_compare() 2011-05-05 01:01:17 +02:00
Michael Natterer 91550117c7 app: fix GimpSourceTool's source position drawing for other displays
by adding the source outline's canvas item to the source display
directly. Poking in GimpDrawTool internals is gone and generally not
possible any longer since GimpCanvasItem based drawing.
2011-05-04 23:25:55 +02:00
Martin Nordholts c4097d4ff4 app: void * -> gpointer in GimpIdTable 2011-05-04 23:14:21 +02:00
Martin Nordholts 0d529f7956 app: Use GimpIdTable 2011-05-04 22:54:35 +02:00
Martin Nordholts 9fefa22efe app: Add GimpIdTable utility class
Not written in Vala... ;)
2011-05-04 22:54:35 +02:00
Michael Natterer 85c0fd1166 app: replace gimp_dock_get_dock_columns() by gtk_widget_get_ancestor() 2011-05-04 22:41:40 +02:00
Michael Muré 989b85988b Cage tool: allow to add handle by clicking on an edge 2011-05-03 00:46:42 +02:00
Michael Muré cc247b3e66 Cage tool: in cage mode, remove selected handles when hitting backspace 2011-05-03 00:46:42 +02:00
Michael Muré bcd76a3d5b GimpCageConfig: add function to remove all selected points 2011-05-03 00:46:42 +02:00
Michael Muré b0cedaa677 GimpCageConfig: add function to add and remove point at arbitrary index 2011-05-03 00:46:42 +02:00
Michael Natterer 909e7833a3 app: remove some more -Wunused-but-set-variable 2011-05-02 13:53:58 +02:00
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer 092e26935b app: GimpForegroundSelectToolUndo: shorten local variable names 2011-05-01 23:19:49 +02:00
Michael Natterer 99df9e114e app: GimpCanvasLayerBoundary: actually use the figured "edit_mask" boolean
instead of always passing FALSE when changing to a different
layer. For some reason we were displaying the right state anyway,
which can only mean that we do things redundantly here and call this
function twice.
2011-05-01 22:36:25 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 2af539020b app: don't include individual files from libgimp* 2011-04-28 14:23:33 +02:00
Michael Natterer 81911a7b02 app: allow to drop buffers and components to empty displays
and simply create new images from them.
2011-04-28 01:59:38 +02:00
Michael Natterer 10b4155b95 app: never make Edit -> Buffers -> Paste Named insensitive
because it simply opens the buffers dockable, which is always
possible.
2011-04-28 01:56:37 +02:00
Michael Natterer 69d3aa5b36 Bug 648820 - drag and drop grayscale/greyscale image causes image corruption
gimp_display_shell_drop_pixbuf(): use the image's type to create the
layer, not the dropped pixbuf's.
2011-04-28 01:44:48 +02:00
Michael Natterer 92ce59e1c1 app: gimp_layer_new_from_pixbuf(): refuse to create layers of wrong type 2011-04-28 01:27:04 +02:00
Martin Nordholts e75cfd044a app: Sort core/.gitignore 2011-04-25 16:08:15 +02:00
Mukund Sivaraman cdb66ccbdc app: Reformat dirty protos 2011-04-25 19:19:25 +05:30
Mukund Sivaraman 54e2d5fb68 app: Use a properly typed callback function
This fixes a compiler warning with the typeless proto arg.
2011-04-25 19:16:28 +05:30
Mukund Sivaraman 10b37cbcaa app: Remove unused variables 2011-04-25 19:10:04 +05:30
Martin Nordholts 4988a97257 app: Add gimp_dock_set_id() 2011-04-21 19:57:14 +02:00
Martin Nordholts c84d26667b app: Add missing gimp_dock_get_id() implementation 2011-04-21 18:59:12 +02:00
Martin Nordholts f75f61779c app: GimpSessionInfoDock::identifier -> dock_type
Rename GimpSessionInfoDock::identifier to dock_type, because it isn't
really an identifier; there might be several instance with dock_type
being "gimp-dock". This is a preparation for adding an actual
'identifier' member.
2011-04-21 18:59:12 +02:00
Alexandre Prokoudine b18d638000 More tooltips for tools options
Added previously missing tooltips for transformation tools, Flip tool,
text tool and Bucket Fill tool.
2011-04-21 15:28:05 +04:00
Mukund Sivaraman aaea0805e1 app: Initialize orig_tiles to NULL for GIMP_TRANSFORM_TYPE_PATH case 2011-04-21 14:08:36 +05:30
Alexandre Prokoudine 58016e0a02 More tooltips for tools options
Added previously missing tooltips for options of the following tools:
Scissors Select tool, Foreground Select tool, Color Picker tool,
Zoom tool, Measurement tool, Align tool, Crop tool.

Changed a bunch of _() to N_() in Foreground Select tool's options
as per agreement with mitch.
2011-04-21 02:41:59 +04:00
Michael Natterer 27d312b110 app: call gimp_tool_control_halt() early in transform_tool_button_release()
The generic shutdown triggered by shift-click executing copes with an
already halted tool, but we don't want to add checks to tons of
button_release functions.
2011-04-20 22:22:11 +02:00
Alexandre Prokoudine c5b44f6bd0 More tooltips for tools options
Added previously missing tooltips for rectangular and region
selection based tools.
2011-04-21 00:17:31 +04:00
Alexia Death 2068498b5c app: fix a bug with smooth affecting spacing 2011-04-20 22:03:49 +03:00
Alexandre Prokoudine 316c9fdd45 Reworded the Increment's tooltip
The tooltip for Increment option has a better wording now
at Alexia's suggestion.
2011-04-20 22:47:54 +04:00
Alexandre Prokoudine 3eee39c8fb Terminology fixes and missing tooltips
Options of brush-based tools now have clearer names,
and the options themselves now have tooltips that
had been missing.
2011-04-20 22:24:19 +04:00
Michael Natterer 4a8fa1ab2a app: make GimpSpinScale RTL aware 2011-04-20 20:12:21 +02:00
Michael Muré 5d771014d4 GimpCageConfig: use a GArray to store cage's point, to make easier
further improvement
2011-04-20 18:50:17 +02:00
Alexandre Prokoudine ae2ab1ff3b Fixed a typo
The brush editor used to say "Spahe" instead of "Shape".
2011-04-20 13:20:42 +04:00
Michael Natterer 3edf0cb531 app: GimpSpinScale: don't create two cairo_t in expose() 2011-04-20 00:43:30 +02:00
Michael Natterer 3bf15d32e6 app: use GimpSpinScales in GimpBrushEditor 2011-04-18 22:27:43 +02:00
Alexia Death 4d438a89de app: restore brush size scale silder visible range to 1000 2011-04-18 22:56:45 +03:00
Michael Natterer 85509f4ffb app: GimpScaleComboBox: don't derive from GtkComboBoxEntry
because it's deprecated. Derive from GtkComboBox directly, use the
"has-entry" property and move the setup code from init() to
constructed().
2011-04-18 21:49:23 +02:00
Michael Natterer 4d3e6b062d app: limit the paint options' fade length scale to 1000 2011-04-18 21:35:41 +02:00
Michael Natterer 6dd463fb02 app: gimp_spin_scale_change_value(): remove "+ lower" from step calculation
It was never noticed because lower is 0.0 or 1.0 in all use cases.
2011-04-18 21:21:45 +02:00
Michael Natterer 6a3fe9f9c5 app: restore the original brush size upper limit of 10000
but restrict the tool options sclae to 500.
2011-04-18 21:10:47 +02:00
Michael Natterer bfcecd2ef0 app: GimpBrushFactoryView: use a GimpSpinScale for spacing
and use the new scale_limits API to restrict the scale to 1..200 while
the actual range is 1..5000.
2011-04-18 21:04:05 +02:00
Michael Natterer d300ec6556 app: add a "scale_limit" API to GimpSpinScale
which allows to restrict the scale to a range that is smaller than
that of the model GtkAdjustment. This way we can enter large values in
the entry or by dragging beyond the end of the scale, but keep a
reasonably usable scale range for "normal" values.
2011-04-18 21:01:48 +02:00
Michael Natterer bc56060148 app: GimpLayerTreeView: use a GimpSpinScale for opacity 2011-04-18 20:41:02 +02:00
Michael Natterer 26d50b533b app: gimp_item_tree_view_add_options(): allow NULL labels
and pack the options widget into the vbox directly.
2011-04-18 20:40:10 +02:00
Michael Natterer 5b14564d8e app: GimpMotionBuffer: remove empty constructed()
and move buffer destruction from dispose() to finalize().
2011-04-18 15:54:03 +02:00
Michael Natterer 534b48cb0d app: add gimp_motion_buffer_get_last_motion_time() and use it
The last poking into the buffer is gone now.
2011-04-18 13:13:51 +02:00
Michael Natterer d305d000ff app: struct GimpMotionBufferClass: parent_class had the wrong type 2011-04-18 11:35:51 +02:00
Michael Natterer e028195cf3 app: rename process_stroke() and process_hover() to request_foo()
Because that's what we are doing by calling the functions: requesting
the emission of "stroke" and "hover" signals.
2011-04-18 11:32:10 +02:00
Michael Natterer 3fbbb9b333 app: GimpMotionBuffer API cleanup and refactoring
- start_stroke()/finih_stroke() -> begin_stroke()/end_stroke()
- process_event_queue() -> process_stroke()
- GimpMotionBuffer::motion() -> GimpMotionBuffer::stroke()
- add GimpMotionBuffer::hover() and process_hover()
- remove push_event_history() and pop_event_queue() from API

The thing works like this:

- Motion events are continuously fed into the buffer using motion_event()
- begin_stroke()/end_stroke() correspond to BUTTON_PRESS/BUTTON_RELEASE,
  the period between them is a "stroke"
- If motion_event() returns TRUE, we request "stroke" signals by calling
  process_stroke() and "hover" signals by calling process_hover()
2011-04-18 11:08:24 +02:00
Michael Natterer d62cf65030 app: rename gimp_motion_buffer_eval_event() to motion_event()
because it's feeding it motion events.
2011-04-18 01:09:57 +02:00
Michael Natterer 6f865eda2b app: add start_stroke() and finish_stroke() API to GimpMotionBuffer
where finish_stroke() is the former flush_event_queue() and
start_stroke() is used in BUTTON_PRESS instead of poking into the
motion buffer's internals. Also, call finish_stroke() also when the
tool is not active, so the event buffer is flushed (the "motion"
callback will ignore the events if the tool is not active).
2011-04-18 00:35:20 +02:00
Michael Natterer 99f5dc9f18 app: move GimpCagePoint from core-types.h to gegl/
and remove the orphaned GimpCagePreview typedef from gimp-gegl-types.h.
2011-04-18 00:09:06 +02:00
Michael Natterer 6a1b93be1c app: don't include "libgimpmath/gimpvectors.h" in any header
It's types are generally known because it's already included
in core-types.h.
2011-04-17 23:44:45 +02:00
Michael Natterer e3b1ed7728 app: remove the timeout in GObject::dispose() 2011-04-17 22:00:18 +02:00
Michael Natterer e822fb0d95 app: separate the queue flushing function from the timeout function
and add g_return_if_fail() to all public functions.
2011-04-17 21:58:03 +02:00
Michael Natterer 334e4c5d71 app: move process_event_queue() and flush_event_queue() to GimpMotionBuffer
and emit the buffer's "motion" signal when a motion is supposed
to happen. In GimpDisplayShell, connect to GimpMotionBuffer::motion()
and call the tool.
2011-04-17 21:46:29 +02:00
Michael Natterer d784ca0a59 app: don't PAUSE/RESUME the active tool around sending it motion events
That's most likely a very old artifact that was needed not even when
we used to do XOR, and these days it's even wrong because it makes
the tools think that something about the display has changed, like
zoom or scroll.
2011-04-17 21:12:02 +02:00
Michael Natterer 9f61a7d2a1 app: siplify gimp_display_shell_process_event_queue()
by using gimp_motion_buffer_pop_event_queue() here too.
2011-04-17 20:43:55 +02:00
Michael Natterer fae0589767 app: minor cleanup gimp_motion_buffer_eval_event(), no logic change 2011-04-17 20:27:54 +02:00
Michael Natterer bb3eac557d app: add gimp_motion_buffer_pop_event_queue() and use it
instead of accessing and removing the queue's first element menually.
2011-04-17 20:20:18 +02:00
Michael Natterer aa7c31b802 app: s/gdouble inertia_factor/gboolean event_fill/ in eval_event()
Also remove "gdouble max_coord_smooth" from GimpTool and simply use
the existing motion mode for deciding whether or not to fill in
events.
2011-04-17 19:59:31 +02:00
Michael Natterer 41b469fcf5 app: gimp_motion_buffer_eval_event(): always set last_read_motion_time
We need it for correctly requesting device history, so we must
remember it also when returning FALSE and ignoring the event.
2011-04-17 19:34:02 +02:00
Michael Natterer 7ab72eb54a app: flush the event queue unconditionally on BUTTON_RELEASE
The flashing function checks for a non-empty queue by itself. Also
remove the timeout source explicitly in flush_event_queue() because it
might be called directly, and its FALSE return value has no effect on
the timeout source in that case.
2011-04-17 19:21:46 +02:00
Michael Natterer 2dbaf7f490 app: set "last_read_motion_time" in gimp_motion_buffer_eval_event()
because it is called whenever we process a newly received event.
2011-04-17 19:05:49 +02:00
Michael Natterer e09520fb08 app: add GimpMotionBuffer class to swallow all the event smoothing code
This commit only adds the class and removes the members from
GimpDisplayShell, so everything looks more ugly than before, but
I wanted the member moving separate from any refactorings.
2011-04-17 18:53:42 +02:00
Kevin Cozens 139fb874a3 Fixed grammatical error in help text for gimp-context-set-feather-radius 2011-04-16 15:00:29 -04:00
Michael Natterer b04c6889ac app: remove the STRICT_TOOL_CHECKS define and ifdefs
Tools behave more predictably than before already, and whatever
remaining warnings will be sorted out before 2.8.
2011-04-16 20:21:52 +02:00
Michael Natterer f0a52f1db9 Bug 646316 - Hinting change to medium on first edit of text field
gimp_text_set_property(): Deserialize the compat "hinting" property
only if the new "hint-style" one has its default value, so we don't
overwrite a serialized new "hint-style" with a compat "hinting" that
is only there for old GIMP versions.
2011-04-16 15:17:22 +02:00
Mikael Magnusson 854dd5b6ad app: correct cast for spinbutton 2011-04-16 11:52:49 +02:00
Michael Natterer 924d647284 app: set GimpSpinScale to numeric-only input
It's the right thing to do, but also works around focus issues in SWM,
at least while the widget has the focus.
2011-04-16 02:09:37 +02:00
Mikael Magnusson bebccfc95a Bug 647897 - Marching ants only visible in single window mode
Use gdk_window_create_similar_surface instead of gdk_cairo_create in
selection_render_mask, as the latter is not entirely correct to use
outside the expose handler and may have some unwanted clipping state.
2011-04-16 01:36:32 +02:00
Michael Natterer ede0d26b91 app: gimp_data_create_filename(): avoid evil characters in the filename
such as forbidden ones on various platforms. List collected on #gimp
with a fair portion of paranoia involved.
2011-04-13 21:25:10 +02:00
Michael Natterer 846cc27207 app: implement begin_use()/end_use() in GimpBrushPipe
and call it on all the pipe's sub-brushes
2011-04-12 13:59:39 +02:00
Michael Natterer 5a4a741936 app: virtualize GimpBrush::begin_use() and ::end_use() 2011-04-12 13:59:04 +02:00
Michael Natterer 391c74899c app: rename gimp_brush_start_use() to gimp_brush_begin_use() 2011-04-12 09:06:22 +02:00
Michael Natterer 7e6c026790 Globally use GDK_KEY_foo, remove the compat defines from widgets-enums.h 2011-04-11 23:43:03 +02:00
Michael Natterer f7646fd171 app: gimpdrawable-stroke.c: don't try to fill a dot or a line 2011-04-10 22:43:03 +02:00
Michael Natterer 0f91a11b75 app: use GimpBezierDesc in gimp_channel_select_vectors() too 2011-04-10 22:42:39 +02:00
Michael Natterer f316269f71 app: stroke vectors by gimp_vectors_get_bezier(); gimp_scan_convert_add_bezier() 2011-04-10 19:40:40 +02:00
Michael Natterer bb9efebbaf app: use the new GimpBezierDesc APIs for stroking a selection
instead of iterating the BoundSegs menually.
2011-04-10 19:19:43 +02:00
Michael Natterer 8c3698eccc app: add gimp_bezier_desc_translate() which translates all points
Also add back an internal "gboolean closed" parameter which I removed
when copying the function, it might be useful later and doesn't hurt.
2011-04-10 19:16:31 +02:00
Michael Natterer 1a4ffb3d21 app: add gimp_scan_convert_add_bezier() which adds a GimpBezierDesc
Also remove unused member num_nodes.
2011-04-10 19:07:04 +02:00
Michael Natterer fde934ac58 app: s/GdkRectangle/cairo_rectangle_int_t/ in all GimpCanvasItems 2011-04-10 18:15:16 +02:00
Martin Nordholts a4aa6add43 app/tests: Assert on existance of files before trying to open them
Assert on existance of files before trying to open them so that that
reason for failure becomes clear when that is the cause.
2011-04-10 12:12:15 +02:00
Martin Nordholts 27ac2a3c38 app: Make GimpEditor instance members private 2011-04-10 12:12:01 +02:00
Michael Natterer b75b7de064 app: fix drawing artifacts in GimpCanvasRectangle
The width/height returned by gimp_canvas_rectangle_transform() were
off-by-one if the rectangle's width/height were exactly 0.0 and its
x/y exact integers, causing too much drawing and/or too little
invalidation.
2011-04-10 03:46:02 +02:00
Michael Natterer cad5c1e2fb app: indentation in GimpCanvasArc 2011-04-10 03:44:49 +02:00
Michael Natterer 30a45c05e4 app: turn double buffering off/on when filling/emptying the display
instead of turning it off unconditionally in gimp_canvas_init(), so we
have full control over buffering when we are rendering images, but let
GTK+ handle a flicker-free wilber itself.
2011-04-09 23:17:16 +02:00
Michael Natterer 1a9434cef1 app: set the rulers as track widgets for each other
so we don't end up with one ruler wrongly being stuck a few pixels off
while we are hovering the other.
2011-04-09 21:04:40 +02:00
Michael Natterer d52157b565 Bug 647235 - app/widgets/gimpcairo-wilber.c parses path data every time
Applied patch from Juan Pablo Ugarte which keeps Wilber's cairo_path_t
around instead of parsing the SVG data each time.
2011-04-09 08:30:23 +02:00
Michael Natterer 3ab59f1bff app: don't try to add a NULL boundary to GimpBrush's boundary cache 2011-04-08 21:22:55 +02:00
Michael Natterer 6e65d1a392 app: coding styls cleanup in core/gimpbrush-transform.[ch] 2011-04-08 21:18:39 +02:00
Michael Natterer 5562f840b6 Bug 646718 - gimp_curve_set_curve: assertion `y >= 0 && y <= 1.0' failed
CLAMP(value, 0.0, 1.0) in one more place. The calculation does
look correct, but we are probably running into floating point
inaccuracies.
2011-04-08 20:53:17 +02:00
Mikael Magnusson 71541db52d app: Make scale timer output depend on GIMP_UNSTABLE 2011-04-08 14:04:36 +02:00
Mikael Magnusson 61476aa20a Remove two stray semicolons making if bodies always run 2011-04-08 13:20:37 +02:00
Michael Natterer cabb6ab4d9 app: add the GdkPixbuf and Cairo versions to the output of "gimp -v" 2011-04-08 12:30:50 +02:00
Martin Nordholts a5204631f3 app/tests: Use plug-ins from build dir, in particular file-png
Use a selected set of plug-ins from the build dir rather than the
install dir. In particular 'file-png' for the
'/gimp-save-and-export/imported_file_uris' test. We might need to use
other plug-ins from the build dir as well later, but for the ones from
'plug-ins/common' is enough.
2011-04-08 08:50:59 +02:00
Martin Nordholts 5f48111af9 app: Support using plug-ins from build dir
When we run our tests we want to use plug-ins from the build dir so
the tests can pass also when no make install have been made.

Use the environment variables GIMP_TESTING_PLUGINDIRS and
GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES for this.
2011-04-08 08:50:59 +02:00
Kevin Cozens bf1eca22a6 Added PDB procedure gimp-context-set-defaults to reset context settings 2011-04-07 22:43:37 -04:00
Kevin Cozens 0d617dabea Fixed a typo (prodecure -> procedure) 2011-04-07 22:43:37 -04:00
Michael Natterer fcbc5eebeb app: add an edit button the the tool options' brush etc. selectors
which makes getting to the editor dialogs much easier.
2011-04-07 23:48:08 +02:00
Michael Natterer 4a73ac6869 app: add a newline 2011-04-07 23:47:27 +02:00
Martin Nordholts 6b5e495841 app: Remove comments about cachelines in GimpDisplayShell
Remove comments about cachelines in GimpDisplayShell that no one cares
about in 2011.
2011-04-07 07:12:32 +02:00
Martin Nordholts 3b243bdcfe app: Add gimp_display_get_action_name() utility function 2011-04-07 07:12:32 +02:00
Mikael Magnusson b00cb3be79 Remove stray semicolon 2011-04-06 23:40:56 +02:00
Mikael Magnusson ac403ce11d Add a controller for binding mouse buttons 2011-04-06 23:35:14 +02:00
Michael Natterer 7fae1b3c50 app: update the tool's state after the wheel controller has handled the event 2011-04-06 22:50:20 +02:00
Michael Natterer febc1da4be app: ignore button 1 release if we have no pointer grab
which is more correct than the previous commit
2011-04-06 22:44:08 +02:00
Michael Natterer 14d30fd795 app: ignore button releases while another button's action is going on
- ignore button 1 release if we are button-2-scrolling
- ignore button 2 release if we are not button-2-scrolling
2011-04-06 22:30:44 +02:00
Michael Natterer 754d45c357 app: completely ignore focus change events while we have a grab
in order to be safe against whatever windowing system / event manager
depending event order. Also properly update the tool's state after a
button reelease, and after a space release.
2011-04-06 21:37:46 +02:00
Martin Nordholts 18286d29ec app/tests: Use gdk_window_get_display()
Use gdk_window_get_display() (available since GTK+ 2.24 which we now
depend on) and not gdk_drawable_get_display(), which is deprecated.
2011-04-06 21:05:24 +02:00
Michael Natterer cb6b821c70 app: tool_manager: correctly preserve tool state across a push/pop
tool_manager_select_tool(): don't reset the previously active tool if
it is only temporarily pushed to the tool stack.

tool_manager_pop_tool(): don't try to restore the previously active
tool's state because it was not reset on push().
2011-04-06 20:40:26 +02:00
Michael Natterer 9778b6a440 app: GimpEditSelectionTool: activate the tool *after* pushing it
because pushing sets its focus_display which is now only possible
while the a tool is not active.
2011-04-06 20:33:23 +02:00
Michael Natterer b659aec9a7 app: GimpMoveTool: activate the tool before starting GimpEditSelectionTool
Also halt it uncontitionally in button_release() because we can't
get there any longer if the tool isn't active.
2011-04-06 20:32:04 +02:00
Michael Natterer 24ee3370b8 Depend on GTK+ >= 2.24.3, cairo >= 1.20.1, gdk-pixbuf >= 2.22.1
and completely separate configure and sanity checks for gdk-pixbuf
from GTK+, because it's now distributed as a separate package. Remove
all sorts of conditional compiling based on GDK_CHECK_VERSION() and
CAIRO_VERSION.
2011-04-06 19:58:24 +02:00
Michael Natterer a83876040d app: make GimpBrushCache debug spew depend on GIMP_LOG=brush-cache 2011-04-06 09:15:50 +02:00
Michael Natterer 0315f483e6 app: some general GimpPaintCore cleanup 2011-04-06 09:11:25 +02:00
Mukund Sivaraman 5c55f8e897 app: Fix Alt+0 case when switching tabs 2011-04-06 11:58:58 +05:30
Mukund Sivaraman 110b3daa97 app: Make alt+[number] switch tabs in single-window mode 2011-04-06 11:52:10 +05:30
Michael Natterer 21b8007b29 app: add GimpBrushCache which stores brush stuff based on transform parameters
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
2011-04-05 22:15:30 +02:00
Michael Natterer 8d5ac2c780 app: make TempBuf parameter of temp_buf_get_data() const 2011-04-05 22:15:30 +02:00
Martin Nordholts 67755ab987 app/tests: Update include for gimp_display_shell_canvas_tool_events() 2011-04-05 22:04:25 +02:00