Turn the "Preview type" combo into a simple "Show image" toggle and
enable the "No guides" choice in the guides combo. Remove unused enum
GimpTransformPreviewType. This way the preview and guide/grid controls
are strictly separate and much less confusing.
which removes a lot of code from the transform tool, and reduces the
number of canvas items used for the transform grid from possibly
gazillions to one.
Add GimpWindowingStrategy with create_dockable_dialog() and use it in
dialogs_create_dockable_cmd_callback(). There are two implementations:
GimpSingleWindowStrategy and GimpMultiWindowStrategy. Depending on the
window mode, we want new dockables to appear in different places when
created. In single-window mode, they should appear inside the single
image window. In multi-window mode, a new dock window is created.
Make 'Export to' always sensitive (as long as there is an image at
all). And make it fall back to 'Export...' if no export target has
been set yet. Note that it is not necessarily visible at all times,
sometimes 'Overwrite' shadows it. It shall still be invokable though.
Reference:
[Gimp-developer] Isn't this behaviour unintuative?
http://lists.xcf.berkeley.edu/lists/gimp-developer/2011-June/026885.html
If there is a drawable, there is also an image, so we don't need to
check for that. Now gcc can't complain that we don't have parenthesis
around "image && drawable" for some future statements.
This is a quick fix because the call can block and needs to be ported
to the async API. I simply disabled the entire block that gets the
icon from GIO.
In single-window mode, gimp_session_managed_set_aux_info() will set
the size of the dock areas at the sides. If we don't wait for those
areas to get their size-allocation, we can't properly restore the
docks inside them, so do that in an idle callback.
Also add a required call to gimp_test_run_mainloop_until_idle()
because of this in the 'automatic_tab_style' test.
In gimp_display_shell_drop_uri_list(), shell->display is dereferenced in
some places without checking that it's still there. It can be set to
NULL if the user quits the application while a drag and drop action is
being processed and the main loop is iterated during execution of this
function. (Bug #652280)
Since gimp_display_shell_appearance_update() depends on docks being
present, call it in gimp_image_window_add_dock(). Otherwise the resize
handle will be present when starting in single-window mode.
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).
- 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.
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.
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.
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.
Add regression test for "app: Give configure event info to
gimp_session_info_read_geometry()", commit
93fd257c52, which fails without that fix
being present.
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.
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.
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.
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.
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)
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.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
- 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()
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).
and emit the buffer's "motion" signal when a motion is supposed
to happen. In GimpDisplayShell, connect to GimpMotionBuffer::motion()
and call the tool.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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().
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.
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.