Commit Graph

1906 Commits

Author SHA1 Message Date
Alexia Death 8fb92ae67a app: Make direction behave a bit more sanely and predictably 2010-03-20 12:26:51 +02:00
Michael Natterer 96bce3802f Bug 612896 - Ctrl TAB doesn't browse all the layers
Make Ctrl+Tab cycle through the list of all the image's layers (also
layers inside groups) and not just the toplevel container.
2010-03-14 22:59:29 +01:00
Martin Nordholts 0c4409c897 app: Session manage empty- and single-image window separately
Session manage empty- and single-image window separately. So when
starting up, the default 2.6 UI is the same. But when enabling
single-window mode, the image window will become much larger then the
empty-image window. These conceptually different windows will then
from that point be session managed separately: switching mode switches
size of the image window.
2010-03-13 16:35:57 +01:00
Martin Nordholts 77dab5257e app: Introduce image window session utility functions
Introduce image window session utility functions
gimp_image_window_session_clear() and
gimp_image_window_session_apply().
2010-03-13 12:56:27 +01:00
Martin Nordholts e6fa0c65c2 app: Simplify GimpImageWindow session management
Refactor session management with the "gimp-empty-image-window" in
GimpImageWindow. In particular, only have one entry point to
gimp_dialog_factory_add_foreign() and remove the is_empty instance
struct member.
2010-03-13 12:41:06 +01:00
Martin Nordholts d44ee9e2c4 app: Update Windows->Toolbox menu entry depending on if toolbox exists
Update Windows->Toolbox menu entry depending on if toolbox exists. If
an existing toolbox will be raised, set "Toolbox". If it will create a
new toolbox, set "New Toolbox". We need this special treatment since
there can be only one toolbox, so "New Toolbox" will remove any
toolbox docks from Recently Closed Docks. If we would just have
"Toolbox" it could be misinterpreted as "get me the toolbox I just
closed".
2010-03-07 12:24:26 +01:00
Michael Natterer 1aeb315ecf undef GTK_DISABLE_DEPRECATED in many places which undef GSEAL_ENABLE
because the widget flag access macros (e.g. GTK_WIDGET_REALIZED) are
now deprecated in GTK+ master.
2010-03-06 23:14:29 +01:00
Martin Nordholts fc35ec4fe5 app: Fix magic number in gimp_canvas_draw_segments() 2010-03-05 21:31:06 +01:00
Michael Natterer 62af8de7ea app: no need to say shell->canvas when we are in a canvas callback 2010-03-02 00:11:47 +01:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.

Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
2010-02-28 23:23:24 +01:00
Martin Nordholts 947e28596f app: Remove gimp_dialog_factory_from_name()
We only have one dialog factory now, and
gimp_dialog_factory_from_name() doesn't provide compile-time type
safety, so use global_dialog_factory directly instead.
2010-02-28 20:02:45 +01:00
Martin Nordholts 6647c495f3 app: Store GimpDialogsState per dialog factory
Get rid of the file-static variable 'dialogs_state' from
gimpdialogfactory.c and move it into the GimpDialogFactory struct.
2010-02-28 18:48:39 +01:00
Michael Natterer 8671860945 app: move "image" member of GimpDisplay to the private struct 2010-02-28 16:15:59 +01:00
Michael Natterer efcfec9eb8 app: remove ancient utility function img2real()
and use gimp_pixels_to_units() directly.
2010-02-28 15:42:55 +01:00
Michael Natterer 55961ab149 app: fix glitch in my recent unit conversion cleanup 2010-02-28 15:31:35 +01:00
Martin Nordholts 78ddb19347 app: Keep canvas position on all display shell widgets
Don't use gimp_image_window_keep_canvas_pos() only for docks, use it
for all widgets in the display shell: the rulers, the menu bar, the
statusbar and the scrollbars. It is not really necessary for the two
latter ones because they are below and/or to the right of the canvas,
but we include them for completeness. Plus, they might get moved
around some day...
2010-02-28 15:22:56 +01:00
Martin Nordholts 2c0573d6cd app: gimp_image_window_keep_canvas_pos() should work in canvas coords
gimp_image_window_keep_canvas_pos() should to work in GimpCanvas
coordinates, not GimpDisplayShell coordinates.
2010-02-28 15:22:56 +01:00
Michael Natterer 84d33e4316 app: make image-coords overlay widgets work fine at any zoom factor
Add anchor and spacing parameters to the shell overlay API, so
overlays can be positioned on each side of a point in image space,
with configurable spacing in display space.
2010-02-28 14:48:47 +01:00
Michael Natterer ff01c2d77e app: add API to move an existing image-coords overlay around 2010-02-26 01:27:04 +01:00
Martin Nordholts ed5830fb7b app: Pause tool drawing while hiding docks in single-window mode
Freeze the active tool until the UI has stabilized. If it draws while
we hide widgets there will be flicker. See bug 602223.
2010-02-25 22:08:57 +01:00
Martin Nordholts 18f3be6bd3 Bug 602223 - Can't hide docks with Tab in single-window mode
Add a "hide-docks" config and connect the Windows->Hide docks menu
item to it. Also connect the image window to the config property so it
can hide/show its docks when it needs to.

Also add and use a utility function
gimp_image_window_keep_canvas_pos() to ensure that the image in the
window remains fixed when toggling visiblity of docks. One problem:
When GimpDrawTool is active on the canvas, there is flicker. The end
position is correct though.

Also add regression testing for this fix to test-ui.c
2010-02-24 19:53:48 +01:00
Martin Nordholts 82a0b95147 app: Update image window side docks visiblity from the image window
Update image window side docks visiblity from the image window itself
instead of from the ui configurer. The image window has a dependency
to the config object anyway, so no need to complicate things.
2010-02-24 19:53:48 +01:00
Alexia Death ede02a68b9 app: Make pressure at stroke ends nicer 2010-02-24 02:15:50 +02:00
Michael Natterer 0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
Martin Nordholts f9a2c5cfe1 app: Add Windows→Hide docks menu item
Add Windows→Hide docks menu item. We don't remove the hardcoding of
having Tab trigger it though, because gtk_accelerator_valid() returns
FALSE for GDK_tab. This means that if the user changes keyboard
shortcut for the menu item, both the user shortcut and the hardcoded
shortcut will work. We remove gimp_dialog_factories_toggle() and make
clients activate the action instead to toggle dock visibility.
2010-02-20 22:54:11 +01:00
Michael Natterer 9b75184442 app: add API to add overlays in image coordinates
and update their positions when the shell scrolls and zooms.
2010-02-20 15:15:53 +01:00
Martin Nordholts bf830398a5 app: Cleanup GimpImageWindow and dependencies, only one dialog factory
Cleanup GimpImageWindow and dependencies like GimpDisplay, there is
only one dialog factory now.
2010-02-20 11:09:51 +01:00
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Alexia Death 2cb8f0a864 app: Make sure button releases get handled by paint tools too 2010-02-19 22:42:35 +02:00
Alexia Death eb244f208a app: Best guess attempt to catch that very rare segfault from event_eval
This segfault is not easily repeatable, so I can't test for it.
If its still happening, let me know.
2010-02-19 22:07:54 +02:00
Michael Natterer c0aa4498d2 app: add intrastructure to send key_release events to tools
The code is 100% identical to the key_press handling and simply
dispatches key_release events too tools which selected them via
GimpToolControl.
2010-02-18 20:50:11 +01:00
Michael Natterer 5af05cce0b app: move the entire get-coords API from GimpDisplayShell to GimpDeviceInfo
because GimpDeviceInfo will soon apply curves to the axes. Also change
everything to speak in terms of GimpDeviceInfo instead of GdkDevice.
2010-02-16 13:00:46 +01:00
Michael Natterer 56ec0c8774 display: reserve more space for the cursor label so negative coords fit 2010-02-11 19:55:20 +01:00
Michael Natterer 3cd4f0de45 display: don't use statusbar->hbox for size calculations, use the hbox instead 2010-02-11 19:51:15 +01:00
Michael Natterer f2f83109ec display: redo the code that does evil things to the statusbar's widgets
Actually use the hbox that is provided via gtk_statusbar_get_message_area()
since GTK+ 2.19.1 instead of always replacing it by our own.
2010-02-11 19:24:08 +01:00
Michael Natterer 903604113f Add utility function to create images to gimpimage-new.[ch]
Add gimp_image_new_from_drawable(), from_component() and from_pixbuf()
and remove that duplicated code from gimptoolbox-dnd.c and
gimpdisplayshell-dnd.c
2010-02-09 22:32:48 +01:00
Michael Natterer 4c1ec79281 Move the quick mask members to GimpImagePrivate
and add API to access the "inverted" state.
2010-02-04 09:49:45 +01:00
Michael Natterer 88de69464e Move "layers", "channels" and "vectors" to GimpImagePrivate 2010-02-03 23:00:31 +01:00
Michael Natterer c9b9b8e18e Increating and decreasing the display count were swapped 2010-02-03 22:59:50 +01:00
Michael Natterer c9f8399614 Move "grid", "guides" and "sample_points" to GimpImagePrivate 2010-02-03 22:16:02 +01:00
Michael Natterer 0b2c804e9d Move "disp_count" and "instance_count" to GimpImagePrivate
and add the neccessary API to access and modify them.
2010-02-03 21:22:00 +01:00
Michael Natterer f769284aca Start private struct for GimpImage and move the first members there 2010-02-03 20:31:25 +01:00
Michael Natterer b6ce5d075d Remove macros SCREEN_XRES() and SCREEN_YRES()
and add gimp_display_shell_get_screen_resolution() instead. The times
when these macros were used in inner loops have long passed.
2010-02-03 19:50:46 +01:00
Martin Nordholts ed2d178da3 app: Get rid of config -> display module dependency
In order to make a clear separation between the core modules and the
UI modules, move the necessary enums from display-enums.h and
widgets-enums.h to config-enums.h and the files
gimpdisplayoptions.[ch] from the display to the config module. This
removes the config -> display dependency.

This change has three main benefits
 * It lets us remove includes of display files from the config module
 * We don't have to link gimp-console and test-config with a subset of
   object files from the display module
 * It is reflected in devel-docs/gimp-module-dependencies.svg that the
   application is made up of core modules and UI modules and that no
   core module depends on any UI module
2010-02-01 21:56:48 +01:00
Michael Natterer 74bf91cb63 Bug 603711 - Crashes when using path tool
gimp_display_shell_get_*_coord(): initialize the coords with
GIMP_COORDS_DEFAULT_VALUES allGimpCoords members get initialized.
2010-01-31 17:19:51 +01:00
Martin Nordholts 8ba9700ddb Bug 597368 - Widget spacing around canvas steals working space
Remove spacing between the canvas and the surrounding widgets so that
that space can be used for the actual canvas itself instead.
2010-01-30 08:59:28 +01:00
Martin Nordholts 2604db71a8 app: Don't yell in FIXME, explain instead 2010-01-19 23:15:37 +01:00
Michael Natterer 7175f3e883 Some more changes to build with GSEAL_ENABLE
- use more GTK+ accessors instead of struct members
- remove quite some #undef GSEAL_ENABLE from completely ported files
2010-01-15 15:35:03 +01:00
Alexia Death d3dde03b78 app: Fix a tug of war with scrollbars when middle click panning.
Whenever panning with a mouse scrollbars generated reverse events,
one for each, causing flicker on image borders.
2010-01-10 22:16:27 +02:00
Martin Nordholts 5d79f664d3 app: Add "dialog-factory", "ui-manager" properties to GimpDockColumns
Add "dialog-factory", "ui-manager" properties to GimpDockColumns and
let GimpDock look for these before trying to look for a dock window
which does not exist in single-window mode.
2010-01-07 19:18:03 +01:00