Commit Graph

2243 Commits

Author SHA1 Message Date
18d3882c5c app: port GimpDisplayShell pen drawing to cairo 2010-08-23 21:59:27 +02:00
3a1ba90507 app: port GimpDisplayShell cursor drawing to cairo
Also add code to invalidate the new cursor location in
gimp_display_shell_update_cursor(), which is needed with
the new manual double buffering code.
2010-08-23 20:39:22 +02:00
1d1ff1fedd app: port GimpDisplayShell sample point drawing to cairo
Same disclaimer about tool uglyness applies here. Will be fixed.
2010-08-12 13:13:15 +02:00
922c330bec app: port GimpDisplayShell guide drawing to cairo
The cairo_t code in GimpMoveTool is still disgusting. This probably
needs some GimpTool API that creates a cairo_t for tools.
2010-08-12 00:51:58 +02:00
0985274e8c app: don't call scale functions on an empty display shell 2010-08-12 00:32:34 +02:00
03ad3f0027 app: reorder parameters in new style API 2010-08-12 00:09:05 +02:00
002003a2ea app: add new files gimpdisplayshell-style.[ch]
which contains functions to set styles on a cairo_t.
2010-08-11 23:47:46 +02:00
a6d7542c56 app: simplify some GimpDisplayShell drawing code 2010-08-11 15:01:49 +02:00
529ce40a5d app: port GimpDisplayShell grid drawing to cairo 2010-08-11 13:16:55 +02:00
ac80163771 app: draw the statusbar's icon with cairo 2010-07-30 13:14:10 +02:00
8b31211639 Fix the bulid after GtkNotebookPage got deprecated in gtk-2-22
In all GtkNotebook::switch_page() callbacks, simply replace
GtkNotebookPage* by gpointer.
2010-07-16 15:24:25 +02:00
39c7405954 app: disconnect from the dialog factory in dispose() instead of finalize() 2010-06-24 18:38:18 +02:00
cf1cc6dc6f app: private->shells might be a list with one element upon destroy; free it 2010-06-22 23:06:35 +02:00
5df1d477b7 app: free shell->zoom_focus_pointer_queue in destroy() 2010-06-22 23:06:35 +02:00
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
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
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
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
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
0af34013a2 app: Add minimum gimp_display_shell_transform_xy() gkt-doc 2010-06-18 20:31:33 +02:00
94dc079d44 app: forgot to save the last comment edit 2010-06-12 18:46:30 +02:00
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
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
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
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
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
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
7549f0fead app: really clip guide and sample point drawing to the exposed region 2010-05-02 16:08:47 +02:00
1f8d2e66e1 app: make clip rect and clip region parameters const 2010-05-02 16:06:15 +02:00
2a289a75f4 app: don't draw guides which are out of canvas 2010-05-02 16:01:40 +02:00
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
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
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
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
656e99faf5 app: clean up and simplify gimp_display_shell_canvas_expose() 2010-05-01 18:02:42 +02:00
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
a2c70822d4 Use accessors from GTK+ 2.20 instead of using sealed members directly 2010-04-19 19:21:07 +02:00
8fb92ae67a app: Make direction behave a bit more sanely and predictably 2010-03-20 12:26:51 +02:00
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
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
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
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
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
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
fc35ec4fe5 app: Fix magic number in gimp_canvas_draw_segments() 2010-03-05 21:31:06 +01:00
62af8de7ea app: no need to say shell->canvas when we are in a canvas callback 2010-03-02 00:11:47 +01:00
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
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
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
8671860945 app: move "image" member of GimpDisplay to the private struct 2010-02-28 16:15:59 +01:00