Commit Graph

12562 Commits

Author SHA1 Message Date
Martin Nordholts cb854e6ad7 app: Only do necessary init in gimp_dock_window_init()
The private instance data struct is zeroed out for us so we don't need
to assign NULL, FALSE and 0 to private instance data members in
gimp_dock_window_init().
2009-12-05 12:38:55 +01:00
Martin Nordholts df44751292 app: Add GimpMenuDockPrivate
Add GimpMenuDockPrivate which requires two new trivial getters.
2009-12-05 09:54:40 +01:00
Martin Nordholts c0e8018e8d app/tests: Use Palette Editor in sessionrc test for dockable aux info
Use Palette Editor in the sessionrc regression test so that the test
includes aux info for a dockable.
2009-12-04 08:31:49 +01:00
Martin Nordholts d33f643f6b app: Move GimpDockWindow::"font-scale" style property to GimpDock
To make the smaller font in docks also apply in single-window mode,
move the GimpDockWindow::font-scale style property to GimpDock. We use
the GimpDockWindow approach, so now each GimpDock has a name of the
form "gimp-internal-dock-<id>". We add "internal" to avoid clashing
with the GimpDockWindow legacy id "gimp-dock-<id>".
2009-12-03 23:08:30 +01:00
Martin Nordholts 5ae5ef0f9f app: dock_ID -> dock_window_ID in gimp_dock_window_init() 2009-12-03 21:51:56 +01:00
Martin Nordholts 4ccb650435 Exterminate GimpDockSeparator
Remove all GimpDockSeparator-related code. Seems pointless to keep
even the stuff in gtkrc.
2009-12-02 20:40:39 +01:00
Martin Nordholts c08c6e21e0 app: Add gimp_dialog_factory_dock_new() 2009-12-01 22:18:04 +01:00
Martin Nordholts 95bab5da5f app: gimp_dialog_factory_dock_new() -> _dock_with_window_new() 2009-12-01 21:42:24 +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
Martin Nordholts 7b85cf4de8 app: Use a GdkWindow instead of GimpDockSeparators for dockable DND
Make drag-and-drop rearrangement of dockables happen directly in the
existing widget hierarchy so we don't have to use special, ugly
widgets (read GimpDockSeparator:s) for that.

More specifically, make edges of dockables and dockbooks have the same
semantics as the GimpDockSeparators had. We put a highlight colored
GdkWindow on top of the widget in question to highlight these special
drop areas. This GdkWindow is not taken into consideration in the GTK+
drag-and-drop code, so it does not interupt the DND interaction.

To achive this, there is a problem we must solve: Drag events in GTK+
are propagated inwards and out, but we sometimes want ancenstor
widgets to take care of drop events. We solve this by introducing the
concept of "drag handlers". A drag handler is asked if it will handle
a given drag event, and if it will, a client will let the drag event
be propagated upwards in the widget hierarchy. Right now, the
GimpPanedBox is the only "drag handler". The code could be generalized
more but it doesn't feel worth it at this point.

The size of the special drop area is 5px, the same size as the default
GtkPaned handles. This is because the plan is to later use these
handles as drop areas too.

Other changes of interest are:
 * We need to take care of "drag-motion", "drag-drop" and widget
   highlightning ourselves. We can not use the GtkDestDefaults
   conveniences with gtk_drag_dest_set() any longer since we need more
   control.
 * Make the drop callback pass the insert index directly instead of a
   GimpDockSeparator
 * Add some GIMP_LOG() debug output for DND
 * Disable the GimpDockSeparator code in GimpToolbox
2009-11-29 18:22:12 +01:00
Martin Nordholts 9ea1d490a4 app: Make gimp_paned_box_remove_widget() more destruction friendly
When closing a GimpDockWindow, the GtkBox code might already have
removed the widget. In that case we don't need to do anything.
2009-11-29 15:07:40 +01:00
Michael Natterer 7739670a93 gimp_layer_sync_mode_node(): use gegl:over for normal mode 2009-11-29 13:51:22 +01:00
Michael Natterer 12ac8ce899 Factor out configuring the layer's mode node to a utility function 2009-11-29 13:35:27 +01:00
Martin Nordholts e4e7bf8471 app: Add and use gimp_highlight_widget()
Add gimp_highlight_widget() so we can simplify
gimp_dockbook_tab_drag_motion() a bit.
2009-11-28 19:12:39 +01:00
Michael Natterer 2c05af036c Use gegl:over instead of gegl:normal 2009-11-27 21:11:26 +01:00
Michael Natterer 938de3ac01 Simplify if()s a bit in dockable_toggle_view_cmd_callback() 2009-11-19 14:44:56 +01:00
Michael Natterer e466da8616 Plug memleak found by Nelson A. de Oliveira 2009-11-19 14:40:25 +01:00
Michael Natterer b45454bc6c Make the popup arrow look sane again
Render the arrow to a temp GdkPixmap, turn it into a GdkPixbuf and set
the pixbuf as icon on the GtkEntry.
2009-11-15 21:35:34 +01:00
Martin Nordholts a685508713 app: Make GimpDockColumns listen to "dock-removed"
Make GimpDockColumns listen to "dock-removed", not "dockbook-removed",
when trying to figure out when to destroy itself. Fixes some crashes
when rearranging the UI, for example when doing this step-by-step:

1. Have two dock windows with one dockable each, say A and B
2. Move A to B's dock window and make it multi-column
3. Try to detach B, will result in a crash
2009-11-15 21:26:17 +01:00
Michael Natterer 79563b99c2 Use GtkEntry's icon feature instead of reimplementing our own popup arrow
Removes tons of code but looks ugly because it uses GTK_STOCK_GO_DOWN
currently, will fix that. Also did some random small cleanups and
removed unused members from the instance struct.
2009-11-15 20:30:57 +01:00
Martin Nordholts b5eae26c4b app: gimp_dock_columns_dock_book_remove() -> _removed() 2009-11-15 19:51:15 +01:00
Martin Nordholts 13bac61020 app: Move g_list_copy() out from gimp_dock_columns_get_docks()
Move g_list_copy() out from gimp_dock_columns_get_docks(). Fixes at
least one memory leak (in gimp_dock_window_get_dock()) and feels nicer
and more flexible.
2009-11-15 19:21:57 +01:00
Martin Nordholts 8a473663d5 app: Fix gimp_dock_separator_get_insert_pos(), we must return an index
The insert position for new column in GimpDockColumns was sometimes
wrong, the problem was in gimp_dock_separator_get_insert_pos() not
return an index but a GtkAnchorType. Convert from GtkAnchorType to an
insert index.
2009-11-15 16:10:59 +01:00
Martin Nordholts ae2f595f12 app: Remove empty GimpDocks from GimpDockColumns 2009-11-15 15:57:49 +01:00
Martin Nordholts 12530bfcf1 app: Add GimpDockColumns "dock-added" and "dock-removed" signals 2009-11-15 15:57:49 +01:00
Michael Natterer 0715c58c13 Fix the find_widget_under_pointer() code to build with GSEAL_ENABLE 2009-11-11 21:01:21 +01:00
Michael Natterer 3a8b59ada5 Use ${gimp_dir} and ${gimp_data_dir} in tags.xml
* app/core/gimpdata.c (gimp_data_get_identifier): check if the data's
  path starts with either of those and use the symbolic paths in that
  case.

* data/tags/gimp-tags-default.xml.in: use them here too instead of
  /home/martin/foo/bar/...

This way we can ship a default file that makes sense, and need much
less identifier remapping. The identifiers even stay the same when
upgrading GIMP.
2009-11-07 21:14:56 +01:00
Michael Natterer e4d8a36080 Store the active dynamics with the input device
Also remove cruft #include <stdio.h>
2009-11-07 17:39:02 +01:00
Michael Natterer 2651c2517b Bail our from expose() when the event doesn't come from entry->text_area 2009-11-06 12:04:58 +01:00
Michael Natterer dd3c1d5eb5 Use the standard system mouse cursor over the popup arrow 2009-11-05 22:48:11 +01:00
Simon Budig 68e1605666 Added workaround for the solaris-printf behaviour. 2009-11-05 10:55:00 +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 ae70da3e72 Remove unused #define STATUSBAR_SIZE 200 2009-11-03 15:43:32 +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 397650bc46 app: Remove #include "gimpdockseparator.h" in gimpwidgets-utils.c 2009-10-31 20:56:28 +01:00
Michael Natterer 22767ca7b8 Seal GimpData completely and add the missing accessors 2009-10-31 18:48:38 +01:00
Michael Natterer 7abcfbf237 Add private struct to GimpData
And start sealing by moving "filename" there. Add
gimp_data_get_filename() and use it everywhere.
2009-10-31 15:24:57 +01:00
Michael Natterer cfa76869d6 Bug 599797 - Crash on "Refresh dynamics" if ~/.gimp-2.7/dynamics folder is missing
(gimp_data_factory_refresh_cache_add): don't add data objects without
filename to the refresh cache. Regardless why they have no filename,
they can't be reloaded anyway (in this case it's newly created objects
that couldn't be saved because there is no folder to save them).
2009-10-30 22:58:19 +01:00
Michael Natterer 223cbeb6fb Fix gimp_data_factory_data_foreach()
Make the function do what is says also if the callback doesn't remove
the data from the factory, argh... also add "gboolean skip_internal"
parameter because doing that unconditionally feels equally broken.
2009-10-30 22:50:02 +01:00
Michael Natterer a0e70231fb Rename cache utility function and reorder stuff to make more sense 2009-10-30 22:40:50 +01:00
Michael Natterer 118440affc Add typedef GimpDataForeachFunc
instead of defining the callback signature in the
declaration of gimp_data_factory_data_foreach().
2009-10-30 22:00:51 +01:00
Michael Natterer 2700b35dae gimp_data_factory_load_data(): add local "loader" variable for readability 2009-10-30 21:45:03 +01:00
Michael Natterer 1e49fd6b50 Give a proper error message if there is no writable data directory
(gimp_data_factory_get_save_dir): add GError and return an error
message telling why exactly a writable folder could not be found.

Show that error message instead of silently failing of just giving a
useless generic error so the user knows how to fix the problem.
2009-10-30 21:34:08 +01:00
Michael Natterer 0c908fc12b Inline a function that was only used once
Keeping gimp_data_factory_data_reload() separate from
gimp_data_factory_data_refresh() is more confusing than helpful
because the function is an integral part of the refresh logic and
implemented everything but saving all dirty objects.
2009-10-28 20:25:55 +01:00
Alexia Death 05f6d89ab0 Stop smudge from crashing by disabling dynamic transfrorming in the brush core. 2009-10-27 23:21:17 +02:00