Commit Graph

26744 Commits

Author SHA1 Message Date
Nils Philippsen a9671395f6 PCX: Avoid allocation overflows.
Multiplying gint values may overflow unless cast into a larger type.
2009-12-09 16:32:29 +01:00
Nils Philippsen ed7f48be05 PCX: sanitize input data
Harden PCX plugin against bad width, height.
2009-12-09 15:40:13 +01: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
Alexia Death a736b8f972 Adding repeat option to fade.
Now fade can be applied either as sawtooth or triangular wave.
Also fade can be reversed.
2009-12-06 20:06:34 +02:00
Alexandre Prokoudine 362f7c3718 Updated Russian translations 2009-12-06 18:43:31 +03:00
Martin Nordholts 34ad9dad1a app: Session manage multi-column dock windows
Introduce GimpSessionInfoDock and session manage multi-column dock
windows. We are still backwards compatible with sessionrc, the only
difference is that a "session-info" entry now can have multiple "dock"
entries.

Also make ond dock window multi-column in the regression test
app/tests/test-session-management.c and adjust positions and image
selection menus a bit.
2009-12-06 14:49:53 +01:00
Martin Nordholts bfd91ebdb7 app: Append in gimp_dock_columns_add_dock()
Append new docks to the GimpDockColumns list to preserve the order of
addition. This will become important when we serialize the docks into
sessionrc.
2009-12-06 14:36:57 +01:00
Martin Nordholts 482f31cd3f app: Add GimpMenuFactoryPrivate
Add GimpMenuFactoryPrivate. Note that we don't introduce a Gimp-getter
since the menu factory is globally accesible and we want to have as
much control as possible in who can get the Gimp instance.
2009-12-06 10:23:05 +01:00
Martin Nordholts b1b560b0c4 app: Only kill living dock windows when switching to s-w-m
Only kill living dock windows when switching to single-window
mode. When we remove the last dock in a non-toolbox dock window, it
will commit suicide.
2009-12-06 09:50:02 +01:00
Martin Nordholts 968fbd7996 po: Remove gimpdockseparator.c from POTFILES.in
Remove gimpdockseparator.c from POTFILES.in, the file does not exist
any longer.
2009-12-06 09:38:51 +01:00
Martin Nordholts 5819c3c83a app: Have an "Export" button, not "Save", in export dialogs 2009-12-06 08:58:44 +01:00
Martin Nordholts 3bb15eac78 app: Move out dock window logic from gimp_session_info_dock_restore()
Move out dock window logic, most notably aux info, from
gimp_session_info_dock_restore() and put it in
gimp_session_info_restore() where it belongs.
2009-12-05 22:43:32 +01:00
Martin Nordholts 1bf84999e4 Move the Image Selection Menu to GimpDockWindow
Move the Image Selection Menu from GimpMenuDock to
GimpDockWindow. That is, if a dock window contains many docks then
they will share the same Image Selection Menu.

To do this we need to move around quite a bit of code. Move the
"context", "dialog-factory" and "ui-manager" properties from GimpDock
to GimpToolbox, GimpMenuDock doesn't need it any longer. Turn the
GimpDock getters for these properties into wrappers that go to the
GimpDockWindow properties. In some places, most notably GimpToolbox
construction, we use the GimpToolbox values of these properties, but
most of the time it works fine to just use the GimpDockWindow
properties. GimpDock::setup() and set/get_aux_info() have also been
moved to GimpDockWindow since the only aux info for docks was for the
image selection menu.

Also, we don't bother porting gimp_menu_dock_destroy() to
GimpDockWindow, but we leave the code around. If this is a problem, it
will show.
2009-12-05 21:21:24 +01:00
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 b7b28eb61d etc: Do not show the dock Image Menu in default UI
Do not show the dock Image Menu in the default UI, it is for advanced
users. The risk for accidental usage is too big if it's shown by
default. Plus, it's not very pretty.
2009-12-05 10:22:13 +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
Nils-Christoph Fiedler 208de0e64e Added LowGerman translation 2009-12-02 22:34:01 +01:00
Nils-Christoph Fiedler b09c534090 Added LowGerman translation 2009-12-02 22:33:54 +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
Marco Ciampa 3639ee4055 Updated italian translation 2009-11-30 12:17:48 +01:00
Alexandre Prokoudine 96332f4252 Updated Russian translation 2009-11-30 03:35:17 +03:00
Alexandre Prokoudine 198088c215 Updated Russian translation 2009-11-30 03:32:01 +03:00
Alexandre Prokoudine fd3ab6ac2b Normalized naming of the file type, added missing , in sentences, fixed a typo 2009-11-30 03:31:35 +03: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 825fab3dd0 Bug 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical Offset are reversed
Add "Lines" to the "Horizontal" and "Vertical" labels to clarify
what exactly is affected.
2009-11-24 14:58:28 +01:00
Michael Natterer 028b66beba Bug 602761 - plug-in-grid: Parameters Horizontal/Vertical Spacing and Horizontal/Vertical Offset are reversed
Revert commits bc099a98f3 and
c77781de89 from Jul 27 2006;
also changed refval boundaries of the "width" size entries
in the spirit of the original fix, only reversed.

Rationale: the "horizontal" parameters all have to affect the
horizontal *lines*, so have an effect in *vertical* direction.

Will commit a label change on top to clarify this.
2009-11-24 14:49:17 +01:00
Mircea Purdea 85b8d9668e Modified UI to include default timing
This patch makes two modifications to the UI: listing in the
'Playback speed' combo was changed from percentage values to X
factors, and a new combo was added for 'Default framerate'. The
latter includes common framerates which are used to define the
default duration on unmarked frames. Due to the way in which the
GTK+ timeout function is defined, the framerates and duration values
for this new combo use rounded integer values.
2009-11-20 20:56:09 +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
Simon Budig 9cc8d78ff3 Harden the PSD plugin against integer overflows.
Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232
and CVE identifier CVE-2009-3909. Fixes bug #600741.
2009-11-17 11:14:16 +01:00
神州散人 bc7519d1c5 Updated Simplified Chinese translations. 2009-11-17 15:32:42 +08:00
Simon Budig 0e440cb6d4 Fix the PSD structs to use signed ints for bounding box coordinates. 2009-11-17 01:13:52 +01:00
Kjartan Maraas be05769974 Updated Norwegian bokmål translation. 2009-11-16 18:37:57 +01:00
Kjartan Maraas c13193a8e1 Updated Norwegian bokmål translation. 2009-11-16 18:28:06 +01:00
Kjartan Maraas 0d12733f58 Updated Norwegian bokmål translation. 2009-11-16 18:26:10 +01:00
Nils Philippsen 16e6a37687 Ensure valid bit depths when reading BMP files. 2009-11-16 18:16:38 +01:00
Nils Philippsen f63ba36dd9 Use more defensive coding in plausibility check.
Use an equivalent division instead of multiplying values and checking if
they are more than G_MAXINT32, because divisions cannot overflow.
2009-11-16 17:30:43 +01:00
Nils Philippsen 43d57c6663 Make plausibility check easier to understand.
Explicitly check that Bitmap_Head.biHeight is not G_MININT32
instead of relying on ABS(G_MININT32) being negative.
2009-11-16 17:30:43 +01:00