Commit Graph

1852 Commits

Author SHA1 Message Date
Martin Nordholts 90d7ffde1a app: Make all GimpDialogFactory members private
Add necessary trivial API that allows us to make remaining
GimpDialogFactory instance members private, and make them private.
2009-12-20 20:21:26 +01:00
Alexia Death dbf844c012 app: Disable history buffer via use of gimprc option
Adds non-UI option to disable the use of often buggy history buffer.
This option defaults to false, since a lot of device/X/GDK combos are broken
and the resulting stroke often actually looks better without history events.
Put (use-event-history yes) in gimprc if you want more events and possibly bugs.
2009-12-20 18:46:25 +02:00
Alexia Death 1f4098200a Revert "app: Removing code for making use of the X event history buffer"
This reverts commit af4717e78f.
People want it, to see when the backend is fixed.
2009-12-20 17:29:22 +02:00
Alexia Death af4717e78f app: Removing code for making use of the X event history buffer
X event history buffer is major source of problems. Almost all reports
about painting at an offset from the cursor in GIMP seem to originate
from history buffer bugs either at X or GTK level. There are device&X
combinations that work fine and there are others that are broken.
With current smothing the benefits of using the buffer are almost gone
and more exact does not always mean better to look at.
2009-12-20 16:27:03 +02:00
Martin Nordholts f3235e6f45 app: Add "dock-factory" property to GimpImageWindow
With the introduction of a single-window mode, not only dock windows
needs to be able to create docks, the image window also needs to. So
give it a "dock-factory" property.
2009-12-08 19:49:13 +01:00
Martin Nordholts ae3c3291b0 app: Check for API availability in gimp_statusbar_init() 2009-11-30 23:14:54 +01:00
Martin Nordholts a81dc5ead3 app: Use more proper API in gimp_statusbar_init()
Use more proper API in gimp_statusbar_init() when we rearrange widgets
to get rid of warnings. Requires an up to date GTK+, max 2 weeks old
or so, for gtk_statusbar_get_message_area().

This makes app/tests run again since there are no warnings about wrong
widget parent.
2009-11-30 22:55:31 +01:00
Michael Natterer 6a00a4ef22 Add comment why we implement focus_in_event() and focus_out_event() 2009-11-04 19:32:13 +01:00
Michael Natterer a4694d8a0a Optimize gimp_statusbar_replace_valist()
Don't replace anything if the status message didn't change. Gets rid
of quite some statusbar invalidations in many tools.
2009-11-03 15:49:18 +01:00
Michael Natterer 8c07e52759 Don't let focus-in and focus-out on the canvas invalidate everything
Implement GtkWidget::focus_in_event() and ::focus_out_event() in
GimpCanvas and don't chanin up so the default handler never runs.
Remove code that tries to do the same in the canvas' tool events
callback.

The default impl invalidates the entire widget for no reason (the
canvas doesn't draw a focus indicator anyway), and the old solution
failed for empty displays and was constantly invalidating the entire
drop zone when the toplevel window gained or lost focus.
2009-11-03 13:58:36 +01:00
Michael Natterer 10bb9b090f Get rid of useless const in "const GimpDisplayShell*" 2009-11-01 20:47:18 +01:00
Michael Natterer deed1636f9 Remove all code from gimp_display_shell_new()
Move the entire widget construction code to constructor().
2009-11-01 18:18:17 +01:00
Michael Natterer 439994d994 Clean up gimp_display_shell_init()
Only initialize members that don't default to zero. It was simply too
much and soon widgets will be constructed in init().
2009-11-01 14:51:08 +01:00
Martin Nordholts fdf2454666 app: Add gimp_image_window_new/destroy()
Add gimp_image_window_new/destroy() so we have a central place where
the Gimp::image_windows list is managed.
2009-10-25 22:02:38 +01:00
Martin Nordholts 19baff1a50 app: Add gimp_image_window_get_shell() 2009-10-25 21:57:14 +01:00
Martin Nordholts b9214fd3cf app: Add "gimp" property to GimpImageWindow 2009-10-25 21:44:23 +01:00
Martin Nordholts 870d7f9376 app: Connect to GtkNotebook::page-removed in GimpImageWindow
We must disconnect from the last display shell when it is removed
when rearranging the UI, so connect to GtkNotebook::page-removed
in GimpImageWindow and do that.
2009-10-25 20:03:51 +01:00
Martin Nordholts 75ee76ecb6 app: Handle gimp_image_window_get_active_shell() returning NULL
When rearranging the UI it is pretty common that
gimp_image_window_get_active_shell() returns NULL so check for that.
2009-10-25 20:03:51 +01:00
Martin Nordholts 65c0ce5dbe app: Get rid of const disqualifier warning
Get rid of const qualifier for a bunch of GimpDisplayShell getters to
get rid of a disqualifier warning. The problem is that we call into
GTK+ which sometime misses const which breaks the chain. As a general
guideline we should avoid const for widgets.
2009-10-24 21:02:19 +02:00
Michael Natterer ea7c37293c Don't block all key events on the canvas (fixes tool interaction)
(gimp_display_shell_canvas_tool_events): when ignoring events on
overlays, special case key events because they always originate from
the topelvel and never from the canvas' window itself.
2009-10-21 19:35:20 +02:00
Michael Natterer 8780342dcb Set a 10px border on the canvas so overlays have some spacing 2009-10-18 23:03:04 +02:00
Michael Natterer 8124792130 Derive GimpCanvas from GimpOverlayBox
- adapt callbacks to ignore / not block events on offscreen children
- use GimpOverlayBox' scroll API which makes sure overlay children
  don't scroll along
2009-10-18 22:19:29 +02:00
Michael Natterer 6608d66cde Build with GSEAL_ENABLE and #undef it where accessors are missing 2009-10-17 19:51:33 +02:00
Martin Nordholts eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02:00
Martin Nordholts c83788377a app: Remove unused includes from gimpdisplayshell.c 2009-10-09 23:04:29 +02:00
Martin Nordholts 676e7f8c31 app: Formating 2009-10-09 20:04:56 +02:00
Michael Natterer 23955439d6 Don't access GtkAdjustment's members directly
but also don't use its accessors because doing that would emit
"changed" multiple times when setting up an adjustment with multiple
utility functions. Instead, use g_object_set() and freeze/thaw
notification around all calls. g_object_thaw_notify() will make sure
"changed" is emitted if anything has changed since freezing.
2009-10-09 09:59:01 +02:00
Michael Natterer 7c39a22dc2 Simplify GimpDisplayShell's icon update API
It makes no sense to distinguish between idle and immediate update in
the public API, the code can simply decide by itself to immediately
update a NULL image's icon.
2009-10-08 23:30:56 +02:00
Michael Natterer e2cc191c92 Use GtkAdjustment's accessors 2009-10-08 20:05:12 +02:00
Michael Natterer 57541f8093 Rename gimp_display_shell_selection_layer_set_hidden() to set_layer_hidden() 2009-10-08 09:10:33 +02:00
Michael Natterer dd0575edb4 Move refing/unrefing the image to gimp_display_set_image()
and don't do it in gimp_display_connect()/disconnect() because
set_image() is the natural place to do it.
2009-10-07 21:13:39 +02:00
Michael Natterer 067cfe9ff0 Move a call to gimp_display_shell_connect() around
from gimp_display_shell_reconnect() to gimp_display_set_image()
because it makes unsetting and setting an image in
gimp_display_set_image() more symmetric.
2009-10-07 20:11:48 +02:00
Michael Natterer 1ae5d6ad8d Use the local shell variable and don't call get_shell() again 2009-10-07 19:59:54 +02:00
Michael Natterer 6ad76d226e Use gimp_display_set_image() in gimp_display_new()
instead of manually calling gimp_display_connect(). Make
gimp_display_set_image() handle displays in construction
(which don't have a shell yet).
2009-10-07 19:42:08 +02:00
Michael Natterer c17dfd22a8 Rename layer_select->shell to layer_select->window
Calling that member "shell" is just too confusing in the
GimpDisplayShell context.
2009-10-06 19:25:33 +02:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer bf41a773cb Update the window title and icon when switching between shells 2009-10-06 10:56:46 +02:00
Michael Natterer d0a614093e Default to GIMP_NAME for the "title" property 2009-10-06 10:56:10 +02:00
Michael Natterer 23cd244c65 Make display->instance private, add an accessor and use it everywhere 2009-10-06 09:16:46 +02:00
Michael Natterer 5d70d60927 Move the display ID to the private struct 2009-10-05 20:10:00 +02:00
Michael Natterer c339125d7d Add private struct and move "shell" and "update_areas" there 2009-10-05 20:06:13 +02:00
Michael Natterer d1ded0617f More gimp_display_get_shell() instead of display->shell 2009-10-05 19:58:03 +02:00
Michael Natterer 297d205269 Use gimp_display_get_shell() also in gimpdisplay.c 2009-10-05 19:27:04 +02:00
Michael Natterer 161f1346db Create the new display ID in set_property() not in gimp_display_new()
Make the ID a read-only property and set it when the "gimp"
construct-only property gets set. Removes code from gimp_display_new()
where it doesn't belong.
2009-10-04 22:00:04 +02:00
Michael Natterer 7d878f6f4b Use the GimpDisplayConfig from GimpDisplay where possible
...instead of going via display->gimp and casting.
2009-10-04 20:22:06 +02:00
Michael Natterer ac98c2c234 Use gimp_display_get_shell() instead of directly accessing it 2009-10-04 19:56:39 +02:00
Michael Natterer 18cbe3422e Add getters for "gimp", "image" and "shell" 2009-10-04 19:39:22 +02:00
Michael Natterer 4a0b826493 (gimp_display_new): add a local "shell" variable for more readable code 2009-10-04 19:30:32 +02:00
Michael Natterer 31a41c2b3d Use gimp_display_shell_present() instead of gtk_window_present() 2009-10-04 19:27:58 +02:00
Michael Natterer 94dcbe0e2e Add new function gimp_display_shell_present()
Not only presents the shell's toplevel, but also makes it the active
shell in the image window.
2009-10-04 19:24:55 +02:00