1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

381 Commits

Author SHA1 Message Date
Michael Natterer
88ecd59c34 Commit files regenerated by distcheck 2013-02-05 20:43:53 +01:00
Michael Natterer
8a9af4cdd7 configure: bump version to 2.8.4 2013-02-05 20:05:46 +01:00
Nils Philippsen
bd6c3468aa app: fix re-initializing fontconfig in gimp_fonts_reset()
Calling FcConfigSetCurrent() with NULL is just broken, it almost
immediately dereferences the passed pointer. Apparently this line
is executed seldom, otherwise we'd see way more crashes in this place.
Just use FcInitReinitialize() which exists for the very purpose of
reinitializing the fontconfig library.
(cherry picked from commit 1c00c2e4f8)
2013-02-05 14:03:57 +01:00
Timo Jyrinki
6852d01288 Bug 692646 - Finnish spelling fixes (by Ville Skyttä) 2013-01-29 10:35:21 +02:00
Alexandre Prokoudine
60c382ff70 Updated Russian translations 2013-01-28 09:48:35 +04:00
Massimo Valentini
de5267f185 Bug 639920: Gaussian blur can't work on specified selection
In presence of a selection extend the area processed
2013-01-27 17:04:02 +01:00
Ville Skyttä
549b3284d8 Bug 692625 - Use image/x-pcx for PCX in desktop entry
Desktop entry: Use image/x-pcx as PCX MIME type to sync with
shared-mime-info.
(cherry picked from commit 79be7de82e)
2013-01-27 14:29:00 +01:00
Clayton Walker
d2d8563e5e build: Update osx build files and README. 2013-01-25 22:26:30 -07:00
Sven Claussner
60f0feb65c Amend NEWS file
Add items for Brazilian Portuguese Windows installer and Language
Selector in Preferences dialog on OS X.
2013-01-25 23:06:13 +01:00
Michael Natterer
d99881ab41 NEWS: updates for 2.8.4 2013-01-25 21:16:20 +01:00
Clayton Walker
d824943b58 build: update OSX build files 2013-01-24 14:06:41 -07:00
Jernej Simončič
4b9af78336 Windows: #588015 - Make sure that GIMP is Terminal-Server-aware 2013-01-21 21:17:45 +01:00
Jehan
6ee8d39b8c Bug 690728: file-gif-save plug-in crops the actual image the user is working on.
Destructive behavior fixed by duplicating the image first, then deleting
the duplicate at the end.
2013-01-20 17:06:08 +09:00
Martin Srebotnjak
1122488403 Updated Slovenian translation 2013-01-19 21:45:38 +01:00
Massimo Valentini
f8c86702e9 Bug 670226 - pbm image non-interactive different from interactive
Properly set the "pbm" flag in non-interactive mode, also add a
missing "break" so non-interactive actually behaves like
non-interactive.
(cherry picked from commit d93d2e71c3)
2013-01-19 18:49:44 +01:00
Ludovic Rousseau
b31fcbc0f1 Bug 675510 - tw_func.h contains windows-specific types
Put the stuff in #ifdef G_OS_WIN32
(cherry picked from commit 5379a2377e)
2013-01-19 18:42:02 +01:00
Michael Natterer
6a39d21494 Bug 689523 - GIMP crashes (segfault) when loading a context with a font...
Make gimp_context_get|set_font_name() actually deal with
context->font_name, so the context can do its job of keeping the name
of an unavailable object around.
(cherry picked from commit c262fee244)
2013-01-18 01:05:01 +01:00
Michael Natterer
6dcd7c425e Bug 686929 - Newly created toolbox is too tall and too narrow
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
(cherry picked from commit 7e273bc6d0)
2013-01-17 19:39:47 +01:00
Mukund Sivaraman
c87b59b95f imagemap: Don't use fixed size buffer to print statusbar messages (#691386) 2013-01-16 17:24:24 +05:30
Michael Henning
adc8b21b0f plug-ins: fix memory leak in edge-neon
Found using clang's scan-build.
(cherry picked from commit e87971e850)
2013-01-11 21:05:51 -05:00
Michael Henning
5bd861330f app: fix memory leak in widgets/gimpgradientselect.c
Found using clang's scan-build.
(cherry picked from commit 42c74722e1f610579e53711706b8fbefc439a058)
2013-01-10 17:21:25 -05:00
Michael Henning
db4c8239f3 plug-ins: don't free a pointer allocated with g_newa in file-pdf-save
Found using clang's scan-build.
(cherry picked from commit c59e569e50)
2013-01-09 17:04:28 -05:00
Nils Philippsen
67753516b7 fix copy-paste error
(cherry picked from commit fc625feb40)
2013-01-09 15:38:56 +01:00
Michael Natterer
67cb43963e Bug 689087 - Drag-and-drop foo.jpg behaves different from 'gimp foo.jpg'...
Prefer text/uri-list over image/* to make dropping from file managers
always behave like opening the image directly.
(cherry picked from commit 454639f9d9)
2013-01-09 00:33:32 +01:00
Michael Henning
121308ee7a plug-ins: fix memory leak in flame/rect.c
Found using clang's scan-build.
2013-01-08 16:36:23 -05:00
Michael Natterer
8432800bdf app: don't map several windows language codes to one language string
So e.g. "english" is not always just "en", but "en_UK", "en_US" etc.
This should fix issues similar to bug #690535. Used
http://en.wikipedia.org/wiki/ISO_3166-1 as reference.
(cherry picked from commit 22a5c173ba)
2013-01-07 01:38:51 +01:00
Michael Henning
6b017f97d4 autogen.sh: also look for automake 1.13
(cherry picked from commit 495b41416b)
2013-01-06 22:06:37 +01:00
Daniel Mustieles
fd5676230c Updated Spanish translation 2012-12-31 12:20:03 +01:00
Rafael Ferreira
29ca295089 Updated Brazilian Portuguese Translation 2012-12-27 23:14:04 -02:00
Piotr Drąg
2226e10b5e Updated Polish translation 2012-12-27 21:01:49 +01:00
João S. O. Bueno
acebb4ad20 Addresses bug #690535 - fix brazilian portuguese on Windows 2012-12-21 18:14:21 -02:00
Daniel Mustieles
d90069f029 Updated Spanish translation 2012-12-16 13:10:37 +01:00
Michael Natterer
205c64d1b8 Bug 688746 - Select tool Alt+Shift and Alt+Ctrl dragging modifies...
Check for layer groups and locked layers in gimp_selection_tool_start_edit()
and show the usual warning instead of allowing the forbidden operation.
(cherry picked from commit 593ddb741f)
2012-12-14 23:04:31 +01:00
Michael Natterer
5818b9eac1 plug-ins: fix indexed palette handling in lcms.c
gimp_image_get/set_colormap() returns/takes the number of bytes in the
colormap, not the number of colors.
(cherry picked from commit b47107123a)
2012-12-14 21:15:23 +01:00
Jehan
a2772a721f Bug 689523: data bootstrap initial values in the text style editor at construction.
This was causing first a visual issue where the style editor UI would
show no default font/size/style at instanciation, but even a crash
when the user would change the font size or style (bold, italic...)
from this UI before selecting a font or writing a text.
2012-12-12 12:37:22 +09:00
Marco Ciampa
85fcef0c5c Updated italian translation. 2012-12-10 23:07:31 +01:00
Marco Ciampa
772c717216 Updated italian translation. 2012-12-10 22:49:44 +01:00
Liam Quin
e5cee5c56f Bug 689712 - Change default units of rotate colors plugin (rcm) from...
Degrees makes much more sense as default unit than radians.
(cherry picked from commit a268b7e03f)
2012-12-06 00:42:03 +01:00
Mukund Sivaraman
b717e155d9 file-tga: Simplify has_alpha expression 2012-12-05 00:45:36 +05:30
Mukund Sivaraman
050fcb4b37 file-tga: Handle 16-bit palettes with transparency (#687802)
Primarily, this fixes a buffer overflow in the colormap buffer.

* We promote such images to GIMP_RGBA_IMAGE now.
* The alpha handling for the colormap to RGBA conversion has been
  fixed.
* Inverted transparency in upsampling has been fixed.
2012-12-05 00:39:51 +05:30
Mukund Sivaraman
0d35348718 file-tiff-load: Fix loading of TIFFs containing old-style JPEG images (#688761)
This commit also moves the updated section of code, so that based on
worst_case, the image type and layer type are updated.
2012-12-04 13:38:11 +05:30
Jehan
c6b81f2f4e Bug 685557 - fix closing and saving a new image.
Current implementation had 2 issues, fixed by this commit:
1/ after the file save dialog is closed, the image would not close.
2/ if you switched the visible tab before saving the new image, it
would save and close the visible tab, instead of the expected one.
2012-11-28 00:01:25 +09:00
Marek Černocký
95e400d597 Updated Czech translation 2012-11-26 10:59:09 +01:00
Marek Černocký
4e428d923b Updated Czech translation 2012-11-25 20:06:50 +01:00
Michael Natterer
34f70ad192 libgimpwidgets: remove all item width logic from GimpPageSelector
It seems GtkIconView got fixed, and now the pile of code I added to
make the layout nice has exactly the opposite effect. Get rid of the
pile.
(cherry picked from commit f1c785fb37)
2012-11-23 23:31:45 +01:00
Michael Natterer
67a1f9e40c Bug 688715 - Unconfigured eraser should be set to eraser tool
I don't know what I tested before, but it didn't work. This patch does
the magic in two places, one of which I missed.
(cherry picked from commit 4e340b613b)
2012-11-23 01:23:25 +01:00
Michael Natterer
54ae57f290 Bug 688715 - Unconfigured eraser should be set to eraser tool
If a device has no saved settings, and it is a GDK_SOURCE_ERASER, set
it to the eraser tool.
(cherry picked from commit 512fbcbbb2)
2012-11-22 23:45:52 +01:00
Michael Natterer
6d10655c94 app: disable maximize_state_in_aux_data because it needs a WM 2012-11-19 23:24:40 +01:00
Michael Natterer
43a1daa5e1 Bug 688305 - drag and drop for guides broken if 'gtk-enable-tooltips = 0' is set
Fix GimpSpinScale too: add the needed events ourselves, and handle
motion hints (which the parent classes add) in motion().
(cherry picked from commit 85a099f988)
2012-11-18 20:05:48 +01:00
Massimo Valentini
9c36859511 Bug 688305: drag and drop for guides broken 2012-11-15 19:02:43 +01:00
Nils Philippsen
d0bb5aea25 app: remove check which hides conditions that should not happen
Remove a GTK_IS_WINDOW() check where this would hide parent widgets
being passed in that don't have a gtk toplevel. This should not happen
and if it does we want to know about it.
(cherry picked from commit f6f8079013)
2012-11-14 17:01:04 +01:00
Nils Philippsen
0e7d59af50 app: fix marking file dialogs as transient if opened from context menu
GimpDisplayShell isn't a GtkWindow (anymore), therefore use
gtk_widget_get_toplevel() to find the actual toplevel window.
(cherry picked from commit 1a4087bd5f)
2012-11-14 17:01:04 +01:00
Nils Philippsen
7fa86da96d app: limit physical memory size by GIMP_MAX_MEMSIZE as well
(cherry picked from commit c4365d4c14)

Conflicts:
	app/config/gimpbaseconfig.c
2012-11-13 16:15:49 +01:00
Michael Natterer
7bbd29b182 app: limit the pyhsical memory size by G_MAXSIZE
because one process can't handle more.
(cherry picked from commit 2b714fcb1a)
2012-11-13 16:12:26 +01:00
Michael Natterer
a766aa9730 Bug 677776 - filter popup windows get hidden behind main image window
Apply modified patch from Simone Karin Lehmann which makes sure
script-fu gets properly hidden after the dialog is done.
(cherry picked from commit 83de53ee4d)
2012-11-13 00:49:52 +01:00
Michael Natterer
3291348ac6 Bug 677776 - filter popup windows get hidden behind main image window
Simone found a better way than setting plug-in windows to UTILITY: simply
call the proper API, [NSApp arrangeInFront: nil].
(cherry picked from commit ab801970ca)
2012-11-13 00:48:09 +01:00
Christian Kirbach
606dad32b1 Update German translation 2012-11-12 23:57:33 +01:00
Michael Natterer
f63e5671ae Bug 676940 - Group children prevent droping layer at bottom of stack
...and don't forget to return the drop_path from
gimp_container_tree_view_drop_status().
(cherry picked from commit 3ef2baea67)
2012-11-12 01:31:28 +01:00
Michael Natterer
982d08492f Bug 676940 - Group children prevent droping layer at bottom of stack
Treat dropping on the empty space at the bottom like dropping after
the last toplevel item.
(cherry picked from commit 05e12b88bc)
2012-11-12 01:26:39 +01:00
Michael Natterer
5db271cc52 Bug 680621 - View menu options are discarded after closing an image
Sync GimpDisplayShell's properties with the default values when it's
emptied and turns into the empty display, so the default values used
when filling it with an image are displayed while it's empty.
(cherry picked from commit 54cf6c6e9f)
2012-11-12 01:00:04 +01:00
Michael Natterer
d29f273566 Bug 677776 - filter popup windows get hidden behind main image window
On OSX, set all transient plug-in windows to UTILITY, so they appear
on top of the image window, which is a bad hack. See the comment in
gimp_window_set_transient_for_display().
(cherry picked from commit 018fc32727)
2012-11-11 21:21:35 +01:00
Michael Natterer
908a71c4cf Bug 684003 - When using the main window in secondary monitor...
If gimp_window_set_transient_for() fails (due to platform
restrictions), at least set GTK_WIN_POS_CENTER on the window, so it
gets centered on the monitor where the mouse is. This also removes the
need for OSX specific centering code in GimpDialog (bug 677776).
(cherry picked from commit 9e5ed1e70a)
2012-11-11 21:13:54 +01:00
Piotr Drąg
5860b2e844 Updated Polish translation 2012-11-10 00:14:58 +01:00
Michael Natterer
acc610ec8a app: remove redundant code from the last commit
(cherry picked from commit f71afd245f)
2012-11-10 00:09:37 +01:00
Peter Mráz
4bbdbb102f Updated slovak translation 2012-11-09 23:40:37 +01:00
Michael Natterer
50c1e2d872 Bug 683011 - Text tool discards text attributes in the on-canvas dialog...
When font, size or color were changed, set the text buffer's current
insert_tags just as we already do for the bold, italic etc. toggle
buttons.  Changed gimp_text_style_editor_list_tags() to also return
the tags for font, size or color.
(cherry picked from commit abd2e78bdf)
2012-11-09 23:29:59 +01:00
Michael Natterer
2a77d536aa app: make Tab, Shift+Tab and Escape move the focus back to text editing
when it was in the floating text style editor. While this doesn't fix
anything by itself, it enables fixing text style setting to behave
reasonably when there is no selection.
(cherry picked from commit 76b05c2afc)
2012-11-09 22:15:25 +01:00
Daniel Mustieles
e66252cc8a Updated Spanish translation 2012-11-08 12:38:55 +01:00
Michael Natterer
2873262fcc Bug 687392 - Memory corruption vulnerability when reading XWD files
Applied and enhanced patch from andres which makes file-xwd detect
this kind of file corruption and abort loading with an error message.
(cherry picked from commit 0b35f6a082)
2012-11-08 00:19:17 +01:00
Michael Natterer
f3de4b4a24 Bug 677776 - filter popup windows get hidden behind main image window
On OSX, call [NSApp activateIgnoringOtherApps] when a plug-in dialog
is shown, so the plug-in process becomes the active app, and the
dialog gets focussed.

In order to avoid doing this in GimpDialog (which is also used in
the core), do it in gimp_ui_init() which all interactive plug-ins
call, and when gimp_temp_proc_run() is called interactively, to
catch repeated activation of an already running plug-in.

Also, set GimpDialog's initial position to GTK_WIN_POS_CENTER,
or they will pop up in the top left corner.

Inspired by patches from Simone Karin Lehmann and Daniel Sabo.
(cherry picked from commit 0b56aa0d13)
2012-11-07 23:54:30 +01:00
Michael Natterer
901f396a5e Bug 687851 - Gimp crashes on Colors > Desaturate
Don't install the frame rate limiting draw timeout when resuming a
draw tool that is not active, so accidential timeout installation from
whatever tool dispose code can't happen.
(cherry picked from commit 6a33951aa6)
2012-11-07 23:24:00 +01:00
Michael Natterer
28d42d3dd7 Bug 686521 - Zoom Tool Displays Wrong Cursor When Zooming In/Out
When updating the tool cursor on BUTTON_PRESS, pass a state *without*
the newly pressed button's mask to gimp_display_shell_update_cursor(),
or it will simply never call the cursor update function. Tool cursors
don't normally change when a mouse button is down.
(cherry picked from commit 5de48ef8b5)
2012-11-06 22:49:00 +01:00
Michael Natterer
cfacd4f5a6 Bug 687375 - Text tool: unnecessarily insists on having a layer before working
There is no reason to disallow the text tool from working on a
previously empty image, so allow it.
(cherry picked from commit eba022f01b)
2012-11-06 22:23:36 +01:00
Michael Natterer
9d6e8e23df Bug 687673 - The image has been exported to '(null)' when export...
Show the imported URI if the exported URI is NULL, they are equivalent
for this dialog.
(cherry picked from commit 55f025e469)
2012-11-06 22:15:21 +01:00
Marco Ciampa
0029694f3c Small fix in italian translation. 2012-11-06 10:39:11 +01:00
Marco Ciampa
7e06c48a94 Small fix in italian translation. 2012-11-06 10:28:56 +01:00
Rafael Ferreira
9cf76553bd Updated Brazilian Portuguese Translation 2012-11-05 12:09:10 -02:00
Michael Natterer
b447b8e85f Bug 676667 - Splash image display in splash screen is delayed
Throw away the code that sets the splash image as window background
and always use GtkImage. Due to internal GDK changes since this code
was written, this is now the way to avoid any delay when showing the
image, for whatever reason.
(cherry picked from commit 568aa7a5b0)
2012-11-05 01:49:06 +01:00
Michael Natterer
4f2d0c9ed1 Bug 686850 - Help system: GIMP crashes and closes without saving changes
When gimp_plug_in_close()ing a plug-in (such as when cancel is
clicked), make sure we don't leak the proc_frames of all temporary
procedures the plug-in is currently running. By properly disposing the
GimpPlugInProcFrame, the progress window and its cancel button in
above bug get destroed on first click, and the user has no chance of
trying to kill an already finalized plug-in again.
(cherry picked from commit eac70cc513)
2012-11-05 01:17:01 +01:00
Michael Natterer
3e72a9215e Bug 687561 - Edit/Modules crashes immediately
Don't pass GTK_STOCK_CLOSE as response_id to
gtk_dialog_set_alternative_button_order(), it's GTK_RESPONSE_CLOSE.
(cherry picked from commit d4f85b24b1)
2012-11-04 15:48:41 +01:00
Marco Ciampa
84461fd759 Small fix in italian translation. 2012-11-03 00:12:36 +01:00
Marco Ciampa
8c0fd99d89 Small typo fixes in italian translation. 2012-11-02 20:30:42 +01:00
Michael Natterer
855246391f Bug 677733 - Export image: duplicate list item for TIFF export
Don't mark a procedure as file procedure just because a mime-type or
thumbnail loader is registered for it. Only registering as load or
save handler should set the file_proc flag. This prevents plug-ins
from doing wrong things and would also fix the behavior fixed in the
commits below.
(cherry picked from commit dcaba4f1d1)
2012-11-01 19:26:37 +01:00
Michael Natterer
fde801cb89 Bug 677733 - Export image: duplicate list item for TIFF export
Don't register a mime-type for the alternative file-tiff-save2
procedure, it's not supposed to be registered as file procedure, and
only usable from scripts anyway.
(cherry picked from commit 9615f233ba)
2012-11-01 19:23:10 +01:00
Michael Natterer
551679f7c4 Bug 677733 - Export image: duplicate list item for TIFF export
Don't register a second file procedure for extension-less exporting as
XMC, this approach is totally bogus. Fixes the duplicate XMC entry in
File->Export.
(cherry picked from commit f3f72b720c)
2012-11-01 19:20:00 +01:00
Marco Ciampa
edf5af1073 Updated italian translation. 2012-10-31 22:38:18 +01:00
Michael Natterer
6ed49d3997 Bug 687256 - Please explain the terms wheel, curve, axis
Add translator comments to GimpDeviceInfoEditor.
(cherry picked from commit 90608d3a22)
2012-10-31 21:15:59 +01:00
Michael Natterer
a8f96a5e3a app: add a translator comment for _("%s Message")
(cherry picked from commit 9efda84818)
2012-10-31 16:08:43 +01:00
Massimo Valentini
7831da547a Bug 676413: Text to Path cuts off without covering the whole layer
Use an unbounded cairo_recording_surface to extract a
cairo_path_t from a pango_layout.
2012-10-30 18:07:06 +01:00
Marco Ciampa
edb7125227 Updated italian translation. 2012-10-29 22:54:37 +01:00
Marco Ciampa
d9e83effd4 Update italian translation. 2012-10-29 01:23:10 +01:00
Marco Ciampa
88a13a874a Updated italian translation. 2012-10-29 01:05:23 +01:00
Michael Natterer
4187c415fb Bug 687070 - Modifier+Space doesn't work as shortcut
Don't allow to assign Modifier+Space shortcuts, there is so much code
dealing with Space in canvas event handling, we can't have it invoke
arbitrary actions at the same time.
(cherry picked from commit 99dfc5930f)
2012-10-28 23:36:31 +01:00
Dimitris Spingos
c465603540 Updated Greek translation 2012-10-26 18:11:17 +03:00
Marco Ciampa
9821dea3ca Small fix in italian translation. 2012-10-25 11:02:08 +02:00
Michael Natterer
19b9ae79da Bug 685445 - color-to-alpha plugin crashes (use-after-free)
gimp_tile_put(): make sure we don't free libgimp's tile data twice in
the non-SHM case. I could never reproduce the bug, but I'm pretty sure
this fixes it. The change in gimpprotocol.c is just cleanup.
(cherry picked from commit 0a5059da51)
2012-10-22 19:05:16 +02:00
Massimo Valentini
b1a6ac7060 Bug 686379: In the JPEG save dialog, checking/unchecking XMP...
saving, don't update JPEG size
2012-10-22 18:26:13 +02:00
Massimo Valentini
66b4aa2d34 Bug 684483 - Text tool: crash after double clicking text
It seems that when the undo action reverts a text -> mark-up change
(or v.v.)  the notifications are inverted, first is emitted the new
value notification and successively the property becoming NULL. The
result is that gimp_text_buffer_set_{text,mark-up} is called last with
NULL, unsetting both text_buffer text and mark-up.

The right way to do it is to always prefer "markup" over "text" if
markup is present, no matter if the notification was for "markup" or
"text".
(cherry picked from commit 9b58e2ba0c)
2012-10-22 15:42:43 +02:00
Michael Natterer
e41e5ab643 Bug 686602 - missing EXIF_CFLAGS when building plug-ins/file-psd
Apply patch from John Hein which adds EXIF_CFLAGS to INCLUDES.
(cherry picked from commit 890ae48330)
2012-10-22 15:02:36 +02:00
Michael Henning
f45349e74c app: Save the maximized state of the main window in the sessionrc file.
(cherry picked from commit 89760cf044)

This is technically a new feature because it adds new stuff to
sessionrc, but on the other hand not handling maximized state in
sessionrc is worse, therefore merged to 2.8.
2012-10-22 00:23:15 +02:00
Michael Natterer
bc2b0d117d Bug 686523 - Text tool: text editor not shown on empty text box
gimp_text_tool_options_notify(): always show the editor, also when no
text object exists yet. There was no reason for this limitation.
(cherry picked from commit 2b3e5ebd78)
2012-10-21 23:32:17 +02:00
Jernej Simončič
65aa832148 Installer: add Spanish translation 2012-10-19 14:17:46 +02:00
Jernej Simončič
55d4af3d6b Installer: fix non-ASCII characters in ReadyMemo associations text 2012-10-19 14:01:56 +02:00
Jernej Simončič
31e2074ce3 Installer: add Brazillian Portuguese and Russian translations to install script 2012-10-19 13:51:30 +02:00
Jernej Simončič
f26e5cffe7 Installer: fix permissions 2012-10-19 13:51:06 +02:00
Jernej Simončič
bbe007c8d7 Installer: add Russian translation 2012-10-19 13:50:34 +02:00
Michael Natterer
ee38c196e2 plug-ins: fix #ifdefs to fix build error and warnings in screenshot.c
(cherry picked from commit bc87bf5fe9)
2012-10-17 11:56:19 +02:00
Michael Natterer
8689c3108f authors.xml: add Simone Karin Lehmann
(cherry picked from commit 1920c2bcab)
2012-10-16 13:29:11 +02:00
Martin Srebotnjak
d895ee7972 Updated Slovenian translation 2012-10-16 08:39:57 +02:00
João S. O. Bueno
527d24bde3 Adding Brazilian Portuguese translation for GIMP-Windows install 2012-10-15 10:00:10 -03:00
Michael Natterer
384851f5ea Bug 686103 - Incorrect gimpfu documentation
Add missing "None" default values to PF_IMAGE and PF_DRAWABLE
parameters in the procedure registration example.
(cherry picked from commit e8eaeb606f)
2012-10-14 21:32:49 +02:00
Simone Karin Lehmann
f3c1186e5f Bug 683617 - Can't take screenshots (Mac OS)
Use the standard Mac OS X screenshot utulity, it supports
everything: delay, capture decoration, capture region, even
the mouse pointer.
(cherry picked from commit 85445c88c3)
2012-10-14 17:10:22 +02:00
Michael Natterer
0ed086d511 Bug 682585 - Edit/Modules: pressing any key crashes gimp
Don't crash if module-dialog.c: dialog_select_callback() is called
without any selected list item.
(cherry picked from commit 20279d6fd6)
2012-10-14 15:31:30 +02:00
Massimo Valentini
f9387909f3 Bug 592628: Scale Image adds asymmetric artifacts to image edges
second problem described, regarding the perceived shift.

NPOT sized symmetric images downscaled by a ratio greater
than 2 (src:dst > 2:1), still lose the symmetry. It is a
consequence of the intermediate halving step which is top
left aligned.
2012-10-13 15:02:05 +02:00
Massimo Valentini
e09233f080 Bug 592628: Scale Image adds asymmetric artifacts to image edges
first problem described.
2012-10-13 15:02:04 +02:00
Massimo Valentini
9d74224731 Bug 433436: transformation tools cause offsets 2012-10-13 15:02:04 +02:00
Massimo Valentini
e8a02362cd app: correct pixel-surround when sampling outside of a drawable
in correspondence of tiles crossings
2012-10-13 15:02:04 +02:00
Massimo Valentini
7172911bec app: properly sample lanczos kernel luts 2012-10-13 15:02:04 +02:00
Massimo Valentini
defef370c4 app: round to the nearest in gdouble -> guchar assignments 2012-10-13 15:02:04 +02:00
Massimo Valentini
023850bf0d app: remove unused code
levelx and levely are 0 initialized and possibly increased
never become negative.
2012-10-13 15:02:04 +02:00
Daniel Mustieles
75f470a56a Updated Spanish translation 2012-10-13 12:30:18 +02:00
Michael Natterer
634ae4a2cf Bug 686025 - Closing a tab closes wrong tab
Replace /* FIXME: switch tabs */ with an actual call to
gimp_image_window_set_active_shell(). WTF...
(cherry picked from commit 56c6935a0c)
2012-10-13 00:24:04 +02:00
Michael Natterer
e000f106bf Bug 685797 - all python plug-ins are broken after 3b55877a
Remove the privately added GimpItemComboBox class instead, it confuses
the hell out of python. Instead, use g_object_set,get_data() to manage
the newly needed members, and code duplication.
(cherry picked from commit d6cf29e8c4)
2012-10-10 23:13:12 +02:00
Piotr Drąg
d503425893 Updated Polish translation 2012-10-09 15:48:51 +02:00
Michael Natterer
2cd165a8b8 Bug 682742 - Module manager: turning off modules has no effect
Use gimp_config_writer_string() instead of gimp_config_writer_printf()
to serialize module-load-inhibit so backslashes and other stuff gets
properly escaped.
(cherry picked from commit 6c41f58fea)
2012-10-09 01:28:04 +02:00
Clayton Walker
4b46d7eb6d Bug 685560 - Add iso-codes to osx moduleset
Language selector on osx doesn't show up because gimp was compiled without
iso-codes installed.
2012-10-08 16:59:43 -06:00
Michael Natterer
220af9ceec libgimpbase: on OSX move gimpdir to "~/Library/Application Support"
not just ~/Library. This clearly needs some manual migration
instructions for the old wrong location.
(cherry picked from commit 04fa9e8237)
2012-10-08 23:23:02 +02:00
Michael Natterer
3b55877aca Bug 378334 - Plugins with image drop-list crash when image is closed
Let image and item combo boxes connect to their own "changed" signal
first, and if the chosen image/item doesn't exist any longer,
reinitialize the combo box and select the first item instead.

Also fixes the type macros in gimpitemcombobox.h which were lacking a
')' and introduces an internal GimpItemComboBox class to hold the
common functionality.
(cherry picked from commit 4aaaa1a7fa)
2012-10-08 22:06:12 +02:00
Michael Natterer
fef53f6064 libgimpwidgets: make GimpIntStore behave a bit nicer (don't warn)
when used in "unexpected" ways. Where "unexpected" is as simple as
removing an item from the store.
(cherry picked from commit 85ea7771d5)
2012-10-08 21:35:30 +02:00
Mukund Sivaraman
2ba0519456 file-bmp: Don't use alpha channel with BI_RGB compression type
Don't use alpha channel with BI_RGB compression type in
BITMAPINFOHEADER images (bug #573090, bug #674398).
2012-10-08 09:15:47 +05:30
Mukund Sivaraman
49debcafdc file-bmp: Reject compression type BI_ALPHABITFIELDS as unsupported
These were erroneously parsed before. Now we reject them.  It is
trivial to implement support for them, but we can't test it unless
someone comes up with a sample BMP file.  They don't seem to be
available in the wild.
2012-10-08 09:15:45 +05:30
Michael Natterer
cb8cd73f33 Bug 635303 - Can't attach a dialog at the bottom of a minimized toolbox
Ensure a minimum size of the drop area and make sure it stays visible
at the bottom of a minimized toolbox. This wastes a few pixels at the
bottom of a toolbox that contains no dockables.
(cherry picked from commit 74bc070147)
2012-10-07 19:51:44 +02:00
Michael Natterer
ec9ed96fd7 HACKING: patches: recommend git-format-patch, not a repo to fetch from
Also update the developer mailing list address.
(cherry picked from commit d3506a13fc)
2012-10-07 15:20:59 +02:00
Michael Natterer
72ae6656e7 app: use g_get_monotonic_time() also for limiting display flushing
(cherry picked from commit a9353cd3a2)
2012-10-06 18:03:49 +02:00
Michael Natterer
cd6fa1d9c9 Bug 663582 - Brush outline is too slow
Even less drawing: let the timeout running if it triggers within the
50ms since the last drawing, so it's reduced to its actual purpose of
updating to the actual cursor position after framerate-limiter skipped
drawing.
(cherry picked from commit 52d933a1cc)
2012-10-06 16:42:14 +02:00
Michael Natterer
55792c2f30 Bug 663582 - Brush outline is too slow
One more try: merge the spirit of Alexia's patch, but don't disable
the timeout, only make sure the minimum fps is also applied when
drawing is triggered by gimp_draw_tool_resume().
(cherry picked from commit 4218d9342f)
2012-10-06 00:29:59 +02:00
Michael Natterer
8d6634c8eb Bug 663582 - Brush outline is too slow
Don't confuse microseconds with milliseconds: the 20 fps interval
is 50000, not 50, sigh.
(cherry picked from commit db5c952c4e)
2012-10-06 00:05:54 +02:00
Michael Natterer
bb1197ed63 Bug 684429 - Unable to edit text: error message states "problems..."
This fix is entirely sick, so is our method of serializing units,
which we write out as (unit foo bar) instead of (unit "foo bar"). The
assumption that caused this shit was that a unit's "identifier" is
really an identifier in the C-ish sense, when in fact it's just a
random user entered string.

Here, we try to parse at least the default units shipped with gimp,
and we add code to parse (unit "foo bar") in order to be compatible
with future correct unit serializing.
(cherry picked from commit 0f7ac38682)
2012-10-04 23:58:40 +02:00
Michael Natterer
d4cfda87ff libgimpbase: improve warning when a string can't be converted to a GimpUnit
(cherry picked from commit 38a8e67e03)
2012-10-04 23:58:29 +02:00
Michael Natterer
b03591e405 Bug 663582 - Brush outline is too slow
Keep around the last drawing time in GimpDrawTool and make sure we
draw at least with a frame rate of around 20 fps, which feels
reasonably non-laggy.
(cherry picked from commit fd4e220c28)
2012-10-04 20:44:58 +02:00
Michael Natterer
7deac97a9a Bug 684945 - Export can incorrectly default to changing format...
Fix default export extension to be as specified:

1. last export of this image
2. imported extension
3. last export of any image
4. png

2 and 3 were reversed in the code.
(cherry picked from commit aa6151d1af)
2012-10-02 23:09:57 +02:00
Michael Natterer
5f04bf2684 Bug 684923 - Fix script-fu build on OpenBSD/NetBSD
Apply patch from Brad Smith which defines AI_ADDRCONFIG
if it doesn't exist.
(cherry picked from commit a2c8759fbf)
2012-10-02 22:13:27 +02:00
Michael Natterer
018a02d8da Bug 685086 - hangs while opening damaged XCF file
Fix crash for this specific XCF corruption (XCF damaged in the middle
of a parasite header). Instead, abort loading immediately.
(cherry picked from commit 191c2c15ef)
2012-10-02 22:04:32 +02:00
Rūdolfs Mazurs
f7990128b0 Updated Latvian translation 2012-09-29 13:52:27 +03:00
Rūdolfs Mazurs
a6c404d231 Updated Latvian translation 2012-09-29 13:49:11 +03:00
Michael Natterer
027c744227 Bug 684698 - Preferences-Folders: only 15 folder items accepted
Raise "max_paths" from 16 to 256 in all calls to gimp_path_parse().
(cherry picked from commit 2a30a2bb74)
2012-09-26 23:31:48 +02:00
Timo Jyrinki
0bd7875e5b Small Finnish translation fix 2012-09-26 11:54:46 +03:00
Michael Natterer
5745a4fae2 Bug 684785 - typo in log message
Apply patch from Okano Takayoshi that fixes the typo.
2012-09-25 22:03:35 +02:00
Andika Triwidada
4942105604 Updated Indonesian translation 2012-09-24 19:24:26 +07:00
Piotr Drąg
192ddf18e7 Added Polish translation of the installer 2012-09-23 17:00:01 +02:00
Ville Pätsi
c1ed52275d Support file dates set to before the start of time
(cherry picked from commit 9fe4e5fad9)
2012-09-21 19:55:57 +02:00
Mukund Sivaraman
b38d44220f file-bmp: Fix order of data in RGBA_8888 images
See #678250, #678252, etc. for example bug reports.

This fix should be sufficient in fixing BMP output, but it looks
like some apps like Firefox have broken BMP loaders which do not
care for the masks. We would have to change the masks for them.
2012-09-21 20:29:03 +05:30
Mukund Sivaraman
2af0e14370 file-bmp: All 16 and 32-bpp files need the masks to be written
See #678250, #678252, etc. for example bug reports.
2012-09-21 20:29:01 +05:30
Michael Natterer
0d879c2aae app: plug string leak in gimp_image_format_display_uri()
(cherry picked from commit 7597b83bd8)
2012-09-21 10:35:22 +02:00
Seong-ho Cho
c3eda35f10 Updated Korean translation 2012-09-15 20:07:56 +09:00
Michael Natterer
61aa1ea510 Bug 683791 - Free select tool constraint key
Fix condition that constrains angles to 15°, its bracketing was wrong.
(cherry picked from commit 9b927ba0cd)
2012-09-14 11:06:21 +02:00
Michael Natterer
991d42c85e Bug 683553 - Spinscale scrollvalues in Brushsize are much too smal
Set the step/page increments to 1.0/10.0 for brush size and to 0.1/1.0
for aspect ratio. the previous values were way too small.
(cherry picked from commit 2c3a046d83)
2012-09-11 20:31:19 +02:00
Martin Srebotnjak
844fc444b5 Updated Slovenian translation 2012-09-10 15:55:38 +02:00
Taijuin
c56cf23c82 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-09-10 19:13:56 +08:00
Marco Ciampa
f628dcf49f Updated italian translation. 2012-09-10 12:22:19 +02:00
Michael Natterer
5ab0215794 app: add -framework Carbon to LDFLAGS on OSX
I have no clue how anyone was able to build since this
got broken.
(cherry picked from commit 205645b163)
2012-09-09 20:12:08 +02:00
Seong-ho Cho
bae709d0a9 Updated Korean translation 2012-09-09 17:59:41 +09:00
Michael Natterer
603ae6334b Bug 655684 - After saving an image with geotags you cannot...
Apply patch from Hartmut Kuhse which fixes encoding of
XMP_TYPE_GPS_COORDINATE.
(cherry picked from commit aecef113ab)
2012-09-09 00:56:55 +02:00
Michael Natterer
d4ebc9562d app: add a workaround to make GimpModuleDB's "verbose" flag work
so we get module output from gimp --verbose.
(cherry picked from commit 4db6a970de)
2012-09-08 12:50:41 +02:00
Michael Natterer
f3a4200e72 Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
(cherry picked from commit e546f2b43b)
2012-09-07 00:00:24 +02:00
Nils Philippsen
f0dae90f23 file-cel: make generating thumbnails more robust
Ran non-interactively, file-cel could crash e.g. if loading an image to
generate a thumbnail, because there is no way to specify a palette file
in that case.
(cherry picked from commit 96ce2c936d)
2012-09-06 12:52:13 +02:00
Michael Natterer
029d9ab9a5 Revert "Bug 683381 - Inverted alpha behavior of 16-bit Targa files"
This reverts commit e2915eba7c.
2012-09-05 23:34:59 +02:00
Mike Gran
e2915eba7c Bug 683381 - Inverted alpha behavior of 16-bit Targa files
file-tga.c (upsample): swap alpha behavior
(cherry picked from commit dc00fb57a0)
2012-09-05 22:52:39 +02:00
Bruce Cowan
06342f26c9 Updated British English translation 2012-09-05 12:51:09 +01:00
Michael Natterer
e2059dde74 Bug 683050 - Copying a layer group to a new xcf results in portions...
Use gimp_item_translate() not gimp_item_set_offset() to position
dropped layers, because the latter doesn't affect child layers.
(cherry picked from commit 9ab3abc98b)
2012-09-05 13:05:45 +02:00
Michael Natterer
0e2bce2b82 app: make handling of coordinates more robust against broken input drivers
Initialize the axes[] array with zeros and change pressure curve
mapping to not try to "interpolate" shit like NaN and crash.
(cherry picked from commit c7b9728cc8)
2012-09-05 11:37:47 +02:00
taijuin
20449b1176 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-09-05 14:03:58 +08:00
Daniel Mustieles
2fb04eaeea Updated Spanish translation 2012-09-03 12:54:15 +02:00
Michael Natterer
b8cd7348cc Bug 678452 - Libgimp drawable combo boxes are not aware of layer groups
Add all a tree's items to the combo boxes. Try to visualize the tree
structure by prepending '-'s, but that could probably need some
suggestions for improvement.
(cherry picked from commit b955205676)
2012-09-03 02:24:28 +02:00
Piotr Drąg
2b5edbabd2 Updated Polish translation 2012-09-03 01:52:20 +02:00
Michael Natterer
b142ec6a35 Bug 681699 - Inapplicable files are listed with 'All images' filter...
In order the fix the obvious confusion, add another file filter which
contains all the types that are savable with the dialog, name it
either "All XCF images" or "All export images", and make it the
default filter.
(cherry picked from commit 14f6d5ee44)
2012-09-02 23:25:43 +02:00
Michael Natterer
4364989869 build: more Info.plist adjustments 2012-08-31 18:52:32 +02:00
Michael Natterer
ebe673ea49 build: fix more Info.plist keys to be as documented 2012-08-31 09:08:05 +02:00
Michael Natterer
625431db60 build: CFBundleIdentifier should be org.gimp.gimp not org.gimp.GIMP 2012-08-30 09:48:02 +02:00
Clayton Walker
06439dea64 build: update OSX build files.
Include fonts.conf with sane defaults. Include gimprc and gtkrc for
sane defaults. Update launcher script to fix first time startup crash
and cage tool crash. Update gimp-python.bundle to properly rename
paths in linked libraries. Update gimp.modules to include svg support.
2012-08-30 01:09:02 +02:00
Michael Natterer
b07473775a build: fix version numbers and bundle identifier in Info.plist 2012-08-28 19:39:47 +02:00
Michael Natterer
dc5aa9adbe build: fix typo in osx moduleset: s/popper/poppler/ 2012-08-28 19:03:39 +02:00
Martin Srebotnjak
f6c08d94bd Updated Slovenian translation 2012-08-28 15:42:45 +02:00
Massimo Valentini
2f274f0904 Bug 682454: Plug-in crashed
plug-in-metadata-decode-exif makes use of the exif parasite
attached to the image few lines above.

and exif_data->size is the size of the thumbnail buffer that
starts at exif_data->data and not at exif_data.

==4677== Invalid read of size 1
==4677==    at 0x4A0A130: memcpy@@GLIBC_2.14 (/builddir/build/BUILD/valgrind-3.7.0/memcheck/mc_replace_strmem.c:837)
==4677==    by 0x4E440F8: gimp_write (gimp-2-8/libgimp/gimp.c:1726)
==4677==    by 0x5BDD27E: gimp_wire_write (gimp-2-8/libgimpbase/gimpwire.c:174)
==4677==    by 0x5BD9D41: _gp_params_write (gimp-2-8/libgimpbase/gimpprotocol.c:1748)
==4677==    by 0x5BDDA46: gimp_wire_write_msg (gimp-2-8/libgimpbase/gimpwire.c:296)
==4677==    by 0x5BDAE17: gp_proc_run_write (gimp-2-8/libgimpbase/gimpprotocol.c:305)
==4677==    by 0x4E4513E: gimp_run_procedure2 (gimp-2-8/libgimp/gimp.c:993)
==4677==    by 0x4E4544B: gimp_run_procedure (gimp-2-8/libgimp/gimp.c:926)
==4677==    by 0x40BD36: gimp_metadata_store_exif (gimp-2-8/plug-ins/file-jpeg/gimpexif.c:69)
==4677==    by 0x406EA4: load_image (gimp-2-8/plug-ins/file-jpeg/jpeg-load.c:343)
==4677==    by 0x405A2E: run (gimp-2-8/plug-ins/file-jpeg/jpeg.c:235)
==4677==    by 0x4E44AD8: gimp_main (gimp-2-8/libgimp/gimp.c:1992)
==4677==    by 0x30A0421734: (below main) (in /usr/lib64/libc-2.15.so)
==4677==  Address 0x8f75e01 is 1 bytes after a block of size 64 alloc'd
==4677==    at 0x4A06F18: calloc (/builddir/build/BUILD/valgrind-3.7.0/coregrind/m_replacemalloc/vg_replace_malloc.c:566)
==4677==    by 0x8AC304B: exif_data_new_mem (/home/massimo/libexif/libexif/exif-data.c:111)
==4677==    by 0x8AC312D: exif_data_new (/home/massimo/libexif/libexif/exif-data.c:95)
==4677==    by 0x407224: load_image (gimp-2-8/plug-ins/file-jpeg/jpeg-load.c:311)
2012-08-26 17:41:24 +02:00
Alexandre Prokoudine
1fbdd50249 Adjusted default values in the Drop Shadow script to help people produce less ugly artwork 2012-08-25 20:13:28 +04:00
Khaled Hosny
d812886cdf Updated Arabic translation 2012-08-24 23:35:23 +02:00
Michael Natterer
69397a4c0c configure: post-release version bump to 2.8.3 2012-08-23 22:46:11 +02:00
Michael Natterer
a42a02e1a7 app: adapt tests to file_save() API change 2012-08-23 21:06:41 +02:00
Mikael Magnusson
1ba763e1dc NEWS: fix another small typo 2012-08-23 20:10:20 +02:00
Michael Natterer
846ce09b83 configure: bump version to 2.8.2 and commit regenerated files 2012-08-23 20:08:27 +02:00
Mikael Magnusson
92d400a239 NEWS: fix small typo 2012-08-23 20:07:51 +02:00
Michael Natterer
fef532a108 devel-docs: add the new even/odd micro version policy to release-howto 2012-08-23 19:56:15 +02:00
Jernej Simončič
f3788ae9c3 Installer: use ${gimp_installation_dir} when setting environment instead of
hardcoding installation path
2012-08-23 19:32:48 +02:00
Michael Natterer
2048d65ac1 NEWS: update for 2.8.2 2012-08-23 19:27:16 +02:00
Piotr Drąg
037af495ad Updated Polish translation 2012-08-22 01:44:56 +02:00
Daniel Mustieles
d16776ecb6 Updated Spanish translation 2012-08-20 20:07:00 +02:00
Daniel Mustieles
06835ad73c Updated Spanish translation 2012-08-20 20:04:46 +02:00
Piotr Drąg
4e46009b6b Updated Polish translation 2012-08-20 15:02:24 +02:00
Nils Philippsen
6b642a26da file-gif-load: fix type overflow (CVE-2012-3481)
Cast variables properly to avoid overflowing when computing how much
memory to allocate.
(cherry picked from commit 43fc9dbd8e)
2012-08-16 12:27:37 +02:00
Jan Lieskovsky
4347b3496a file-gif-load: limit len and height (CVE-2012-3481)
Ensure values of len and height can't overflow g_malloc() argument type.
(cherry picked from commit d95c2f0bcb)
2012-08-16 12:27:37 +02:00
Nils Philippsen
a21aceedf1 file-cel: use g_set_error() for errors instead of g_message()
(cherry picked from commit 86f4cd39bd)
2012-08-14 12:05:00 +02:00
Nils Philippsen
89f4c4042f file-cel: use statically allocated palette buffer
(cherry picked from commit 69b98191cf)
2012-08-14 12:04:49 +02:00
Nils Philippsen
a605d0c4d5 file-cel: validate header data (CVE-2012-3403)
(cherry picked from commit b772d1b84c)
2012-08-14 12:04:41 +02:00
Nils Philippsen
3db516f1e7 file-cel: check fread()/g_fopen() return values and pass on errors
(cherry picked from commit 797db58b94)
2012-08-14 12:04:18 +02:00
Michael Natterer
24130eec55 Bug 681799 - Canvas size doesn't show preview after canceling once
gimp_viewable_get_pixbuf(): if there is a cached pixbuf of the right
size, actually return it, instead of the local "pixbuf" variable which
is always NULL.
(cherry picked from commit 276b507285)
2012-08-14 09:30:21 +02:00
Jiro Matsuzawa
bf9f91923c [l10n] Update Japanese translation
Modify the About label
2012-08-12 12:00:12 +09:00
Muhammet Kara
f63d58a554 [l10n]Updated Turkish translation 2012-08-09 10:07:00 +03:00
Praveen Illa
31ef6fb398 Updated Telugu Translation 2012-08-09 00:17:46 +05:30
Praveen Illa
b35c3381b1 Updated Telugu Translation 2012-08-09 00:01:38 +05:30
Piotr Drąg
47b0212a77 Updated Polish translation 2012-08-08 02:02:56 +02:00
Michael Natterer
b91f60602a Bug 678297 - Cannot find Page Setup in Gimp 2.8
Embed the page setup dialog only on non-windows systems. This
effectively reverts bdc3f7e7e0 but puts
the diff in #if[n]def EMBED_PAGE_SETUP which is defined as
!G_OS_WIN32. Did not revert the bug fixes that were mixed with
the original embedding patch.
(cherry picked from commit 73fc1df8ff)
2012-08-07 16:06:51 +02:00
Clayton Walker
15c8b3f850 Update osx build scripts, readme, and fix font issue 2012-08-05 00:29:48 +02:00
Michael Natterer
209116fcad Bug 678732 - gimp-image-insert-layer inserts into a wrong place...
Fix the docs, the function does what it's supposed to do.  Passing
"0, -1" actually means "insert where the ui would insert" and is
supposed to be used when e.g. scripts create layers.
(cherry picked from commit e620eb8cef)
2012-08-04 02:21:59 +02:00
Michael Natterer
92f348a96c app: improve error message when failing to load an ABR version 6 brush
(cherry picked from commit 47c94fc228)
2012-08-04 00:06:34 +02:00
Michael Natterer
977311dff8 Bug 680432 - metadata.exe keeps dying
Based on a patch by Hartmut Kuhse, run all strings through
gimp_any_to_utf8() which always returns something that's UTF-8, even
if it's only "(invalid UTF-8 String)". Better than crashing.
(cherry picked from commit c207e395fd)
2012-07-31 15:18:51 +02:00
Michael Natterer
3445d5f214 Bug 669795 - Toolbox can't be shrinked to 1 or 2 columns
Reduce the requested width of the "You can drop foo here" label to 16
pixels, which makes is look a bit crappy, but at least the toolbox
becomes shrinkable to < 3 columns. Whoever keeps this empty space
around without using it shall henceforth be punished by having to see
that distorted and misplaced label.
(cherry picked from commit 573faa39b0)
2012-07-30 18:08:28 +02:00
Michael Henning
7fd0895c0c Bug 680795 - GIMP segfaults in gimp_clipboard_set_buffer when...
Fix segfault in gimp_clipboard_set_buffer when n_target_entries is 0.
(cherry picked from commit e060da8278)
2012-07-30 16:58:25 +02:00
Michael Natterer
64b1ade7b0 Bug 586462 - Layer inserts misplaced
Another attempt to fix paste/drop positions for good.

Paste/drop target is either the selected area of a drawable, the
drawable itself, or the image:

- if the paste is larger than the target, center on the target
- if there is a viewport, and the viewport intersects with the
  target, center on the intersection
- otherwise, center on the target

Finally, if we did viewport-centered pasting, make sure the paste is
as completely within image bounds as possible.
(cherry picked from commit eda6fa1c14)
2012-07-30 16:28:25 +02:00
Seong-ho Cho
67525e4c6b Update Korean translation 2012-07-29 09:41:48 +09:00
Marco Ciampa
7d985af68f Fixed italian po files plural forms 2012-07-28 14:12:54 +02:00
Marco Ciampa
d400813027 Small fix in italian windows setup translation. 2012-07-28 00:03:13 +02:00
Jernej Simončič
049258a701 Installer: adjust associations label height automatically according to text length 2012-07-27 22:05:13 +02:00
Jernej Simončič
757b5709e4 Installer: include Italian translation in script 2012-07-27 00:51:49 +02:00
Jernej Simončič
5f646592a2 Installer: request restart if files couldn't be deleted during uninstall 2012-07-27 00:49:28 +02:00
Marco Ciampa
cff132d90b Added Windows installer italian translation. 2012-07-27 00:36:23 +02:00
Michael Natterer
cab6d84867 Bug 677987 - Don't allow to assign keybindings with arrow keys...
Disable assigning arrow-key bindings in gimpactionview.c
(cherry picked from commit decc03ae04)
2012-07-26 18:34:51 +02:00
Michael Natterer
d6091dbce6 Bug 678890 - Selection box handles do not respond after changing layer
Make sure that temporarily setting/unsetting tool->control's "preserve
tool across image changes" does not mess up the default value:

Introduce gimp_tool_control_push/pop_preserve() which restores the old
state automatically, and use it in all tools, instead of saying
set_preserve(TRUE/FALSE) around image changes.
(cherry picked from commit 078128bb09)
2012-07-26 18:19:41 +02:00
Michael Natterer
0a450f8e22 Bug 680531 - Function gimp-context-get-brush-size takes size argument...
The context getters need PDB @outargs, not @inargs. This "API change"
is OK in stable because the API was totally unusable before this fix.
(cherry picked from commit 01dffdc276)
2012-07-26 16:30:31 +02:00
Jernej Simončič
7506a26940 Installer: move language files to a subdirectory 2012-07-21 22:50:02 +02:00
Michael Muré
a56ae5a82d fix autogen.sh to work with automake 1.12 2012-07-18 09:13:56 +09:00
Michael Natterer
f4ce57aa97 Bug 676566 - Window title becomes "Untitled" after exporting without saving
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().

Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.

Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.

(cherry picked from commit 220b28677b)
2012-07-17 22:59:09 +02:00
Jernej Simončič
8057908853 Installer: handle /32 properly when reboot is needed before install can continue 2012-07-16 22:20:12 +02:00
Jernej Simončič
a125d8dacc Installer: remember /32 switch between runs 2012-07-14 16:06:34 +02:00
Jernej Simončič
862bbb829f Installer: add /32 command-line parameter to force install of 32-bit version on x64 2012-07-14 14:16:21 +02:00
Michael Natterer
c3e904fab1 app: don't ask to confirm reverting "Untitled" when the image was imported
(cherry picked from commit b0170ee5ea)
2012-07-14 00:12:38 +02:00
Michael Natterer
d8e71085cc app: create thumbnails also for imported files, not only for XCFs
file_open_with_proc_and_display(): Use gimp_image_get_any_uri() to
check if the opened file has the same URI as the one passed in so
the logic works for non-XCF too.
(cherry picked from commit afa81b5fbf)
2012-07-13 23:53:30 +02:00
Alexandre Prokoudine
d363043370 Updates and fixes to Russian translation 2012-07-12 12:46:06 +04:00
Michael Natterer
40deca6c04 Bug 679256 - SWM image tabs must have a minimum width
Set all tabs to the same width so very narrow images' tabs stay
clickable.
(cherry picked from commit 2c54f4b340)
2012-07-09 22:55:09 +02:00
Gabor Kelemen
ee4a81d418 Corrections to the Hungarian translation 2012-07-06 15:27:11 +02:00
Gabor Kelemen
917e2f9c90 Updated Hungarian translation by Andras Prim <gimme_at_primandras.hu> 2012-07-06 15:18:24 +02:00
Massimo Valentini
5d2933c51c app: don't pass a NULL widget to gtk_widget_event
<Alt>C C <Ctrl>1 <ESC> used to print:

(gimp-2.8:1): Gtk-CRITICAL **: IA__gtk_widget_event:
                assertion `GTK_IS_WIDGET (widget)' failed
2012-07-05 18:08:01 +02:00
Jernej Simončič
05da156b30 Installer: adjust association buttons width according to text length
(German text was way too long for the default button widths)

Also fix empty lines in Ready Memo on upgrades (Select Directory page
isn't shown for upgrades, so there's no install directory text shown)
2012-07-03 22:10:38 +02:00
Jernej Simončič
2b6bdfaa04 Installer: add German translation 2012-07-03 22:10:06 +02:00
Piotr Drąg
dca5b0896b Updated Polish translation 2012-07-02 20:27:38 +02:00
Massimo Valentini
b874c8af1e Bug 679082: Crash after using Rotate tool 2012-06-30 13:05:55 +02:00
Timo Jyrinki
ec6db4b994 Updated po-tips Finnish translation by Janne Peltonen. 2012-06-26 20:33:54 +03:00
Timo Jyrinki
d8b4de413a Updated Finnish translation by Janne Peltonen. 2012-06-26 20:18:26 +03:00
Marco Ciampa
8a0e26773c Updated italian translation. 2012-06-25 17:45:47 +02:00
Massimo Valentini
bf503ea7dd app: compress motion events up to the first release event
I'm not sure if it'd be better to compress only sequence
of contiguous motion events, thinking to the case of anticipating
a motion event before a modifier key press/release.
2012-06-24 13:23:10 +02:00
Massimo Valentini
313ef397cd Bug 677040: PDF export does not appear to handle font size...
...correctly unless image flattened

Font size was wrong unless in pixels and
gimp_drawable_type returns a GimpImageType
2012-06-21 19:04:31 +02:00
Jernej Simončič
8f2246578d Installer: display a warning when color depth < 32BPP 2012-06-21 00:12:43 +02:00
Jernej Simončič
f3085d2879 Installer: fix permissions, add .gitignore 2012-06-20 17:05:28 +02:00
Jernej Simončič
b99e80dc90 Installer: oops, remove duplicate function 2012-06-20 17:04:02 +02:00
Jernej Simončič
416dfc4584 Installer: allow override of system-wide configuration files with custom
versions during install
2012-06-20 16:34:53 +02:00
Piotr Drąg
8be0541df5 Updated Polish translation 2012-06-19 21:51:43 +02:00
Massimo Valentini
bf8e42330b Bug 677375: tools do not strictly follow mouse...
pointer (missing motion events)

Disable calls gimp_help_set_help_data for shell->canavs
2012-06-18 18:14:42 +02:00
Dimitris Spingos
df1752f287 Updated 2 Greek translations 2012-06-17 12:48:34 +03:00
Martin Srebotnjak
6a5b3b61d7 Updated Slovenian translation 2012-06-16 22:20:06 +02:00
Daniel Mustieles
b16aab1e8e Updated Spanish translation 2012-06-13 10:08:31 +02:00
Mikael Magnusson
9eb45ed8d7 metadata: fix length passed to base64 decoder
(cherry picked from commit a4cd8637af)
2012-06-13 02:12:57 +02:00
Michael Natterer
310a8c4458 app: get the help_id from the right action in gimp_editor_add_action_button()
(cherry picked from commit 4fbf01baef)
2012-06-12 22:52:24 +02:00
Michael Natterer
d81669a671 Bug 677974 - GIMP suggests XCF as default export format
Only auto-add .xcf if it's a save (not an export) dialog, instead do
not auto-add anything and ask the user to enter an extension, that's
less mysterious than saving in the last-exported format which the user
maybe doesn't remember or want.
(cherry picked from commit 2f8d45611c)
2012-06-12 22:36:10 +02:00
Michael Natterer
687fbf4583 Bug 677823 - Shift + mouse click to link all layers does not work
This got lost during layer group porting, reimplement it, but restrict
"all layers" to the clicked layer's branch in the tree.
(cherry picked from commit 67b5a509b6)
2012-06-12 21:41:39 +02:00
Eulalia
8ec18b847c [l10n] Update Catalan translation 2012-06-10 22:56:11 +02:00
Albert F
6b63e85a88 [l10n] Update Catalan translation 2012-06-10 22:55:49 +02:00
Massimo Valentini
a4ecfde635 Bug 677375: tools do not strictly follow mouse...
pointer (missing motion events)
2012-06-10 17:20:43 +02:00
Kristian Rietveld
7212f9973d Avoid using CMFlattenProfile
This symbol is not available to 64-bit applications.  So put another
approach in place.

I can confirm that the code does not crash, but I do not know if it
works properly.  Mitch forced me to push anyway.
(cherry picked from commit 9514cf4871)
2012-06-09 22:58:45 +02:00
Marco Ciampa
9783b68d0f Little italian translation fix. 2012-06-09 20:31:41 +02:00
Massimo Valentini
0ba99a05ff Bug 673729: tiff plug in not working 2.8.0-RC1 windows install
implement win32 filename Unicode management in the plug-ins
to work-around a problem in libtiff TIFFFdOpen.

Based on a patch from Hartmut Kuhse.
2012-06-09 15:36:35 +02:00
Massimo Valentini
03f0a1ab57 Bug 677637: PDF export plug-in does not work
use g_fopen and cairo_pdf_surface_create_for_stream
to avoid file name encoding issues on Windows.
2012-06-09 15:36:35 +02:00
Massimo Valentini
41ce828243 Bug 645345: 'Color Management' display filter causes performance problems 2012-06-09 15:36:34 +02:00
Gil Forcada
2fb8ede280 Added nn to LINGUAS 2012-06-09 10:32:33 +02:00
Kolbjørn Stuestøl
25127e10ad --amend 2012-06-08 20:47:24 +02:00
Kolbjørn Stuestøl
df394ffae0 Updatet Norwegian 'po/nn.po' translations 2012-06-08 20:44:34 +02:00
Kolbjørn Stuestøl
77db64913d --amend 2012-06-08 20:27:59 +02:00
Kolbjørn Stuestøl
4cd5a2fb22 Updated Norwegian (nn) translations 2012-06-08 20:21:10 +02:00
Michael Natterer
242d71fd73 Bug 677262 - move the layer with the arrow keys, broken after...
commit 9ce8d4fae2. Fix the return_val
logic added in that commit, and make sure we always swallow arroy key
events, because we don't want focus keynav away from the canvas.
(cherry picked from commit f400bc49ca)
2012-06-08 00:23:39 +02:00
Michael Natterer
8a85b907ff build: include the basic-coretext module when building pango for OSX 2012-06-07 19:44:19 +02:00
Gabor Kelemen
954f72e4f9 Add hu to LINGUAS 2012-06-07 11:47:27 +02:00
Gabor Kelemen
d405dbb5ef Updated Hungarian po-libgimp translation by Andras Prim <gimme_at_primandras.hu> 2012-06-07 10:58:53 +02:00
Gabor Kelemen
e2a6c5974a Updated Hungarian translation by Andras Prim <gimme_at_primandras.hu> 2012-06-06 23:06:57 +02:00
Michael Natterer
0474376d23 Bug 676804 - file handling DoS for fit file format
Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on
broken/malicious fits files.
(cherry picked from commit ace4563159)
2012-06-06 21:23:53 +02:00
Michael Natterer
0e31638588 authors.xml: add Clayton Walker 2012-06-06 19:44:14 +02:00
Michael Natterer
1bf4f74ca5 menus: really remove the "Use GEGL" menu items this time
They were never meant to be in 2.8.
2012-06-06 19:44:13 +02:00
Nils Philippsen
b121388b03 text-brush: fix TypeError exception (rhbz#827826) 2012-06-06 14:07:11 +02:00
Gabor Kelemen
208e04c66c Added Hungarian translation for po-tags 2012-06-04 22:07:58 +02:00
Gabor Kelemen
81b03011ab Updated Hungarian translation for po-tips 2012-06-04 22:07:04 +02:00
Gabor Kelemen
b3e9473efa Updated Hungarian po-python translation by Andras Prim <gimme at primandras dot hu> 2012-06-04 21:55:31 +02:00
Massimo Valentini
c3bf36f3d6 app: remove a weak ptr when the object lives longer than the ptr
Closing the display filter editor with a filter selected
in the listview on the right, used to produce (quitting GIMP):

==32359== Invalid write of size 8
==32359==    at 0x8808DF5: g_nullify_pointer (glib/glib/gutils.c:2099)
==32359==    by 0x8358781: weak_refs_notify (glib/gobject/gobject.c:2469)
==32359==    by 0x4C3730A: gimp_color_display_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplay.c:197)
==32359==    by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359==    by 0x4C37EFA: gimp_color_display_stack_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplaystack.c:150)
==32359==    by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359==    by 0x53F1C3: gimp_display_shell_filter_set (gimp-2-8/app/display/gimpdisplayshell-filter.c:58)
==32359==    by 0x536A50: gimp_display_shell_dispose (gimp-2-8/app/display/gimpdisplayshell.c:765)
2012-06-04 19:32:41 +02:00
Massimo Valentini
bf7fa23beb Bug 676916: Filename garbled when you save .xcf.bz2...
or .xcf.gz files using non-ASCII characters
2012-05-31 19:35:29 +02:00
Daniel Mustieles
5ac0d10aad Updated Spanish translation 2012-05-31 14:12:30 +02:00
Massimo Valentini
c66b8c984c Bug 676871: GIMP reports false positive plugin crash after...
entering "quit()" in Python Console.
2012-05-29 13:10:44 +02:00
Mukund Sivaraman
e608b47ce8 file-compressor: Bug #676916 - Use g_open() and g_fopen() instead of libc 2012-05-28 14:17:30 +05:30
Andika Triwidada
3019fdc3fb Updated Indonesian translation of gimp plugins 2012-05-28 15:12:33 +07:00
Andika Triwidada
43d2b59849 Updated Indonesian translation of gimp-python 2012-05-28 14:12:02 +07:00
Andika Triwidada
df53bc6646 Updated Indonesian translation of script-fu 2012-05-28 14:07:40 +07:00
Andika Triwidada
8b0cbad26f Added Indonesian translation of gimp tags 2012-05-28 13:52:05 +07:00
Andika Triwidada
b02b78bffc Updated Indonesian translation for gimp tips 2012-05-28 13:35:53 +07:00
Michael Natterer
9ce8d4fae2 Bug 676872 - Image Properties keyboard shortcut Alt+Return Broken
Don't swallow key events which were not handled by the keyboard
controller.
(cherry picked from commit 6c9f1b5715)
2012-05-27 19:57:43 +02:00
Daniel Sabo
668891e745 app: use an idle source to dispatch GTK menu events in ige-mac-menu
in order to work around the crashes in bug #673264 and bug #674108.
(cherry picked from commit c1786fe753)
2012-05-27 19:10:30 +02:00
Wouter Bolsterlee
20c4a131c5 Updated Dutch translation 2012-05-27 16:39:46 +02:00
Wouter Bolsterlee
b803915631 Updated Dutch translation 2012-05-27 16:12:34 +02:00
Wouter
1c910a1b78 Updated Dutch translation 2012-05-27 15:17:32 +02:00
Wouter
3e5cc6ca50 Updated Dutch translation 2012-05-27 14:43:21 +02:00
Wouter
3c6c85c33e Updated Dutch translation 2012-05-27 14:31:46 +02:00
Jernej Simončič
5462f0bca0 installer: fix permissions 2012-05-27 11:40:23 +02:00
Jernej Simončič
b50145fb1a installer: Replace TButton with TNewButton 2012-05-27 11:38:27 +02:00
Jernej Simončič
354365857e Update zlib1.dll in Windows\System32 when it already exists there
This will prevent "The procedure entry point gzdirect could not be located in the dynamic link library zlib1.dll" from plugins
2012-05-26 19:59:47 +02:00
Michael Natterer
4437b90b63 Bug 676821 - No drag layers in "window layers", after commit...
Remove the button_release handler again, setting dnd_widget to NULL on
container change is enough to fix the crash I've seen, I added the
other handler just out of paranoia and apparently didn't test it.
(cherry picked from commit 92a3944442)
2012-05-25 21:27:50 +02:00
Massimo Valentini
0008be8484 Bug 673773: Colour of image changes with zooming
transform a right shift by 8 in the correct
division by 255 and rounds to the nearset
2012-05-24 19:42:42 +02:00
Clayton Walker
37a884a31b Update osx build files and README 2012-05-23 19:26:05 +02:00
Michael Natterer
ca5549a55e libgimpconfig: support $(gimp_installation_dir) in config paths
(cherry picked from commit f931f05006)
2012-05-23 11:52:31 +02:00
Michael Natterer
91665198d4 libgimpbase: add gimp_installation_directory()
which returns the toplevel directory of the running GIMP installation.
(cherry picked from commit 010b28f39e)

It's not exactly clean to add new API in 2.8.1, but this is so useful
for proper relocation, I've made an exception.
2012-05-23 11:51:44 +02:00
Michael Natterer
74c20f2222 Bug 676585 - Gimp crashes when writing in Arabic and clicking right arrow
Check for pango_layout_move_cursor_visually() returning a new index of
G_MAXINT, which indicates that we moved beyond the end of the layout,
and do nothing instead of trying to access the memory there.
(cherry picked from commit 7d280abd9a)
2012-05-23 09:47:29 +02:00
Michael Natterer
a4fb9692ae Bug 676522 - Changing tabs in single-window-mode should switch the active image
Change the active image when switching tabs in single-window-mode.
(cherry picked from commit c1cfe98d35)
2012-05-23 01:27:25 +02:00
Michael Natterer
e2ad99b98e app: set GimpContainerTreeView->dnd_renderer to NULL more reliably
specifically in button_release() and when the container changes, we
can badly crash in some situations otherwise.
(cherry picked from commit 27a767ee54)
2012-05-22 13:02:33 +02:00
sebul
75ac9cc230 Updated Korean translation 2012-05-22 02:40:12 +09:00
Daniel Winzen
ae741b527b Updated German translation 2012-05-20 22:10:53 +02:00
Clayton Walker
6b54e919f4 Files required for building gimp on osx 2012-05-19 18:28:51 +02:00
Piotr Drąg
8a6be41891 Updated Polish translation 2012-05-19 18:07:53 +02:00
Piotr Drąg
09e80d1a63 Updated Polish translation 2012-05-19 18:01:21 +02:00
Michael Natterer
6899757b09 app: make file_save() aware of the difference between overwrite and export
by having two booleans "export_backward" and "export_forward" in the
api instead of just an "export" one that would destroy the "imported
from" state. This change fixes the state of the "Overwrite" menu item,
so it stays visible until the file got either saved or exported to
another filename.

This also reverts commit a4beeecf2b, so
Ctrl-S is always invokable even if invisible.
(cherry picked from commit 39c18e9a48)
2012-05-18 18:59:10 +02:00
Massimo Valentini
187e20f367 Bug 675981: Export as JPEG "save defaults" "load defaults" doesn't work
oversight
2012-05-18 17:20:38 +02:00
Michael Natterer
4fdb1ec90a Bug 676279 - Ctrl or Shift causes selection tools to reset...
Make sure to not override the logic that separates the tool option's
selection mode from the one determined by modifiers, by blindly
calling gimp_modifiers_to_channel_op(state) on a zero state.
(cherry picked from commit 2d882dd64f)
2012-05-17 23:35:05 +02:00
Jernej Simončič
c8a3a4f19e Fix license - it was still GPL2 2012-05-17 17:44:43 +02:00
Jernej Simončič
a807095434 Fix permissions 2012-05-17 17:43:48 +02:00
Jernej Simončič
088c05e77f Fix language file (XP SP3 required instead of SP2) 2012-05-17 15:44:16 +02:00
Jernej Simončič
f6ae4c83ae Skip asking for install directory when upgrading 2012-05-17 15:43:28 +02:00
Christian Kirbach
2a88a5ce02 Updated German translation 2012-05-17 14:44:09 +02:00
Christian Kirbach
0b14297f0a Updated German translation 2012-05-17 14:36:27 +02:00
Michael Natterer
741daccf02 Revert "app (gimprc): Delete dead assignment"
This reverts commit d6d2a0bbd1
and allows more than one unknown gimprc token again.

Fixes Bug 674096 - Strange behavior with gimprc
(cherry picked from commit 8851ec0b6e)
2012-05-17 01:19:20 +02:00
Michael Natterer
be2feeb111 Bug 676164 - Text Tool selects hidden layers
Also fix the other layer picking functions to not pick invisible
layers.
(cherry picked from commit b50e924df0)
2012-05-17 00:18:44 +02:00
Daniel Sabo
82533e7734 Bug 675875 - Gimp Quartz doesn't respond to file open events from finder
Add Carbon based apple events responder for kAEOpenDocuments
(cherry picked from commit 7d62e8370a)
2012-05-16 23:03:02 +02:00
Wouter Bolsterlee
942860ae32 Updated Dutch translation (manual backport from master) 2012-05-16 00:39:22 +02:00
Daniel Nylander
29dbea042e Updated Swedish translation 2012-05-16 00:28:03 +02:00
Daniel Nylander
8dc87ae32f Updated Swedish translation 2012-05-16 00:26:50 +02:00
Daniel Nylander
780e88c353 Updated Swedish translation 2012-05-16 00:22:41 +02:00
Clayton Walker
0e5e5c912b build: start infrastructure to build GIMP.app on OSX 2012-05-15 23:48:50 +02:00
Michael Natterer
8d6004e063 Bug 676107 - Picking logic doesn't take group visibility into account
gimp_layer_get_opacity_at(): use gimp_item_is_visible() not
get_visible() so we use the layer's effective visibility.
(cherry picked from commit 4d1173570a)
2012-05-15 19:48:56 +02:00
Marco Ciampa
d137a44af3 Updated italian translation. 2012-05-15 10:00:24 +02:00
Praveen Illa
d8f535cc3c Updated Telugu Translation 2012-05-15 11:38:39 +05:30
Michael Natterer
1e402a46f0 Bug 675994 - Opening image with a saved selection breaks histogram updating
In fact, it broke much more than that because the way XCF loading
replaced the image's mask prevented the image's "mask-changed" signal
from ever being emitted. Add private API gimp_image_take_mask() which
properly sets the mask and use it for image construction and the XCF
selection loading hack.
(cherry picked from commit ab4c613a70)
2012-05-14 01:47:14 +02:00
Michael Natterer
601db43838 windows/installer: none of the files needs to be executable 2012-05-14 00:07:52 +02:00
Jernej Simončič
70ca141159 Windows installer - initial import 2012-05-14 00:01:17 +02:00
Michael Natterer
36bb8a625b app: default to half the physical memory for the tile-cache-size setting
Wanted to do this for ages but forgot...
2012-05-13 20:21:00 +02:00
Jihui Choi
ef9972da7a Update Korean translation 2012-05-14 00:48:50 +09:00
sebul
5a241911b5 Update Korean translation 2012-05-14 00:45:49 +09:00
Michael Natterer
a23a5692cc libgimpbase: implement relocation for OSX
Using [[NSBundle mainBundle] resourcePath]
(cherry picked from commit db1dda6e3f)
2012-05-12 20:58:25 +02:00
Michael Natterer
d8ce061715 libgimpbase: it's "GIMP" not "Gimp"
(cherry picked from commit 4805f875ef)
2012-05-12 16:49:44 +02:00
Rudolfs Mazurs
e87b912d70 Updated Latvian translation. 2012-05-12 16:24:38 +03:00
Michael Natterer
46127dc789 Move gimpdir and thumbnails to proper places on OSX
gimpdir goes to ~/Library/Gimp/x.y
thumbnails go to ~/Library/Caches/org.freedesktop.thumbnails

The thumbnail location is not standardized yet, but is the only
location that makes sense. Also fix user install to search old
gimpdirs to migrate in both Library and the classic location.
Remove the obsolete CABON_CFLAGS from all makefiles.
(cherry picked from commit 9112d68488)
2012-05-12 14:44:08 +02:00
Michael Muré
cb2de50697 cage tool: fix handle added in the wrong side of the cage
This happened when:
1) cage still open
2) clicking on the edge between the first and the last handle
2012-05-11 12:42:53 +09:00
Michael Muré
f8bcdcb9a5 Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.
Just check if there is enough handles before closing
2012-05-11 12:04:49 +09:00
Michael Henning
fa8a5a63ab Bug 568098 - Healing Tool doesn't work at the layer borders.
Fixes the row stride for the brush mask.
2012-05-10 20:13:27 +02:00
Michael Natterer
e5ef544559 app: make the popup previews transient to their parent's toplevel
so they don't appear below the dock. Seems to happen on OSX only,
but is the right things to do on all platforms.
(cherry picked from commit ffb559547c)
2012-05-10 19:51:19 +02:00
Piotr Drąg
97eaae4430 Updated Polish translation 2012-05-10 19:24:42 +02:00
Daniel Mustieles
136cea976f Updated Spanish translation 2012-05-10 18:06:14 +02:00
Khaled Hosny
097ed17822 Fix Arabic translation of tags-locale 2012-05-10 10:16:05 +02:00
Martin Srebotnjak
d661bc3403 Updated Slovenian translation 2012-05-10 09:36:43 +02:00
Martin Srebotnjak
c3d43d8378 Updated Slovenian translation 2012-05-10 09:36:07 +02:00
Michael Natterer
062d38d141 Bug 675399 - Mention that the image was at least exported in the close...
If the image was exported, mention it in the close warning dialog.
(cherry picked from commit 57d4680ab3)
2012-05-10 01:11:54 +02:00
Michael Natterer
c4d14752a7 Bug 630173 - a dockable open from an existing one appears under it
Show the new dock with gtk_widget_show_now(), which waits until it's
mapped, then call gdk_window_raise() explicitly. How sick...
(cherry picked from commit bd3f892f79)
2012-05-09 00:23:10 +02:00
Marek Černocký
8af18fb9d5 Updated Czech translation 2012-05-08 21:46:31 +02:00
Michael Natterer
7f37903b11 app: make GimpContainerPopup transient to its parent toplevel
so it doesn't appear under the dock it's invoked from. Only
needed on OSX, but the right thing to do on all platforms.
(cherry picked from commit 3545140ad8)
2012-05-08 21:36:05 +02:00
Jordi Mallach
562862a486 Fix Catalan translation for “tags-locale”. 2012-05-08 20:27:51 +02:00
Michael Natterer
8ec5e86514 AUTHORS: commit generated file 2012-05-08 08:08:05 +02:00
Sebul
a7c57d016f Updated Korean translation 2012-05-07 01:41:41 +09:00
Michael Natterer
7ef8a96465 app: don't call gimp_image_flush() when cancelling GimpImageMapTool
because the tool might be cancelled from some other place opening an
undo group, so flushing the image would update menus and whatnot while
that other operation is running, with unforeseeable side
effects. Also, flusing the image here is not needed because we didn't
change anything in the image. Instead, make sure manually that the
display is updated correctly after restoring GimpImageMapTool's
temporary editing.
(cherry picked from commit e7e8c9ef0a)
2012-05-05 21:48:13 +02:00
Michael Natterer
32a0c6355e app: fix UI tag matching to always work case-insensitively
Add gimp_tag_has_prefix() and use it in GimpTagEntry when completing
patrially entered tag names, and fix two uses of strcmp() in
GimpTagPopup to use gimp_tag_compare_with_string().
(cherry picked from commit 30b4fe8510)
2012-05-05 19:00:32 +02:00
Hleb Valoshka
1421545bd6 Updated Belarusian translation. 2012-05-05 15:07:02 +03:00
Sebastian Pipping
df1e7763fa Fix configure option --with[out]-bzip2 2012-05-05 01:59:32 +02:00
Michael Natterer
4c66e50763 app: make sure Ctrl+E doesn't invoke "Export to" when it's invisible 2012-05-05 00:17:51 +02:00
Khaled Hosny
862865e379 Updated Arabic translation 2012-05-04 18:19:29 +02:00
Marek Černocký
f5b184d0d7 Updated Czech translation 2012-05-04 15:23:12 +02:00
Hleb Valoshka
4be1d3471b Updated Belarusian translation. 2012-05-04 12:07:52 +03:00
Kiyotaka NISHIBORI
547e9ee713 [l10n] Update Japanese translation 2012-05-03 23:22:23 +09:00
Michael Natterer
5b59af7c2e libgimp: don't recurse infinitely in gimp_parasite_detach() 2012-05-03 00:35:03 +02:00
Michael Natterer
569c122137 libgimp: fix docs of deprecated functions 2012-05-03 00:25:08 +02:00
Michael Natterer
f32706a0d1 libgimp: don't recurse infinitely in deprecated gimpvectors functions 2012-05-03 00:24:19 +02:00
Mikael Magnusson
f7cffc0d6c authors.xml: Add Bernhard Stockmann 2012-05-02 17:02:29 +02:00
Michael Natterer
7757edd702 configure: post-release version bump to 2.8.1 2012-05-02 16:49:06 +02:00
333 changed files with 122730 additions and 103299 deletions

View File

@@ -145,6 +145,7 @@ The following people have contributed code to GIMP:
Tom Lechner
Elliot Lee
Marc Lehmann
Simone Karin Lehmann
Ray Lehtiniemi
Tobias Lenz
Frederic Leroy
@@ -267,6 +268,7 @@ The following people have contributed code to GIMP:
Brion Vibber
Helvetix Victorinox
Thorsten Vollmer
Clayton Walker
Rebecca Walter
Martin Weber
Rupert Weber
@@ -299,6 +301,7 @@ The following people have contributed art to GIMP:
Mike Schaeffer
Carol Spears
Jakub Steiner
Bernhard Stockmann
William Szilveszter

View File

@@ -88,14 +88,13 @@ part of recent Linux distribution releases.
Patches
-------
The best way to submit patches is to publish your git repository and
ask developers to git-fetch from you.
The best way to submit patches is to provide files created with
git-format-patch.
For bug fixes where the patch is small you can file a bug report at
It is recommended that you file a bug report at
http://bugzilla.gnome.org/ and attach your patch to it as a plain text
file, not compressed. If your patch is reasonably small you can submit
it to the gimp-developer@lists.xcf.berkeley.edu mailing list. You can
create the patch file with git-format-patch
it to the gimp-developer-list@gnome.org mailing list.
If the patch needs to be discussed, you should also consider using the
mailing list instead of Bugzilla because bug reports tend to be hard

636
NEWS
View File

@@ -7,637 +7,101 @@ This is the stable branch of GIMP. No new features are being added
here, just bug-fixes.
Changes in GIMP 2.8.0
=====================
Overview of Changes from GIMP 2.8.2 to GIMP 2.8.4
=================================================
Core:
- Add our own GimpOperationBrightnessContrast because GEGL one is different
- Move the OSX gimpdir to "~/Library/Application Support"
Plug-ins:
GUI:
- Fix some GFig rendering issues
Source and build system:
- Depend on Babl 0.1.10, GEGL 0.2.0 and some other new library versions
General:
- Bug fixes
- Translation updates
Changes in GIMP 2.7.5
=====================
UI:
- Minor application menu fixes on the Mac
- Make the toolbox arbitrarily resizable again
- Add axis labels to the dynamics curves to make them more obvious
- Fix dockable showing to do the right thing in both MWM and SWM
- Fix some glitches in the tool preset UI, like proper sensitivity
Core:
- Restore autoshrink functionality in the rectangle tools
- Allow smudge to work with dynamic brushes
- Make sure tool presets and tool options are consistent after loading
- Add automatic tags for the folders a file lives in
- Make the default Quick Mask color configurable
- Fix Color Balance so the "range" setting actually makes a difference
Plug-ins:
- Proper toplevel item sorting in the help browser
- Use libraries instead of launching programs in file-compressor
- Use the Ghostscript library instead of launching ghostscript
- Allow to switch off antialiasing when importing from PDF
- Embed the page setup in the main print dialog
- Port Gfig to cairo
- Better names for the default filters in save and export
- Make tool drawing (esp. the brush outline) much more responsive
- Remember the "maximized" state across sessions
- Simplify the splash image code a lot, makes it appear immediately again
- Allow the text tool to start on an image without layers
- Various fixes for text style attribute handling
- Set unconfigured input devices to eraser if GTK+ says they are erasers
- Make language selectable in Preferences on OSX
Libgimp:
- Add PDB API to modify a lot of paint and ink options
- Make libgimp drawable combo boxes aware of layer groups
- Make sure plug-in windows appear on top on OSX
- Fix item width in GimpPageSelector (used e.g. in PDF import)
Data:
Plug-ins:
- Add a new set of default brushes and tool presets from Ramon Miranda
- Better default values in the Drop Shadow script
- Fix a whole bunch of bugs in the BMP plug-in
- On OSX, use the system's screenshot utility
Developer documentation:
Installer:
- Update everything including app/ so all functions appear again
- Add Brazilian-Portuguese translation to the Windows installer
Source and build system:
- Remove the unmaintained makefile.msc build system
- Explicitly link plug-ins to -lm when needed
- Also create .xz tarballs
- Many improvements to the OSX bundle build system
- Support automake 1.13
General:
- Lots of bug fixes
- Tons and tons of translation updates
- Lots of translation updates
Changes in GIMP 2.7.4
=====================
UI:
- Add a close button to image tabs in single-window mode
- Improve the transform tools' undo strings to be more descriptive
- Render the layer's "eye" icon in inconsistent state if the layer is
visible, but one of its parents isn't
- Add proper stacking for canvas items, so things don't hide each other
- Make sure single-window-mode and multi-window-mode are always saved
consistently in sessionrc
Overview of Changes from GIMP 2.8.0 to GIMP 2.8.2
=================================================
Core:
- Fix "render_image_tile_fault: assertion `tile[4] != NULL' failed"
warnings that occurred for some image sizes
- Fix attachment of the floating selection when the gegl projection
is enabled
- Replace heal algorithm with a new one by Jean-Yves Couleaud that
works much better
- Make resource sub-folders show up in UI as tags, allowing users
to easily locate resource collections they may have installed
- Fix graphics tablet canvas interaction by moving from
gdk_pointer_grab() to gtk_grab_add() for most grabs
- Stop using motion hints, they are a concept from the dark ages
- Make tag matching always case-insensitive
- Let the tile-cache-size default to half the physical memory
GUI:
- Mention that the image was exported in the close warning dialog
- Make sure popup windows appear on top on OSX
- Allow file opening by dropping to the OSX dock
- Fix the visibility logic of the export/overwrite menu items
- Remove all "Use GEGL" menu items, they only add bugs and zero function
- Improve performance of display filters, especially color management
- Fix the image window title to comply with the save/export spec
and use the same image name everywhere, not only in the title
- Fix positioning of pasted/dropped stuff to be more reasonable
Libgimp:
- Add a basic paint dynamics PDB interface
- Move gimpdir and thumbnails to proper locations on OSX
- Implement relocation on OSX
- Allow to use $(gimp_installation_dir) in config files
Plug-ins:
- Make writing color space information to BMP files optional
- PSD loader now reads and imports working paths
Script-Fu:
- Lots and lots of undeprecations
Developer documentation:
- Add devel-docs/gegl-porting-plan.txt
- Fix remembering of JPEG load/save defaults
- Revive the page setup dialog on Windows
Source and build system:
- Make git-version.h generation work in shallow git clones
- Modernize use of autotools a bit, maintainer-mode and pdbgen
are now enabled by default
- Add Windows installer infrastructure
- Add infrastructure to build GIMP.app on OSX
General:
- Make gimptool install scripts in the correct system-wide directory
- Fix lots and lots of stuff found by static code analysis
Changes in GIMP 2.7.3
=====================
UI:
- Use GimpSpinScales instead of scale entries in all dockable widgets
- Allow the spin scale to control a range larger than its scale's range
- Implement RTL mode in GimpSpinScale
- Add lots of tooltips to tool options
- Allow to drop more things to the empty image window, and simply
create new images from them
- Cage tool: allow to add handle to the cage when clicking on an edge
- Cage tool: allow to remove selected handles from the cage by hitting delete
- Remember column widths in multi-column dock windows
- Support starting GIMP in single-window mode
- When the brush is shared among paint tools, also share all
brush-modifying paint options
- Use ALT+number and ALT+Tab shortcuts to navigate between images
in both single- and multi-window mode
- Make 'Export to' always activatable and fall back to 'Export...' if
no export target has been set yet
- In single-window mode, add new dockable dialogs to the image window
instead of in a new window
- When switching on single-window mode, put docks in the image window
depending on what side of the window they originally had
- When switching off single-window mode, distribute dock windows
better
- Add a canvas item for the transform grid, fixing a major speed
regression, and add the same guides options as in the rectangle tools
- Don't unmaximize the single-window mode image window when closing
images
- Resurrect the "You can drop dockable dialogs here" help string
below the toolbox
- Make pick-and-move with the Move Tool work for layers in a layer
group
Core:
- Add GimpMotionBuffer which abstracts away stroke smoothing behind
a simple API and takes it out of GimpDisplayShell
- Add a GimpIdTable utility class
- Add a GimpDockContainer interface
- Add a GimpSessionManaged interface
- Add GimpCanvasRectangleGuides which makes the rectangle tool's
guides draw properly
Libgimp:
- Make libgimp depend on GdkPixbuf
- Add API to create layers from cairo surfaces
- Make it impossible to include individual files from any GIMP
library. This was always forbidden and designed so it most
probably breaks, but now it reliably breaks using #error
- Deprecate the "set_sensitive" logic and use g_object_bind_property()
Plug-ins:
- Use poppler's cairo API to load PDFs, the pixbuf API is removed
- Port screenshot from GdkPixbuf to cairo
- Fix the annoying parser build warnings in imagemap
- Add a check-for-deprecated-procedures-in-script-fu make target
- Update libpng code to not use deprecated API (file-mng and file-png)
- Add an Item class to pygimp
- Correct/update some labels and defaults in the JPEG plug-in's save dialog UI
- Fix "Bug 596410 - gimp-image-get-filename returns NULL for imported files"
Developer documentation:
- Many updates
Source and build system:
- Make cairo a global dependency, starting at libgimpcolor
- Require poppler >= 0.12.4
- Remove gimp-remote for good, it has been disabled for years
General:
- Some more undeprecations now that we use GTK+ 2.24
- Fix lots of warnings that are new in -Wall in GCC 4.6
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.2
=====================
UI:
- A lot of undeprecations due to GTK+ 2.22 and 2.24
- Lots and lots of cairo porting, calls to gdk_draw_* are gone
- Merge the cage transform tool from GSoC
- Remove the old bitmap cursors completely and always use RGBA cursors
also for compat cursors for old X servers
- Add new GimpCanvasItem infrastructure with subclasses for everything
that needs to be drawn on the canvas and port all tools to canvas items,
this is a huge change that touches all tools and almost all display
code, and which finally gets rid of XOR drawing altogether
- Switch from purely idle-rendering the display to something that ensures
a minimum framerate, so we don't fail to update under heavy load
- Make the text tool handle RTL mode better
- Change GimpColorMapEditor to use the newly added proxy GimpPalette
- Replace the brush scale control in tool options by a brush size
one that works in pixels, and does the right thing when the brush
changes
- Add new widget GimpSpinScale which is a scale with number entry,
and use it in all tool options
- Make the brush, pattern etc. selectors in tool options more
compact and allow to directly jump to the editor dialogs
- Make handle sizes in tools consistent
- Add an on-canvas progress and use it for tool progress instead of
the statusbar
- Add a new GimpToolPalette class with lots of code that was
in GimpToolBox
- Allow to properly drop into and after a layer group
- Refactor and clean up the dynamics editor widget, and add colors
for the curves
- Add support for F2 to rename items in lists
- Clean up GimpDeviceStatus internally and visually
- Allow to set GimpToolPreset's icon using the new GimpIconPicker widget
- Make the text tool's style overlay show default values from the
text object if there is no style active at the cursor position/selection
- Show the the text size's unit in the text style overlay
- Make tool dialogs transient to the image window again
- Consistently add a "gimp-" prefix to all window roles
- Make the preset buttons in tool options work on the global tool
presets instead of the removed per-tool preset lists
- Add GimpControllerMouse, which allows to bind extra mouse buttons to
arbitrary actions
Core:
- Add uniform API to turn any GimpItem's outline into a selection
- Add support for color tags in text layers
- Remove the selection_control() stuff from GimpImage and with it
maybe last piece of UI code still not properly separated
- Add more validation code for XCF loading
- Add accessors to GimpPalette and use them globally
- Keep a proxy GimpPalette around for the image's colormap
- Don't scale SVGs when pasting or importing them
- A lot of changes to the input device handling code, partly
merged from the gtk3-port branch, add GimpDeviceManager class
- Add smoothing of paint strokes
- Fix display filters to work on a cairo surface
- Fix and enhance GimpImage's URI/filename handling API
- Unset "removed" flag on items when they get added back to
the image from the undo stack
- Change item creation to properly use GObject properties and
remove item_configure() and drawable_configure()
- Refactor tool event handling and move lots of stuff into
utility functions
- Clean up GimpViewRenderer API
- Implement transforms on group layers
- Clean up the transform tool a lot, and refactor away old junk
- Tool and tool event cleanup: enforce tool activate/halt invariants,
consistently shutdown all tools in control(HALT), and many other
tool fixes
- Remove GimpToolPresets object, this functionality got merged into
the new GimpToolPreset system
- Rename GimpFilteredContainer to GimpTaggedContainer and add a new
GimpFilteredContainer parent class which is a generic filter
- Remove the concept of an "offset" from TileManager and instead
pass around the offsets explicitly when needed, like when
transforming
- Move GimpBezier desc from vectors/ to core/ and add API to create
one from sorted BoundSegs
- Change GimpBrush boundary API to return a GimpBezierDesc
- Add GimpBrushCache object and use it to cache a brush's transformed
pixels and its outline, remove the caching code from GimpBrushCore
- Add GimpBezierDesc based API to GimpScanConvert and use it
GEGL:
- Add operations and gegl infrastructure for the cage tool
- Disable View -> Use GEGL as we will not have time to finish the
GEGL projection code for GIMP 2.8
Libgimp:
- Introduce an "item" type in the PDB and libgimp and deprecate
lots of old API in favor of item API
- Add procedures to create, traverse and manipulate layer trees
- Add more state to the context API, and deprecate functions with
too many parameters in favor of simpler ones that use context states,
particularly the entire transform and selection API
- Move GimpUnitStore and GimpUnitComboBox to libgimpwidgets, and
use them in GimpSizeEntry, deprecate GimpUnitMenu.
- Deprecate gimp_min_colors() and gimp_install_cmap()
- Add API that enables GimpRuler to track motion events by itself
- Add new selection API and deprecate all old selection functions
- Move around and rename all parasite functions, deprecate the old ones
- Add a generated PDB file in the "gimp" namespace and get rid
of "gimpmisc"
- Add unit conversion functions to libgimpbase
- Add function to reset a plug-in's context to default values
Plug-ins:
- Make script-fu server IPv6 aware
- Follow libgimp deprecations in plug-ins and scripts
- Add PDF export plugin
- Lots of cairo porting here too
- UTF-8 fixes in script-fu
- Set the progress to 1.0 when done
- Merge a lot of upstream fixes into script-fu's Tinyscheme
- Add "New Layer" option to MapObject
- Support loading of 16-bit raw PPM files
- Add web-page, a new plug-in which renders images of web pages
- Fix some more plug-ins to not warn if applied on an empty region
Data:
- Remove "Untitled" from palette names entries
Developer documentation:
- Move libgimp documentation from templates to inline comments
- Generate standard deprecated sections
Source and build system:
- Add more code documentation
- Add more unit tests and refactor existing ones to use global
test utility functions
- Add a manifest to executables (app and plug-ins, Win32)
- Depend on GLib 2.28, GTK+ 2.24, Cairo 1.10
- Make WebKit available to all plug-ins, not just the help browser
- Run UI tests on Xvfb if available
- Check for GdkPixbuf separately because it's now a separate library
- Allow tests to use uninstalled plug-ins from the build dir
- Remove, comment out, or build for GIMP_UNSTABLE some stuff that
should not be in a stable release
General:
- Improve safety on Win32 by calling SetDllDirectory() and
SetProcessDEPPolicy()
- Switch from GtkObject::destroy() to GObject::dispose() all over
the place
- Various changes that make maintaining the gtk3-port branch easier,
such as s/GtkAnchorType/GimpHandleAnchor/ and s/GtkObject/GtkAdjustment/
- Don't use gtk_container_add() for adding to GtkBoxes
- Inherit from GtkBox directly, not from GtkHBox/GtkVBox
- Add namespace to the ink blob types and functions
- Remove all useless calls to gtk_range_set_update_policy()
- Use GObject::constructed() instead of GObject::constructor() all
over the place
- Move more members to private and add accessors for them
- Stop using GdkNativeWindow, use guint32 instead
- Plug memory leaks
- Remove ps-menurc, we are not a PS clone
- Use the new g_[s]list_free_full() instead of foreach() and free()
- Don't use newly deprecated GTK+ API
- Use the new GDK_KEY_foo key names
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.1
=====================
UI:
- Add "lock content" button to the layers, channels and paths dialogs,
make the lock buttons more compact
- Refuse to edit locked items
- Add support for layer groups
- Improve internals and GUI of the save/export functionality
- Move the shortcut dialog's "clear" button into the entry
- Clean up UI code by introducing GimpDockWindow and GimpImageWindow
classes
- Support multi-column dock windows
- Get rid of docking bars, use highlights in existing widget hierarchy instead
- Remove toolbox-window-hint gimprc setting and use dock-window-hint
for both toolbox and docks instead
- Move GimpDock::default-height style property to GimpDockWindow
- Polish save+export path-part precedence rules
- Merge the GSoC 2009 Advanced GUI for Brush Dynamics project
- Default to non-fixed-aspect in Canvas Size dialog
- Add a still incomplete and Single-window mode
- Have an Export button, not Save, in export dialogs
- Improve Free Select Tool handle highlighting
- Support changing user interface language from preferences
- Update ps-menurc with PS CS4 keyboard shortcuts
- Reduce spacing around canvas and use it for the canvas itself
- Put name of active dockables in dock window titles
- Don't have Toolbox in list of Recently Closed Docks, handle that
directly in the Windows menu
- Support selecting and tagging multiple objects in resource lists
- Improve on-canvas text editing and text attribute setting
- Add GimpContainerTreeStore and use it in all GtkTreeStore based views
- Add a new default "automatic" tab style that makes sure dockable tabs
always show as much detail as possible
- Remove the dockable title bar and add the menu arrow button next to the
notebook tabs
- Add an icon for the desaturate tool
- Add 'Rule of fifths' crop guide overlay
- Make Alt+Click on layers not affect active layer
Core:
- Make all GimpItems lockable so their contents can't be changed
- Make more sense when naming imported layers
- Make group layers work except for layer masks and save them in
the XCF
- Change GimpProjectable::update to GimpProjectable:invalidate
- Make sure we don't mix font backends (and crash) by explicitly
asking for FT/Fontconfig backends
- Move members of GimpObject to a private struct
- gimp_object_get_name() takes a gconstpointer now, remove casts
from all callers
- Let drawables connect to their floating selection's "update" signal
instead of letting the image do this job
- Fix brush rotation artifacts at even 90 degree rotation
- Don't leak shared tile memory on Solaris
- Add a PDB procedure to access a text layer's markup
- Remove legacy cruft from pdbgen and make sure number ranges are correct
- Move all image creation functions to a common file
- Add translation context to all undo descriptions
GEGL:
- Make sure all nodes are added to their resp. graphs
- Use GEGL for layer scaling if use-gegl is TRUE
Plug-ins:
- Updated script-fu's scheme to latest upstream fixes
- Don't store image-specific print settings globally
- Add fundamental OpenRaster (.ora) import and export support
- Add RGB565 support to the csource plug-in
Data:
- Add texture/grunge brushes made by Johannes Engelhardt
Developer documentation:
- Explain GimpContext
- Add SVG graphic with GIMP application core module dependencies
- Add a schedule for 2.8 development
Source and build system:
- Add more code documentation
- Clean up subsystem linking dependencies in app/
- Add unit testing framework in app/tests/ and some basic tests,
including basic UI tests and XCF tests
- Tentatively introduce usage of using Glade + GtkBuilder
- Depend on GLib 2.24.0 and GTK+ 2.20.0
- Add git commit hash in --verbose --version output
- Don't version control gtk-doc.m4, get it from gtkdocize
- Add GimpObject tracking code
- Plug memory leaks
- Lots of bug fixes and cleanup
- Lots of translation updates
Changes in GIMP 2.7.0
=====================
UI:
- Change the Text Tool to perform text editing on-canvas (GSoC 2008)
and add the ability to mix different text styles in the same layer
- Add support for tagging GIMP resources such as brushes and allow
filtering based on these tags (GSoC 2008)
- Separate the activities of saving an image and exporting it, there is
now a 'File->Export...' for example
- Port file plug-ins to new export API which gets rid of many
annoying export dialogs
- Add a simple parser to size entry widgets, images can be scaled
to e.g. "50%" or "2 * 37px + 10in"
- Arrange layer modes into more logical and useful groups
- Added support for rotation of brushes
- Make the Pointer dockable show information about selection position
and size
- Get rid of the Tools dockable and move toolbox configuration to
Preferences
- Allow closing the toolbox without closing the whole application
- Add status bar feedback for keyboard changes to brush parameters
- Add diagonal guides to the Crop Tool
- New docks are created at the pointer position
- Add support for printing crop marks for images
- Move 'Text along path' from tool options to text context menu
- Change default shortcuts for "Shrink Wrap" and "Fit in Window" to
Ctrl+J and Ctrl+Shift+J respectively since the previous shortcuts
are now used for the save+export feature
- Make Alt+Click on layers in Layers dockable create a selection from
the layer
- Allow to specify written language in the Text Tool
- Support custom mapping curves for input device properties like "Pressure"
- New desktop launcher icon
- Add 'Windows→Hide docks' menu item that does what 'Tab' does and also displays
its state. Make the state persistent across sessions, too.
- Make dock window title separators translatable
Plug-ins:
- Map the 'Linear Dodge' layer mode in PSD files to the 'Addition'
layer mode in GIMP
- Add JPEG2000 load plug-in
- Add X11 mouse cursor plug-in
- Add support for loading 16bit (RGB565) raw data
- Add palette exporter for CSS, PHP, Python, txt and Java, accessed
through palette context menu
- Add plug-in API for getting image URI, for manipulating size of
text layers, for getting and setting text layer hint, and for
unified export dialog appearance
- Add an 'As Animation' toggle to the GIF export options
- Add 'active_vectors' getsetter to Python 'gimp.Image'
Data:
- Add large variants of round brushes and remove duplicate and
useless brushes
- Add "FG to BG (Hardedge)" gradient
GEGL:
- Port the projection code, the code that composes a single image
from a stack of layers, to GEGL
- Port layer modes to GEGL
- Port the floating selection code to GEGL
- Refactor the layer stack code to prepare for layer groups later
- Prepare better and more intuitive handling of the floating
selection
- Add File->Debug->Show Image Graph that show the GEGL graph of an
image
- Allow to benchmark projection performance with
File->Debug->Benchmark Projection
- When using GEGL for the projection, use CIELCH instead of HSV/HSL
for color based layer modes
Core:
- Make painting strokes Catmull-Rom Spline interpolated
- Add support for arbitrary affine transforms of brushes
- Add support for brush dynamics to depend on tilt
- Add aspect ratio to brush dynamics
- Add infrastructure to soon support vector layers (GSoC 2006)
- Rearrange legacy layer mode code to increase maintainability
- Drop support for the obsolete GnomeVFS file-uri backend
- Allow to dump keyboard shortcuts with File->Debug->Dump Keyboard
Shortcuts
- Prepare data structures for layer groups
- Remove gimprc setting "menu-mnemonics",
"GtkSettings:gtk-enable-mnemonics" shall be used instead
- Remove "transient-docks" gimprc setting, the 'Utility window' hint
and a sane window manager does a better job
- Remove "web-browser" gimprc setting and use gtk_show_uri() instead
General:
- Changed license to (L)GPLv3+
- Use the automake 1.11 feature 'silent build rules' by default
- Lots of bug fixes and cleanup
- Lots of bug fixes
- List of translation updates

View File

@@ -89,8 +89,12 @@ libapp_a_SOURCES = $(libapp_sources) $(libapp_generated_sources)
gimp_2_8_SOURCES = $(libapp_sources) main.c
if PLATFORM_OSX
framework_carbon = -framework Carbon
endif
if OS_WIN32
win32_ldflags = -mwindows $(WIN32_LARGE_ADDRESS_AWARE)
win32_ldflags = -mwindows -Wl,--tsaware $(WIN32_LARGE_ADDRESS_AWARE)
endif
if USE_BINRELOC
@@ -142,7 +146,6 @@ calm_down_linker = \
AM_LDFLAGS = \
$(munix) \
$(CARBON_LDFLAGS) \
$(calm_down_linker) \
$(workaround_that_core_depends_on_xcf) \
$(workaround_that_core_depends_on_pdb) \
@@ -180,7 +183,10 @@ gimpconsoleldadd = \
$(INTLLIBS) \
$(RT_LIBS)
gimp_2_8_LDFLAGS = $(AM_LDFLAGS) $(win32_ldflags)
gimp_2_8_LDFLAGS = \
$(AM_LDFLAGS) \
$(win32_ldflags) \
$(framework_carbon)
gimp_2_8_LDADD = \
gui/libappgui.a \

View File

@@ -39,8 +39,6 @@
#include "core/gimpprojectable.h"
#include "core/gimpprojection.h"
#include "file/file-utils.h"
#include "gegl/gimp-gegl-utils.h"
#include "display/gimpdisplay.h"
@@ -351,7 +349,7 @@ debug_show_image_graph (GimpImage *source_image)
/* Create a new image of the result */
tiles = gimp_buffer_to_tiles (buffer);
new_name = g_strdup_printf ("%s GEGL graph",
file_utils_uri_display_name (gimp_image_get_uri_or_untitled (source_image)));
gimp_image_get_display_name (source_image));
new_image = gimp_create_image (gimp,
tile_manager_width (tiles),
tile_manager_height (tiles),

View File

@@ -261,9 +261,9 @@ file_actions_update (GimpActionGroup *group,
if (image)
{
drawable = gimp_image_get_active_drawable (image);
source = gimp_image_get_imported_uri (image);
export = gimp_image_get_exported_uri (image);
drawable = gimp_image_get_active_drawable (image);
source = gimp_image_get_imported_uri (image);
export = gimp_image_get_exported_uri (image);
}
show_overwrite =
@@ -307,7 +307,7 @@ file_actions_update (GimpActionGroup *group,
}
/* needed for the empty display */
SET_SENSITIVE ("file-close-all", image);
SET_SENSITIVE ("file-close-all", image);
#undef SET_SENSITIVE
}

View File

@@ -76,7 +76,8 @@ static void file_save_dialog_show (Gimp *gimp,
GtkWidget *parent,
const gchar *title,
gboolean save_a_copy,
gboolean close_after_saving);
gboolean close_after_saving,
GimpDisplay *display);
static void file_export_dialog_show (Gimp *gimp,
GimpImage *image,
GtkWidget *parent);
@@ -252,7 +253,7 @@ file_save_cmd_callback (GtkAction *action,
gimp, image, uri,
save_proc,
GIMP_RUN_WITH_LAST_VALS,
TRUE, FALSE, TRUE);
TRUE, FALSE, FALSE, TRUE);
break;
}
@@ -270,13 +271,13 @@ file_save_cmd_callback (GtkAction *action,
case GIMP_SAVE_MODE_SAVE_AS:
file_save_dialog_show (gimp, image, widget,
_("Save Image"), FALSE,
save_mode == GIMP_SAVE_MODE_SAVE_AND_CLOSE);
save_mode == GIMP_SAVE_MODE_SAVE_AND_CLOSE, display);
break;
case GIMP_SAVE_MODE_SAVE_A_COPY:
file_save_dialog_show (gimp, image, widget,
_("Save a Copy of the Image"), TRUE,
FALSE);
FALSE, display);
break;
case GIMP_SAVE_MODE_EXPORT:
@@ -288,8 +289,9 @@ file_save_cmd_callback (GtkAction *action,
{
const gchar *uri = NULL;
GimpPlugInProcedure *export_proc;
gboolean overwrite;
if (save_mode == GIMP_SAVE_MODE_EXPORT_TO)
if (save_mode == GIMP_SAVE_MODE_EXPORT_TO)
{
uri = gimp_image_get_exported_uri (image);
@@ -299,10 +301,14 @@ file_save_cmd_callback (GtkAction *action,
file_export_dialog_show (gimp, image, widget);
break;
}
overwrite = FALSE;
}
else if (save_mode == GIMP_SAVE_MODE_OVERWRITE)
{
uri = gimp_image_get_imported_uri (image);
overwrite = TRUE;
}
if (uri)
@@ -327,7 +333,9 @@ file_save_cmd_callback (GtkAction *action,
gimp, image, uri_copy,
export_proc,
GIMP_RUN_WITH_LAST_VALS,
FALSE, TRUE, TRUE);
FALSE,
overwrite, ! overwrite,
TRUE);
g_free (uri_copy);
}
}
@@ -371,8 +379,7 @@ file_revert_cmd_callback (GtkAction *action,
GimpDisplay *display;
GimpImage *image;
GtkWidget *dialog;
const gchar *uri = NULL;
const gchar *source = NULL;
const gchar *uri;
return_if_no_display (display, data);
image = gimp_display_get_image (display);
@@ -380,14 +387,11 @@ file_revert_cmd_callback (GtkAction *action,
uri = gimp_image_get_uri (image);
if (! uri)
{
uri = gimp_image_get_imported_uri (image);
source = uri;
}
uri = gimp_image_get_imported_uri (image);
dialog = g_object_get_data (G_OBJECT (image), REVERT_DATA_KEY);
if (! uri && ! source)
if (! uri)
{
gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_ERROR,
@@ -400,7 +404,6 @@ file_revert_cmd_callback (GtkAction *action,
}
else
{
gchar *basename;
gchar *filename;
dialog =
@@ -427,18 +430,13 @@ file_revert_cmd_callback (GtkAction *action,
G_CALLBACK (file_revert_confirm_response),
display);
if (! source)
basename = file_utils_uri_display_basename (uri);
else
basename = g_strdup (gimp_image_get_uri_or_untitled (image));
filename = file_utils_uri_display_name (uri);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
_("Revert '%s' to '%s'?"),
basename, filename);
gimp_image_get_display_name (image),
filename);
g_free (filename);
g_free (basename);
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
_("By reverting the image to the state saved "
@@ -525,11 +523,8 @@ file_open_dialog_show (Gimp *gimp,
gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog),
image, open_as_layers);
parent = gtk_widget_get_toplevel (parent);
if (GTK_IS_WINDOW (parent))
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
gtk_window_present (GTK_WINDOW (dialog));
}
@@ -541,7 +536,8 @@ file_save_dialog_show (Gimp *gimp,
GtkWidget *parent,
const gchar *title,
gboolean save_a_copy,
gboolean close_after_saving)
gboolean close_after_saving,
GimpDisplay *display)
{
GtkWidget *dialog;
@@ -558,7 +554,7 @@ file_save_dialog_show (Gimp *gimp,
if (dialog)
{
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
g_object_set_data_full (G_OBJECT (image),
"gimp-file-save-dialog", dialog,
@@ -575,7 +571,7 @@ file_save_dialog_show (Gimp *gimp,
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
gimp, image, save_a_copy, FALSE,
close_after_saving);
close_after_saving, GIMP_OBJECT (display));
gtk_window_present (GTK_WINDOW (dialog));
}
@@ -609,7 +605,7 @@ file_export_dialog_show (Gimp *gimp,
if (dialog)
{
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
g_object_set_data_full (G_OBJECT (image),
"gimp-file-export-dialog", dialog,
@@ -627,7 +623,8 @@ file_export_dialog_show (Gimp *gimp,
image,
FALSE,
TRUE,
FALSE);
FALSE,
NULL);
gtk_window_present (GTK_WINDOW (dialog));
}

View File

@@ -33,8 +33,6 @@
#include "core/gimpimage.h"
#include "core/gimplist.h"
#include "file/file-utils.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpdock.h"
@@ -295,19 +293,12 @@ windows_actions_image_notify (GimpDisplay *display,
}
{
const gchar *uri;
gchar *filename;
gchar *basename;
const gchar *display_name;
gchar *escaped;
gchar *title;
uri = gimp_image_get_uri_or_untitled (image);
filename = file_utils_uri_display_name (uri);
basename = file_utils_uri_display_basename (uri);
escaped = gimp_escape_uline (basename);
g_free (basename);
display_name = gimp_image_get_display_name (image);
escaped = gimp_escape_uline (display_name);
title = g_strdup_printf ("%s-%d.%d", escaped,
gimp_image_get_ID (image),
@@ -316,12 +307,11 @@ windows_actions_image_notify (GimpDisplay *display,
g_object_set (action,
"label", title,
"tooltip", filename,
"tooltip", gimp_image_get_display_path (image),
"viewable", image,
"context", gimp_get_user_context (group->gimp),
NULL);
g_free (filename);
g_free (title);
}

View File

@@ -345,6 +345,18 @@ pixel_surround_get_data (PixelSurround *surround,
return tile_data_pointer (surround->tile, x, y);
}
if (x < 0)
*w = MIN (- x, surround->w);
else
*w = surround->w;
if (y < 0)
*h = MIN (- y, surround->h);
else
*h = surround->h;
*rowstride = surround->rowstride;
if (surround->mode == PIXEL_SURROUND_SMEAR)
{
const guchar *edata;
@@ -392,28 +404,17 @@ pixel_surround_get_data (PixelSurround *surround,
case (TOP):
case (BOTTOM):
pixel_surround_fill_row (surround, edata, ew);
*w = MIN (*w, ew);
break;
case (LEFT):
case (RIGHT):
pixel_surround_fill_col (surround, edata, estride, eh);
*h = MIN (*h, eh);
break;
}
}
/* return a pointer to the virtual background tile */
if (x < 0)
*w = MIN (- x, surround->w);
else
*w = surround->w;
if (y < 0)
*h = MIN (- y, surround->h);
else
*h = surround->h;
*rowstride = surround->rowstride;
return surround->bg;
}

View File

@@ -43,6 +43,8 @@
#include "gimp-intl.h"
#define GIMP_MAX_MEM_PROCESS (MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE))
enum
{
PROP_0,
@@ -106,6 +108,7 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
gint num_processors;
guint64 memory_size;
parent_class = g_type_class_peek_parent (klass);
@@ -138,10 +141,21 @@ gimp_base_config_class_init (GimpBaseConfigClass *klass)
"num-processors", NUM_PROCESSORS_BLURB,
1, GIMP_MAX_NUM_THREADS, num_processors,
GIMP_PARAM_STATIC_STRINGS);
memory_size = get_physical_memory_size ();
/* limit to the amount one process can handle */
memory_size = MIN (GIMP_MAX_MEM_PROCESS, memory_size);
if (memory_size > 0)
memory_size = memory_size / 2; /* half the memory */
else
memory_size = 1 << 30; /* 1GB */
GIMP_CONFIG_INSTALL_PROP_MEMSIZE (object_class, PROP_TILE_CACHE_SIZE,
"tile-cache-size", TILE_CACHE_SIZE_BLURB,
0, MIN (G_MAXSIZE, GIMP_MAX_MEMSIZE),
1 << 30, /* 1GB */
0, GIMP_MAX_MEM_PROCESS,
memory_size,
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_CONFIRM);

View File

@@ -115,7 +115,11 @@ gimp_rc_add_unknown_token (GimpConfig *config,
token->key = g_strdup (key);
token->value = g_strdup (value);
if (!last)
if (last)
{
last = g_slist_last (g_slist_append (last, token));
}
else
{
unknown_tokens = g_slist_append (NULL, token);

View File

@@ -941,6 +941,7 @@ gimp_dirty_mask_get_type (void)
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", "drawable" },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", "vectors" },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", "selection" },
{ GIMP_DIRTY_ACTIVE_DRAWABLE, "GIMP_DIRTY_ACTIVE_DRAWABLE", "active-drawable" },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", "all" },
{ 0, NULL, NULL }
};
@@ -957,6 +958,7 @@ gimp_dirty_mask_get_type (void)
{ GIMP_DIRTY_DRAWABLE, "GIMP_DIRTY_DRAWABLE", NULL },
{ GIMP_DIRTY_VECTORS, "GIMP_DIRTY_VECTORS", NULL },
{ GIMP_DIRTY_SELECTION, "GIMP_DIRTY_SELECTION", NULL },
{ GIMP_DIRTY_ACTIVE_DRAWABLE, "GIMP_DIRTY_ACTIVE_DRAWABLE", NULL },
{ GIMP_DIRTY_ALL, "GIMP_DIRTY_ALL", NULL },
{ 0, NULL, NULL }
};

View File

@@ -449,6 +449,7 @@ typedef enum /*< pdb-skip >*/
GIMP_DIRTY_DRAWABLE = 1 << 6,
GIMP_DIRTY_VECTORS = 1 << 7,
GIMP_DIRTY_SELECTION = 1 << 8,
GIMP_DIRTY_ACTIVE_DRAWABLE = 1 << 9,
GIMP_DIRTY_ALL = 0xffff
} GimpDirtyMask;

View File

@@ -163,12 +163,13 @@ gimp_edit_paste (GimpImage *image,
{
GimpLayer *layer;
GimpImageType type;
gint center_x;
gint center_y;
gint offset_x;
gint offset_y;
gint image_width;
gint image_height;
gint width;
gint height;
gint offset_x;
gint offset_y;
gboolean clamp_to_image = TRUE;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (drawable == NULL || GIMP_IS_DRAWABLE (drawable), NULL);
@@ -192,6 +193,23 @@ gimp_edit_paste (GimpImage *image,
if (! layer)
return NULL;
image_width = gimp_image_get_width (image);
image_height = gimp_image_get_height (image);
width = gimp_item_get_width (GIMP_ITEM (layer));
height = gimp_item_get_height (GIMP_ITEM (layer));
if (viewport_width == image_width &&
viewport_height == image_height)
{
/* if the whole image is visible, act as if there was no viewport */
viewport_x = 0;
viewport_y = 0;
viewport_width = 0;
viewport_height = 0;
}
if (drawable)
{
/* if pasting to a drawable */
@@ -206,9 +224,13 @@ gimp_edit_paste (GimpImage *image,
have_mask = gimp_item_mask_bounds (GIMP_ITEM (drawable),
&x1, &y1, &x2, &y2);
if (! have_mask &&
viewport_width > 0 &&
if (! have_mask && /* if we have no mask */
viewport_width > 0 && /* and we have a viewport */
viewport_height > 0 &&
(width < (x2 - x1) || /* and the paste is smaller than the target */
height < (y2 - y1)) &&
/* and the viewport intersects with the target */
gimp_rectangle_intersect (viewport_x, viewport_y,
viewport_width, viewport_height,
off_x, off_y,
@@ -216,43 +238,53 @@ gimp_edit_paste (GimpImage *image,
&paste_x, &paste_y,
&paste_width, &paste_height))
{
center_x = paste_x + paste_width / 2;
center_y = paste_y + paste_height / 2;
/* center on the viewport */
offset_x = paste_x + (paste_width - width) / 2;
offset_y = paste_y + (paste_height- height) / 2;
}
else
{
center_x = off_x + (x1 + x2) / 2;
center_y = off_y + (y1 + y2) / 2;
/* otherwise center on the target */
offset_x = off_x + ((x1 + x2) - width) / 2;
offset_y = off_y + ((y1 + y2) - height) / 2;
/* and keep it that way */
clamp_to_image = FALSE;
}
}
else if (viewport_width > 0 && viewport_height > 0)
else if (viewport_width > 0 && /* if we have a viewport */
viewport_height > 0 &&
(width < image_width || /* and the paste is */
height < image_height)) /* smaller than the image */
{
/* if we got a viewport set the offsets to the center of the viewport */
/* center on the viewport */
center_x = viewport_x + viewport_width / 2;
center_y = viewport_y + viewport_height / 2;
offset_x = viewport_x + (viewport_width - width) / 2;
offset_y = viewport_y + (viewport_height - height) / 2;
}
else
{
/* otherwise the offsets to the center of the image */
/* otherwise center on the image */
center_x = gimp_image_get_width (image) / 2;
center_y = gimp_image_get_height (image) / 2;
offset_x = (image_width - width) / 2;
offset_y = (image_height - height) / 2;
/* and keep it that way */
clamp_to_image = FALSE;
}
width = gimp_item_get_width (GIMP_ITEM (layer));
height = gimp_item_get_height (GIMP_ITEM (layer));
offset_x = center_x - width / 2;
offset_y = center_y - height / 2;
/* Ensure that the pasted layer is always within the image, if it
* fits and aligned at top left if it doesn't. (See bug #142944).
*/
offset_x = MIN (offset_x, gimp_image_get_width (image) - width);
offset_y = MIN (offset_y, gimp_image_get_height (image) - height);
offset_x = MAX (offset_x, 0);
offset_y = MAX (offset_y, 0);
if (clamp_to_image)
{
/* Ensure that the pasted layer is always within the image, if it
* fits and aligned at top left if it doesn't. (See bug #142944).
*/
offset_x = MIN (offset_x, image_width - width);
offset_y = MIN (offset_y, image_height - height);
offset_x = MAX (offset_x, 0);
offset_y = MAX (offset_y, 0);
}
gimp_item_set_offset (GIMP_ITEM (layer), offset_x, offset_y);

View File

@@ -73,6 +73,9 @@ gimp_modules_load (Gimp *gimp)
if (gimp->no_interface)
return;
/* FIXME, gimp->be_verbose is not yet initialized in init() */
gimp->module_db->verbose = gimp->be_verbose;
filename = gimp_personal_rc_file ("modulerc");
if (gimp->be_verbose)
@@ -201,7 +204,7 @@ gimp_modules_unload (Gimp *gimp)
if (writer)
{
gimp_config_writer_open (writer, "module-load-inhibit");
gimp_config_writer_printf (writer, "\"%s\"", p);
gimp_config_writer_string (writer, p);
gimp_config_writer_close (writer);
gimp_config_writer_finish (writer, "end of modulerc", &error);

View File

@@ -319,9 +319,9 @@ gimp_transform_region_nearest (TileManager *orig_tiles,
gdouble tu, tv, tw; /* undivided source coordinates and divisor */
/* set up inverse transform steps */
tu = uinc * x + m->coeff[0][1] * (dest_y1 + y) + m->coeff[0][2];
tv = vinc * x + m->coeff[1][1] * (dest_y1 + y) + m->coeff[1][2];
tw = winc * x + m->coeff[2][1] * (dest_y1 + y) + m->coeff[2][2];
tu = uinc * (x + .5) + m->coeff[0][1] * (dest_y1 + y + .5) + m->coeff[0][2];
tv = vinc * (x + .5) + m->coeff[1][1] * (dest_y1 + y + .5) + m->coeff[1][2];
tw = winc * (x + .5) + m->coeff[2][1] * (dest_y1 + y + .5) + m->coeff[2][2];
while (width--)
{
@@ -331,8 +331,8 @@ gimp_transform_region_nearest (TileManager *orig_tiles,
/* normalize homogeneous coords */
normalize_coords (1, &tu, &tv, &tw, &u, &v);
iu = (gint) u;
iv = (gint) v;
iu = RINT (u);
iv = RINT (v);
/* Set the destination pixels */
if (iu >= u1 && iu < u2 &&
@@ -689,12 +689,14 @@ gimp_transform_region_lanczos (TileManager *orig_tiles,
static inline void
untransform_coords (const GimpMatrix3 *m,
const gint x,
const gint y,
const gint ix,
const gint iy,
gdouble *tu,
gdouble *tv,
gdouble *tw)
{
gdouble x = ix + .5;
gdouble y = iy + .5;
tu[0] = m->coeff[0][0] * (x ) + m->coeff[0][1] * (y ) + m->coeff[0][2];
tv[0] = m->coeff[1][0] * (x ) + m->coeff[1][1] * (y ) + m->coeff[1][2];
tw[0] = m->coeff[2][0] * (x ) + m->coeff[2][1] * (y ) + m->coeff[2][2];
@@ -730,8 +732,8 @@ normalize_coords (const gint coords,
{
if (G_LIKELY (tw[i] != 0.0))
{
u[i] = tu[i] / tw[i];
v[i] = tv[i] / tw[i];
u[i] = tu[i] / tw[i] - .5;
v[i] = tv[i] / tw[i] - .5;
}
else
{

View File

@@ -109,7 +109,8 @@ gimp_user_install_items[] =
};
static gboolean gimp_user_install_detect_old (GimpUserInstall *install);
static gboolean gimp_user_install_detect_old (GimpUserInstall *install,
const gchar *gimp_dir);
static void user_install_log (GimpUserInstall *install,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
@@ -140,7 +141,20 @@ gimp_user_install_new (gboolean verbose)
install->verbose = verbose;
gimp_user_install_detect_old (install);
gimp_user_install_detect_old (install, gimp_directory ());
#ifdef PLATFORM_OSX
if (! install->old_dir)
{
/* if the default old gimpdir was not found, try the "classic" one
* in the home folder
*/
gchar *dir = g_strdup_printf ("%s/.gimp-%s",
g_get_home_dir (), GIMP_APP_VERSION);
gimp_user_install_detect_old (install, dir);
g_free (dir);
}
#endif
return install;
}
@@ -205,14 +219,13 @@ gimp_user_install_set_log_handler (GimpUserInstall *install,
/* Local functions */
static gboolean
gimp_user_install_detect_old (GimpUserInstall *install)
gimp_user_install_detect_old (GimpUserInstall *install,
const gchar *gimp_dir)
{
gchar *dir;
gchar *dir = g_strdup (gimp_dir);
gchar *version;
gboolean migrate = FALSE;
dir = g_strdup (gimp_directory ());
version = strstr (dir, GIMP_APP_VERSION);
if (version)

View File

@@ -111,7 +111,9 @@ static gchar abr_read_char (FILE *file);
static gint16 abr_read_short (FILE *file);
static gint32 abr_read_long (FILE *file);
static gchar * abr_read_ucs2_text (FILE *file);
static gboolean abr_supported (AbrHeader *abr_hdr);
static gboolean abr_supported (AbrHeader *abr_hdr,
const gchar *filename,
GError **error);
static gboolean abr_reach_8bim_section (FILE *abr,
const gchar *name);
static gint32 abr_rle_decode (FILE *file,
@@ -429,7 +431,7 @@ gimp_brush_load_abr (GimpContext *context,
abr_hdr.version = abr_read_short (file);
abr_hdr.count = abr_read_short (file); /* sub-version for ABR v6 */
if (abr_supported (&abr_hdr))
if (abr_supported (&abr_hdr, filename, error))
{
switch (abr_hdr.version)
{
@@ -831,7 +833,9 @@ abr_read_ucs2_text (FILE *file)
}
static gboolean
abr_supported (AbrHeader *abr_hdr)
abr_supported (AbrHeader *abr_hdr,
const gchar *filename,
GError **error)
{
switch (abr_hdr->version)
{
@@ -844,6 +848,18 @@ abr_supported (AbrHeader *abr_hdr)
/* in this case, count contains format sub-version */
if (abr_hdr->count == 1 || abr_hdr->count == 2)
return TRUE;
if (error && ! (*error))
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
_("Fatal parse error in brush file '%s': "
"unable to decode abr format version %d."),
gimp_filename_to_utf8 (filename),
/* horrid subversion display, but better than
* having yet another translatable string for
* this
*/
abr_hdr->version * 10 + abr_hdr->count);
break;
}

View File

@@ -3172,7 +3172,7 @@ gimp_context_get_font_name (GimpContext *context)
{
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
return (context->font ? gimp_object_get_name (context->font) : NULL);
return context->font_name;
}
void
@@ -3185,7 +3185,20 @@ gimp_context_set_font_name (GimpContext *context,
font = gimp_container_get_child_by_name (context->gimp->fonts, name);
gimp_context_set_font (context, GIMP_FONT (font));
if (font)
{
gimp_context_set_font (context, GIMP_FONT (font));
}
else
{
/* No font with this name exists, use the standard font, but
* keep the intended name around
*/
gimp_context_set_font (context, gimp_font_get_standard ());
g_free (context->font_name);
context->font_name = g_strdup (name);
}
}
void

View File

@@ -29,6 +29,17 @@
#include "gimpcurve-map.h"
#if defined (HAVE_FINITE)
#define FINITE(x) finite(x)
#elif defined (HAVE_ISFINITE)
#define FINITE(x) isfinite(x)
#elif defined (G_OS_WIN32)
#define FINITE(x) _finite(x)
#else
#error "no FINITE() implementation available?!"
#endif
enum
{
CURVE_NONE = 0,
@@ -204,18 +215,17 @@ gimp_curve_map_value_inline (GimpCurve *curve,
{
if (curve->identity)
{
return value;
if (FINITE (value))
return CLAMP (value, 0.0, 1.0);
return 0.0;
}
if (value < 0.0)
{
return curve->samples[0];
}
else if (value >= 1.0)
{
return curve->samples[curve->n_samples - 1];
}
else /* interpolate the curve */
/* check for known values first, so broken values like NaN
* delivered by broken drivers don't run into the interpolation
* code
*/
if (value > 0.0 && value < 1.0) /* interpolate the curve */
{
gdouble f;
gint index;
@@ -231,4 +241,12 @@ gimp_curve_map_value_inline (GimpCurve *curve,
return (1.0 - f) * curve->samples[index] + f * curve->samples[index + 1];
}
else if (value >= 1.0)
{
return curve->samples[curve->n_samples - 1];
}
else
{
return curve->samples[0];
}
}

View File

@@ -345,7 +345,7 @@ gimp_data_factory_data_load (GimpDataFactory *factory,
g_free (writable_path);
writable_path = tmp;
writable_list = gimp_path_parse (writable_path, 16, TRUE, NULL);
writable_list = gimp_path_parse (writable_path, 256, TRUE, NULL);
g_object_set_data (G_OBJECT (factory),
WRITABLE_PATH_KEY, writable_list);
@@ -711,8 +711,8 @@ gimp_data_factory_get_save_dir (GimpDataFactory *factory,
g_free (writable_path);
writable_path = tmp;
path_list = gimp_path_parse (path, 16, FALSE, NULL);
writable_list = gimp_path_parse (writable_path, 16, FALSE, NULL);
path_list = gimp_path_parse (path, 256, FALSE, NULL);
writable_list = gimp_path_parse (writable_path, 256, FALSE, NULL);
g_free (path);
g_free (writable_path);

View File

@@ -78,7 +78,7 @@ gimp_image_pick_layer_by_bounds (const GimpImage *image,
{
GimpLayer *layer = list->data;
if (gimp_item_get_visible (GIMP_ITEM (layer)))
if (gimp_item_is_visible (GIMP_ITEM (layer)))
{
gint off_x, off_y;
gint width, height;
@@ -127,7 +127,8 @@ gimp_image_pick_text_layer (const GimpImage *image,
x >= off_x &&
y >= off_y &&
x < off_x + gimp_item_get_width (GIMP_ITEM (layer)) &&
y < off_y + gimp_item_get_height (GIMP_ITEM (layer)))
y < off_y + gimp_item_get_height (GIMP_ITEM (layer)) &&
gimp_item_is_visible (GIMP_ITEM (layer)))
{
g_list_free (all_layers);

View File

@@ -40,6 +40,7 @@ struct _GimpImagePrivate
GimpPlugInProcedure *save_proc; /* last save procedure used */
gchar *display_name; /* display basename */
gchar *display_path; /* display full path */
gint width; /* width in pixels */
gint height; /* height in pixels */
gdouble xresolution; /* image x-res, in dpi */
@@ -109,5 +110,8 @@ struct _GimpImagePrivate
GIMP_TYPE_IMAGE, \
GimpImagePrivate)
void gimp_image_take_mask (GimpImage *image,
GimpChannel *mask);
#endif /* __GIMP_IMAGE_PRIVATE_H__ */

View File

@@ -740,6 +740,7 @@ gimp_image_constructed (GObject *object)
{
GimpImage *image = GIMP_IMAGE (object);
GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image);
GimpChannel *selection;
GimpCoreConfig *config;
GimpTemplate *template;
@@ -765,15 +766,10 @@ gimp_image_constructed (GObject *object)
if (private->base_type == GIMP_INDEXED)
gimp_image_colormap_init (image);
/* create the selection mask */
private->selection_mask = gimp_selection_new (image,
gimp_image_get_width (image),
gimp_image_get_height (image));
g_object_ref_sink (private->selection_mask);
g_signal_connect (private->selection_mask, "update",
G_CALLBACK (gimp_image_mask_update),
image);
selection = gimp_selection_new (image,
gimp_image_get_width (image),
gimp_image_get_height (image));
gimp_image_take_mask (image, selection);
g_signal_connect_object (config, "notify::transparency-type",
G_CALLBACK (gimp_item_stack_invalidate_previews),
@@ -998,6 +994,12 @@ gimp_image_finalize (GObject *object)
private->display_name = NULL;
}
if (private->display_path)
{
g_free (private->display_path);
private->display_path = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -1017,6 +1019,12 @@ gimp_image_name_changed (GimpObject *object)
private->display_name = NULL;
}
if (private->display_path)
{
g_free (private->display_path);
private->display_path = NULL;
}
/* We never want the empty string as a name, so change empty strings
* to NULL strings (without emitting the "name-changed" signal
* again)
@@ -1144,9 +1152,7 @@ gimp_image_get_description (GimpViewable *viewable,
GimpImage *image = GIMP_IMAGE (viewable);
if (tooltip)
{
*tooltip = file_utils_uri_display_name (gimp_image_get_uri_or_untitled (image));
}
*tooltip = g_strdup (gimp_image_get_display_path (image));
return g_strdup_printf ("%s-%d",
gimp_image_get_display_name (image),
@@ -1630,8 +1636,7 @@ gimp_image_get_save_a_copy_uri (const GimpImage *image)
* @image: A #GimpImage.
*
* Returns: The XCF file URI, the imported file URI, or the exported
* file URI, in that order of precedence. Only to help implement
* backwards compatibility with GIMP 2.6 API.
* file URI, in that order of precedence.
**/
const gchar *
gimp_image_get_any_uri (const GimpImage *image)
@@ -1671,6 +1676,8 @@ gimp_image_set_imported_uri (GimpImage *image,
g_object_set_data_full (G_OBJECT (image), GIMP_FILE_IMPORT_SOURCE_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
gimp_object_name_changed (GIMP_OBJECT (image));
}
/**
@@ -1693,6 +1700,8 @@ gimp_image_set_exported_uri (GimpImage *image,
g_object_set_data_full (G_OBJECT (image),
GIMP_FILE_EXPORT_URI_KEY,
g_strdup (uri), (GDestroyNotify) g_free);
gimp_object_name_changed (GIMP_OBJECT (image));
}
/**
@@ -1732,6 +1741,100 @@ gimp_image_get_filename (const GimpImage *image)
return g_filename_from_uri (uri, NULL, NULL);
}
static gchar *
gimp_image_format_display_uri (GimpImage *image,
gboolean basename)
{
const gchar *uri_format = NULL;
const gchar *export_status = NULL;
const gchar *uri;
const gchar *source;
const gchar *dest;
gboolean is_imported;
gboolean is_exported;
gchar *display_uri = NULL;
gchar *format_string;
gchar *tmp;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
uri = gimp_image_get_uri (image);
source = gimp_image_get_imported_uri (image);
dest = gimp_image_get_exported_uri (image);
is_imported = (source != NULL);
is_exported = (dest != NULL);
if (uri)
{
display_uri = g_strdup (uri);
uri_format = "%s";
}
else
{
if (is_imported)
display_uri = g_strdup (source);
/* Calculate filename suffix */
if (! gimp_image_is_export_dirty (image))
{
if (is_exported)
{
display_uri = g_strdup (dest);
export_status = _(" (exported)");
}
else if (is_imported)
{
export_status = _(" (overwritten)");
}
else
{
g_warning ("Unexpected code path, Save+export implementation is buggy!");
}
}
else if (is_imported)
{
export_status = _(" (imported)");
}
if (display_uri)
{
gchar *tmp = file_utils_uri_with_new_ext (display_uri, NULL);
g_free (display_uri);
display_uri = tmp;
}
uri_format = "[%s]";
}
if (! display_uri)
{
display_uri = g_strdup (gimp_image_get_string_untitled ());
}
else if (basename)
{
tmp = file_utils_uri_display_basename (display_uri);
g_free (display_uri);
display_uri = tmp;
}
else
{
tmp = file_utils_uri_display_name (display_uri);
g_free (display_uri);
display_uri = tmp;
}
format_string = g_strconcat (uri_format, export_status, NULL);
tmp = g_strdup_printf (format_string, display_uri);
g_free (display_uri);
display_uri = tmp;
g_free (format_string);
return display_uri;
}
const gchar *
gimp_image_get_display_name (GimpImage *image)
{
@@ -1742,15 +1845,26 @@ gimp_image_get_display_name (GimpImage *image)
private = GIMP_IMAGE_GET_PRIVATE (image);
if (! private->display_name)
{
const gchar *uri = gimp_image_get_uri_or_untitled (image);
private->display_name = file_utils_uri_display_basename (uri);
}
private->display_name = gimp_image_format_display_uri (image, TRUE);
return private->display_name;
}
const gchar *
gimp_image_get_display_path (GimpImage *image)
{
GimpImagePrivate *private;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
private = GIMP_IMAGE_GET_PRIVATE (image);
if (! private->display_path)
private->display_path = gimp_image_format_display_uri (image, FALSE);
return private->display_path;
}
void
gimp_image_set_load_proc (GimpImage *image,
GimpPlugInProcedure *proc)
@@ -1971,6 +2085,27 @@ gimp_image_mask_changed (GimpImage *image)
g_signal_emit (image, gimp_image_signals[MASK_CHANGED], 0);
}
void
gimp_image_take_mask (GimpImage *image,
GimpChannel *mask)
{
GimpImagePrivate *private;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (GIMP_IS_SELECTION (mask));
private = GIMP_IMAGE_GET_PRIVATE (image);
if (private->selection_mask)
g_object_unref (private->selection_mask);
private->selection_mask = g_object_ref_sink (mask);
g_signal_connect (private->selection_mask, "update",
G_CALLBACK (gimp_image_mask_update),
image);
}
/* image components */

View File

@@ -191,6 +191,7 @@ void gimp_image_set_filename (GimpImage *image,
gchar * gimp_image_get_filename (const GimpImage *image);
const gchar * gimp_image_get_display_name (GimpImage *image);
const gchar * gimp_image_get_display_path (GimpImage *image);
void gimp_image_set_load_proc (GimpImage *image,
GimpPlugInProcedure *proc);

View File

@@ -70,7 +70,7 @@ gimp_item_toggle_exclusive_visible (GimpItem *item,
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_UNDO_STACK,
GIMP_UNDO_GROUP_ITEM_VISIBILITY);
if (undo && (g_object_get_data (G_OBJECT (undo), "exclusive-item") ==
if (undo && (g_object_get_data (G_OBJECT (undo), "exclusive-visible-item") ==
(gpointer) item))
push_undo = FALSE;
@@ -84,7 +84,7 @@ gimp_item_toggle_exclusive_visible (GimpItem *item,
GIMP_UNDO_GROUP_ITEM_VISIBILITY);
if (undo)
g_object_set_data (G_OBJECT (undo), "exclusive-item",
g_object_set_data (G_OBJECT (undo), "exclusive-visible-item",
(gpointer) item);
}
@@ -125,6 +125,93 @@ gimp_item_toggle_exclusive_visible (GimpItem *item,
g_list_free (ancestry);
}
void
gimp_item_toggle_exclusive_linked (GimpItem *item,
GimpContext *context)
{
GList *on = NULL;
GList *off = NULL;
GList *list;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (gimp_item_is_attached (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
for (list = gimp_item_get_container_iter (item);
list;
list = g_list_next (list))
{
GimpItem *other = list->data;
if (other != item)
{
if (gimp_item_get_linked (other))
on = g_list_prepend (on, other);
else
off = g_list_prepend (off, other);
}
}
if (on || off || ! gimp_item_get_linked (item))
{
GimpImage *image = gimp_item_get_image (item);
GimpUndo *undo;
gboolean push_undo = TRUE;
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_UNDO_STACK,
GIMP_UNDO_GROUP_ITEM_LINKED);
if (undo && (g_object_get_data (G_OBJECT (undo), "exclusive-linked-item") ==
(gpointer) item))
push_undo = FALSE;
if (push_undo)
{
if (gimp_image_undo_group_start (image,
GIMP_UNDO_GROUP_ITEM_LINKED,
_("Set Item Exclusive Linked")))
{
undo = gimp_image_undo_can_compress (image, GIMP_TYPE_UNDO_STACK,
GIMP_UNDO_GROUP_ITEM_LINKED);
if (undo)
g_object_set_data (G_OBJECT (undo), "exclusive-linked-item",
(gpointer) item);
}
gimp_image_undo_push_item_linked (image, NULL, item);
for (list = on; list; list = g_list_next (list))
gimp_image_undo_push_item_linked (image, NULL, list->data);
for (list = off; list; list = g_list_next (list))
gimp_image_undo_push_item_linked (image, NULL, list->data);
gimp_image_undo_group_end (image);
}
else
{
gimp_undo_refresh_preview (undo, context);
}
if (off || ! gimp_item_get_linked (item))
{
gimp_item_set_linked (item, TRUE, FALSE);
for (list = off; list; list = g_list_next (list))
gimp_item_set_linked (list->data, TRUE, FALSE);
}
else
{
for (list = on; list; list = g_list_next (list))
gimp_item_set_linked (list->data, FALSE, FALSE);
}
g_list_free (on);
g_list_free (off);
}
}
/* private functions */

View File

@@ -24,6 +24,8 @@
void gimp_item_toggle_exclusive_visible (GimpItem *item,
GimpContext *context);
void gimp_item_toggle_exclusive_linked (GimpItem *item,
GimpContext *context);
#endif /* __GIMP_ITEM_EXCLUSIVE_H__ */

View File

@@ -988,7 +988,7 @@ gimp_layer_get_opacity_at (GimpPickable *pickable,
if (x >= 0 && x < gimp_item_get_width (GIMP_ITEM (layer)) &&
y >= 0 && y < gimp_item_get_height (GIMP_ITEM (layer)) &&
gimp_item_get_visible (GIMP_ITEM (layer)))
gimp_item_is_visible (GIMP_ITEM (layer)))
{
/* If the point is inside, and the layer has no
* alpha channel, success!

View File

@@ -246,7 +246,7 @@ gimp_tag_compare_func (const void *p1,
/**
* gimp_tag_compare_with_string:
* @tag: a #GimpTag object.
* @tag_string: pointer to right-hand #GimpTag object.
* @tag_string: the string to compare to.
*
* Compares tag and a string according to tag comparison rules. Similar to
* gimp_tag_compare_func(), but can be used without creating temporary tag
@@ -276,6 +276,42 @@ gimp_tag_compare_with_string (GimpTag *tag,
return result;
}
/**
* gimp_tag_has_prefix:
* @tag: a #GimpTag object.
* @prefix_string: the prefix to compare to.
*
* Compares tag and a prefix according to tag comparison rules. Similar to
* gimp_tag_compare_with_string(), but does not work on the collate key
* because that can't be matched partially.
*
* Return value: wheher #tag starts with @prefix_string.
**/
gboolean
gimp_tag_has_prefix (GimpTag *tag,
const gchar *prefix_string)
{
gchar *case_folded1;
gchar *case_folded2;
gboolean has_prefix;
g_return_val_if_fail (GIMP_IS_TAG (tag), FALSE);
g_return_val_if_fail (prefix_string != NULL, FALSE);
case_folded1 = g_utf8_casefold (g_quark_to_string (tag->tag), -1);
case_folded2 = g_utf8_casefold (prefix_string, -1);
has_prefix = g_str_has_prefix (case_folded1, case_folded2);
g_free (case_folded1);
g_free (case_folded2);
g_printerr ("'%s' has prefix '%s': %d\n",
g_quark_to_string (tag->tag), prefix_string, has_prefix);
return has_prefix;
}
/**
* gimp_tag_string_make_valid:
* @tag_string: a text string.

View File

@@ -68,6 +68,8 @@ gint gimp_tag_compare_func (const void *p1,
const void *p2);
gint gimp_tag_compare_with_string (GimpTag *tag,
const gchar *tag_string);
gboolean gimp_tag_has_prefix (GimpTag *tag,
const gchar *prefix_string);
gchar * gimp_tag_string_make_valid (const gchar *tag_string);
gboolean gimp_tag_is_tag_separator (gunichar c);

View File

@@ -138,7 +138,7 @@ gimp_tool_info_finalize (GObject *object)
if (tool_info->help)
{
g_free (tool_info->help);
tool_info->blurb = NULL;
tool_info->help = NULL;
}
if (tool_info->menu_label)

View File

@@ -900,7 +900,7 @@ gimp_viewable_get_pixbuf (GimpViewable *viewable,
if (gdk_pixbuf_get_width (private->preview_pixbuf) == width &&
gdk_pixbuf_get_height (private->preview_pixbuf) == height)
{
return pixbuf;
return private->preview_pixbuf;
}
g_object_unref (private->preview_pixbuf);

View File

@@ -191,6 +191,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
save_proc,
GIMP_RUN_INTERACTIVE,
! dialog->save_a_copy && ! dialog->export,
FALSE,
dialog->export,
FALSE))
{
@@ -214,28 +215,15 @@ file_save_dialog_response (GtkWidget *save_dialog,
/* make sure the menus are updated with the keys we've just set */
gimp_image_flush (dialog->image);
/* Handle close-after-saing */
if (dialog)
/* Handle close-after-saving */
if (dialog->close_after_saving && dialog->display_to_close)
{
GtkWindow *parent;
parent = gtk_window_get_transient_for (GTK_WINDOW (dialog));
if (dialog->close_after_saving)
{
if (GIMP_IS_DISPLAY_SHELL (parent))
{
GimpDisplay *display;
display = GIMP_DISPLAY_SHELL (parent)->display;
if (! gimp_image_is_dirty (gimp_display_get_image (display)))
gimp_display_close (display);
}
}
gtk_widget_destroy (save_dialog);
GimpDisplay *display = GIMP_DISPLAY (dialog->display_to_close);
if (display && ! gimp_image_is_dirty (gimp_display_get_image (display)))
gimp_display_close (display);
}
gtk_widget_destroy (save_dialog);
}
g_free (uri);
@@ -304,11 +292,11 @@ file_save_dialog_check_uri (GtkWidget *save_dialog,
GIMP_LOG (SAVE_DIALOG, "basename has no '.', trying to add extension");
if (! save_proc)
if (! save_proc && ! dialog->export)
{
ext = "xcf";
}
else if (save_proc->extensions_list)
else if (save_proc && save_proc->extensions_list)
{
ext = save_proc->extensions_list->data;
}
@@ -629,7 +617,8 @@ file_save_dialog_save_image (GimpProgress *progress,
GimpPlugInProcedure *save_proc,
GimpRunMode run_mode,
gboolean change_saved_state,
gboolean export,
gboolean export_backward,
gboolean export_forward,
gboolean verbose_cancel)
{
GimpPDBStatusType status;
@@ -645,7 +634,9 @@ file_save_dialog_save_image (GimpProgress *progress,
}
status = file_save (gimp, image, progress, uri,
save_proc, run_mode, change_saved_state, export, &error);
save_proc, run_mode,
change_saved_state, export_backward, export_forward,
&error);
switch (status)
{

View File

@@ -29,7 +29,8 @@ gboolean file_save_dialog_save_image (GimpProgress *progress_and_handl
GimpPlugInProcedure *write_proc,
GimpRunMode run_mode,
gboolean save_a_copy,
gboolean export,
gboolean export_backward,
gboolean export_forward,
gboolean verbose_cancel);

View File

@@ -128,7 +128,7 @@ module_dialog_new (Gimp *gimp)
gimp_standard_help_func, GIMP_HELP_MODULE_DIALOG,
GTK_STOCK_REFRESH, RESPONSE_REFRESH,
GTK_STOCK_CLOSE, GTK_STOCK_CLOSE,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
@@ -282,22 +282,25 @@ static void
dialog_select_callback (GtkTreeSelection *sel,
ModuleDialog *dialog)
{
GimpModule *module;
GtkTreeIter iter;
GtkTreeIter iter;
gtk_tree_selection_get_selected (sel, NULL, &iter);
gtk_tree_model_get (GTK_TREE_MODEL (dialog->list), &iter,
COLUMN_MODULE, &module, -1);
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
GimpModule *module;
if (module)
g_object_unref (module);
gtk_tree_model_get (GTK_TREE_MODEL (dialog->list), &iter,
COLUMN_MODULE, &module, -1);
if (dialog->selected == module)
return;
if (module)
g_object_unref (module);
dialog->selected = module;
if (dialog->selected == module)
return;
dialog_info_update (dialog->gimp->module_db, dialog->selected, dialog);
dialog->selected = module;
dialog_info_update (dialog->gimp->module_db, dialog->selected, dialog);
}
}
static void

View File

@@ -24,7 +24,6 @@
#define GIMP_CANVAS_EVENT_MASK (GDK_EXPOSURE_MASK | \
GDK_POINTER_MOTION_MASK | \
GDK_POINTER_MOTION_HINT_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_BUTTON_RELEASE_MASK | \
GDK_STRUCTURE_MASK | \

View File

@@ -292,9 +292,11 @@ static cairo_region_t *
gimp_canvas_arc_get_extents (GimpCanvasItem *item,
GimpDisplayShell *shell)
{
cairo_rectangle_int_t rectangle;
gdouble center_x, center_y;
gdouble radius_x, radius_y;
GimpCanvasArcPrivate *private = GET_PRIVATE (item);
cairo_region_t *region;
cairo_rectangle_int_t rectangle;
gdouble center_x, center_y;
gdouble radius_x, radius_y;
gimp_canvas_arc_transform (item, shell,
&center_x, &center_y,
@@ -305,7 +307,24 @@ gimp_canvas_arc_get_extents (GimpCanvasItem *item,
rectangle.width = ceil (center_x + radius_x + 1.5) - rectangle.x;
rectangle.height = ceil (center_y + radius_y + 1.5) - rectangle.y;
return cairo_region_create_rectangle (&rectangle);
region = cairo_region_create_rectangle (&rectangle);
if (! private->filled &&
rectangle.width > 64 * 1.43 &&
rectangle.height > 64 * 1.43)
{
radius_x *= 0.7;
radius_y *= 0.7;
rectangle.x = ceil (center_x - radius_x + 1.5);
rectangle.y = ceil (center_y - radius_y + 1.5);
rectangle.width = floor (center_x + radius_x - 1.5) - rectangle.x;
rectangle.height = floor (center_y + radius_y - 1.5) - rectangle.y;
cairo_region_subtract_rectangle (region, &rectangle);
}
return region;
}
GimpCanvasItem *

View File

@@ -75,7 +75,7 @@ struct _GimpDisplayPrivate
GtkWidget *shell;
GSList *update_areas;
GTimeVal last_flush_now;
guint64 last_flush_now;
};
#define GIMP_DISPLAY_GET_PRIVATE(display) \
@@ -838,21 +838,13 @@ gimp_display_flush_whenever (GimpDisplay *display,
if (now)
{
GTimeVal time_now;
gint diff_usec;
guint64 now = g_get_monotonic_time ();
g_get_current_time (&time_now);
diff_usec = (((guint64) time_now.tv_sec * G_USEC_PER_SEC +
(guint64) time_now.tv_usec) -
((guint64) private->last_flush_now.tv_sec * G_USEC_PER_SEC +
(guint64) private->last_flush_now.tv_usec));
if (diff_usec > FLUSH_NOW_INTERVAL)
if ((now - private->last_flush_now) > FLUSH_NOW_INTERVAL)
{
gimp_display_shell_flush (gimp_display_get_shell (display), now);
g_get_current_time (&private->last_flush_now);
private->last_flush_now = now;
}
}
else

View File

@@ -54,6 +54,9 @@ static void gimp_display_shell_close_dialog (GimpDisplayShell *shell,
GimpImage *image);
static void gimp_display_shell_close_name_changed (GimpImage *image,
GimpMessageBox *box);
static void gimp_display_shell_close_exported (GimpImage *image,
const gchar *uri,
GimpMessageBox *box);
static gboolean gimp_display_shell_close_time_changed (GimpMessageBox *box);
static void gimp_display_shell_close_response (GtkWidget *widget,
gboolean close,
@@ -189,6 +192,9 @@ gimp_display_shell_close_dialog (GimpDisplayShell *shell,
g_signal_connect_object (image, "name-changed",
G_CALLBACK (gimp_display_shell_close_name_changed),
box, 0);
g_signal_connect_object (image, "exported",
G_CALLBACK (gimp_display_shell_close_exported),
box, 0);
gimp_display_shell_close_name_changed (image, box);
@@ -233,12 +239,21 @@ gimp_display_shell_close_name_changed (GimpImage *image,
gimp_image_get_display_name (image));
}
static void
gimp_display_shell_close_exported (GimpImage *image,
const gchar *uri,
GimpMessageBox *box)
{
gimp_display_shell_close_time_changed (box);
}
static gboolean
gimp_display_shell_close_time_changed (GimpMessageBox *box)
{
GimpImage *image = g_object_get_data (G_OBJECT (box), "gimp-image");
gint dirty_time = gimp_image_get_dirty_time (image);
GimpImage *image = g_object_get_data (G_OBJECT (box), "gimp-image");
gint dirty_time = gimp_image_get_dirty_time (image);
gchar *time_text = NULL;
gchar *export_text = NULL;
if (dirty_time)
{
@@ -250,42 +265,63 @@ gimp_display_shell_close_time_changed (GimpMessageBox *box)
if (hours > 0)
{
if (hours > 1 || minutes == 0)
gimp_message_box_set_text (box,
ngettext ("If you don't save the image, "
"changes from the last hour "
"will be lost.",
"If you don't save the image, "
"changes from the last %d "
"hours will be lost.",
hours), hours);
{
time_text =
g_strdup_printf (ngettext ("If you don't save the image, "
"changes from the last hour "
"will be lost.",
"If you don't save the image, "
"changes from the last %d "
"hours will be lost.",
hours), hours);
}
else
gimp_message_box_set_text (box,
ngettext ("If you don't save the image, "
"changes from the last hour "
"and %d minute will be lost.",
"If you don't save the image, "
"changes from the last hour "
"and %d minutes will be lost.",
minutes), minutes);
{
time_text =
g_strdup_printf (ngettext ("If you don't save the image, "
"changes from the last hour "
"and %d minute will be lost.",
"If you don't save the image, "
"changes from the last hour "
"and %d minutes will be lost.",
minutes), minutes);
}
}
else
{
gimp_message_box_set_text (box,
ngettext ("If you don't save the image, "
"changes from the last minute "
"will be lost.",
"If you don't save the image, "
"changes from the last %d "
"minutes will be lost.",
minutes), minutes);
time_text =
g_strdup_printf (ngettext ("If you don't save the image, "
"changes from the last minute "
"will be lost.",
"If you don't save the image, "
"changes from the last %d "
"minutes will be lost.",
minutes), minutes);
}
}
else
if (! gimp_image_is_export_dirty (image))
{
gimp_message_box_set_text (box, NULL);
const gchar *exported_uri = gimp_image_get_exported_uri (image);
if (! exported_uri)
exported_uri = gimp_image_get_imported_uri (image);
export_text =
g_strdup_printf (_("The image has been exported to '%s'."),
exported_uri);
}
if (time_text && export_text)
gimp_message_box_set_text (box, "%s\n\n%s", time_text, export_text);
else if (time_text || export_text)
gimp_message_box_set_text (box, "%s", time_text ? time_text : export_text);
else
gimp_message_box_set_text (box, "%s", time_text);
g_free (time_text);
g_free (export_text);
return TRUE;
}
@@ -310,7 +346,7 @@ gimp_display_shell_close_response (GtkWidget *widget,
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
/* FIXME image window: set this display active */
gimp_image_window_set_active_shell (window, shell);
gimp_ui_manager_activate_action (manager,
"file", "file-save-and-close");

View File

@@ -140,18 +140,18 @@ gimp_display_shell_dnd_init (GimpDisplayShell *shell)
gimp_dnd_color_dest_add (shell->canvas,
gimp_display_shell_drop_color,
shell);
gimp_dnd_svg_dest_add (shell->canvas,
gimp_display_shell_drop_svg,
shell);
gimp_dnd_component_dest_add (shell->canvas,
gimp_display_shell_drop_component,
shell);
gimp_dnd_pixbuf_dest_add (shell->canvas,
gimp_display_shell_drop_pixbuf,
shell);
gimp_dnd_uri_list_dest_add (shell->canvas,
gimp_display_shell_drop_uri_list,
shell);
gimp_dnd_svg_dest_add (shell->canvas,
gimp_display_shell_drop_svg,
shell);
gimp_dnd_pixbuf_dest_add (shell->canvas,
gimp_display_shell_drop_pixbuf,
shell);
}
@@ -162,20 +162,34 @@ gimp_display_shell_dnd_init (GimpDisplayShell *shell)
*/
static void
gimp_display_shell_dnd_position_item (GimpDisplayShell *shell,
GimpImage *image,
GimpItem *item)
{
gint x, y;
gint width, height;
gint item_width = gimp_item_get_width (item);
gint item_height = gimp_item_get_height (item);
gint off_x, off_y;
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
if (item_width >= gimp_image_get_width (image) &&
item_height >= gimp_image_get_height (image))
{
off_x = (gimp_image_get_width (image) - item_width) / 2;
off_y = (gimp_image_get_height (image) - item_height) / 2;
}
else
{
gint x, y;
gint width, height;
gimp_item_get_offset (item, &off_x, &off_y);
gimp_display_shell_untransform_viewport (shell, &x, &y, &width, &height);
off_x = x + (width - gimp_item_get_width (item)) / 2 - off_x;
off_y = y + (height - gimp_item_get_height (item)) / 2 - off_y;
off_x = x + (width - item_width) / 2;
off_y = y + (height - item_height) / 2;
}
gimp_item_translate (item, off_x, off_y, FALSE);
gimp_item_translate (item,
off_x - gimp_item_get_offset_x (item),
off_y - gimp_item_get_offset_y (item),
FALSE);
}
static void
@@ -231,7 +245,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Drop New Layer"));
gimp_display_shell_dnd_position_item (shell, new_item);
gimp_display_shell_dnd_position_item (shell, image, new_item);
gimp_item_set_visible (new_item, TRUE, FALSE);
gimp_item_set_linked (new_item, FALSE, FALSE);
@@ -634,7 +648,7 @@ gimp_display_shell_drop_component (GtkWidget *widget,
gimp_image_undo_group_start (dest_image, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Drop New Layer"));
gimp_display_shell_dnd_position_item (shell, new_item);
gimp_display_shell_dnd_position_item (shell, image, new_item);
gimp_image_add_layer (dest_image, new_layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
@@ -692,7 +706,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Drop New Layer"));
gimp_display_shell_dnd_position_item (shell, new_item);
gimp_display_shell_dnd_position_item (shell, image, new_item);
gimp_image_add_layer (image, new_layer,
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);

View File

@@ -172,12 +172,24 @@ gimp_display_shell_render (GimpDisplayShell *shell,
g_assert_not_reached ();
}
cairo_surface_mark_dirty (shell->render_surface);
/* apply filters to the rendered projection */
if (shell->filter_stack)
gimp_color_display_stack_convert_surface (shell->filter_stack,
shell->render_surface);
{
cairo_surface_t *sub = shell->render_surface;
if (w != GIMP_DISPLAY_RENDER_BUF_WIDTH ||
h != GIMP_DISPLAY_RENDER_BUF_HEIGHT)
sub = cairo_image_surface_create_for_data (cairo_image_surface_get_data (sub),
CAIRO_FORMAT_ARGB32, w, h,
GIMP_DISPLAY_RENDER_BUF_WIDTH * 4);
gimp_color_display_stack_convert_surface (shell->filter_stack, sub);
if (sub != shell->render_surface)
cairo_surface_destroy (sub);
}
cairo_surface_mark_dirty_rectangle (shell->render_surface, 0, 0, w, h);
if (shell->mask)
{
@@ -516,7 +528,7 @@ box_filter_premult (const guint left_weight,
for (i = 0; i < ALPHA; i++)
{
dest[i] = ((center_weight * (factors[0] * src[1][i] +
dest[i] = (center_weight * (factors[0] * src[1][i] +
factors[1] * src[4][i] +
factors[2] * src[7][i]) +
@@ -526,7 +538,7 @@ box_filter_premult (const guint left_weight,
left_weight * (factors[6] * src[0][i] +
factors[7] * src[3][i] +
factors[8] * src[6][i])) / sum) >> 8;
factors[8] * src[6][i]) + ((255 * sum) >> 1)) / (255 * sum);
}
dest[ALPHA] = (a + (sum >> 1)) / sum;
@@ -563,7 +575,7 @@ box_filter_premult (const guint left_weight,
for (i = 0; i < ALPHA; i++)
{
dest[i] = ((center_weight * (factors[0] * src[1][i] +
dest[i] = (center_weight * (factors[0] * src[1][i] +
factors[1] * src[4][i] +
factors[2] * src[7][i]) +
@@ -573,7 +585,7 @@ box_filter_premult (const guint left_weight,
left_weight * (factors[6] * src[0][i] +
factors[7] * src[3][i] +
factors[8] * src[6][i])) / sum) >> 8;
factors[8] * src[6][i]) + ((255 * sum) >> 1)) / (sum * 255);
}
dest[ALPHA] = (a + (sum >> 1)) / sum;

View File

@@ -36,9 +36,6 @@
#include "core/gimpimage.h"
#include "core/gimpitem.h"
#include "file/file-utils.h"
#include "file/gimp-file.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-title.h"
@@ -57,11 +54,6 @@ static gint gimp_display_shell_format_title (GimpDisplayShell *display,
gchar *title,
gint title_len,
const gchar *format);
static gint gimp_display_shell_format_filename (gchar *buf,
gint len,
gint start,
GimpImage *image,
const gchar *filename);
/* public functions */
@@ -211,24 +203,13 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
break;
case 'f': /* base filename */
{
const gchar *name = gimp_image_get_display_name (image);
i += gimp_display_shell_format_filename (title, title_len, i, image, name);
}
i += print (title, title_len, i, "%s",
gimp_image_get_display_name (image));
break;
case 'F': /* full filename */
{
gchar *filename;
const gchar *uri = gimp_image_get_uri_or_untitled (image);
filename = file_utils_uri_display_name (uri);
i += gimp_display_shell_format_filename (title, title_len, i, image, filename);
g_free (filename);
}
i += print (title, title_len, i, "%s",
gimp_image_get_display_path (image));
break;
case 'p': /* PDB id */
@@ -451,69 +432,3 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
return i;
}
static gint
gimp_display_shell_format_filename (gchar *buf,
gint len,
gint start,
GimpImage *image,
const gchar *filename)
{
const gchar *source = NULL;
const gchar *name_format = NULL;
const gchar *export_status = NULL;
gchar *format_string = NULL;
gchar *name = NULL;
gboolean is_imported = FALSE;
gint incr = 0;
source = gimp_image_get_imported_uri (image);
/* Note that as soon as the image is saved, it is not considered
* imported any longer (gimp_image_set_imported_uri (image, NULL) is
* called)
*/
is_imported = (source != NULL);
/* Calculate filename and format */
if (! is_imported)
{
name = g_strdup (filename);
name_format = "%s";
}
else
{
gchar *source_no_ext = file_utils_uri_with_new_ext (source, NULL);
name = file_utils_uri_display_basename (source_no_ext);
g_free (source_no_ext);
name_format = "[%s]";
}
/* Calculate filename suffix */
if (! gimp_image_is_export_dirty (image))
{
gboolean is_exported;
is_exported = (gimp_image_get_exported_uri (image) != NULL);
if (is_exported)
export_status = _(" (exported)");
else if (is_imported)
export_status = _(" (overwritten)");
else
g_warning ("Unexpected code path, Save+export implementation is buggy!");
}
else if (is_imported)
{
export_status = _(" (imported)");
}
/* Merge strings and print the result */
format_string = g_strconcat (name_format, export_status, NULL);
incr = print (buf, len, start, format_string, name);
g_free (format_string);
/* Cleanup */
g_free (name);
return incr;
}

View File

@@ -439,13 +439,16 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case GDK_BUTTON_PRESS:
{
GdkEventButton *bevent = (GdkEventButton *) event;
GdkEventButton *bevent = (GdkEventButton *) event;
GdkModifierType button_state;
/* ignore new mouse events */
if (gimp->busy || shell->scrolling || shell->pointer_grabbed)
return TRUE;
state |= gimp_display_shell_button_to_state (bevent->button);
button_state = gimp_display_shell_button_to_state (bevent->button);
state |= button_state;
/* ignore new buttons while another button is down */
if (((state & (GDK_BUTTON1_MASK)) && (state & (GDK_BUTTON2_MASK |
@@ -473,7 +476,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
gimp_display_shell_update_focus (shell, TRUE,
&image_coords, state);
gimp_display_shell_update_cursor (shell, &display_coords,
&image_coords, state, FALSE);
&image_coords, state & ~button_state,
FALSE);
if (gdk_event_triggers_context_menu (event))
{
@@ -944,6 +948,9 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
}
}
if (compressed_motion)
gdk_event_free (compressed_motion);
return_val = TRUE;
}
break;
@@ -998,28 +1005,37 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
switch (kevent->keyval)
{
gboolean arrow_key = FALSE;
case GDK_KEY_Left:
case GDK_KEY_Right:
case GDK_KEY_Up:
case GDK_KEY_Down:
arrow_key = TRUE;
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
case GDK_KEY_BackSpace:
case GDK_KEY_Escape:
case GDK_KEY_Left:
case GDK_KEY_Right:
case GDK_KEY_Up:
case GDK_KEY_Down:
if (gimp_image_is_empty (image) ||
! tool_manager_key_press_active (gimp,
kevent,
display))
if (! gimp_image_is_empty (image))
return_val = tool_manager_key_press_active (gimp,
kevent,
display);
if (! return_val)
{
GimpController *keyboard = gimp_controllers_get_keyboard (gimp);
if (keyboard)
gimp_controller_keyboard_key_press (GIMP_CONTROLLER_KEYBOARD (keyboard),
kevent);
return_val =
gimp_controller_keyboard_key_press (GIMP_CONTROLLER_KEYBOARD (keyboard),
kevent);
}
return_val = TRUE;
/* always swallow arrow keys, we don't want focus keynav */
if (! return_val)
return_val = arrow_key;
break;
case GDK_KEY_space:
@@ -1048,7 +1064,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
if (! gimp_image_is_empty (image))
tool_manager_modifier_state_active (gimp, state, display);
}
break;
}
@@ -1135,7 +1150,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
if (! gimp_image_is_empty (image))
tool_manager_modifier_state_active (gimp, state, display);
}
break;
}
@@ -1676,7 +1690,9 @@ gimp_display_shell_initialize_tool (GimpDisplayShell *shell,
}
else if ((active_tool->drawable !=
gimp_image_get_active_drawable (image)) &&
! gimp_tool_control_get_preserve (active_tool->control))
(! gimp_tool_control_get_preserve (active_tool->control) &&
(gimp_tool_control_get_dirty_mask (active_tool->control) &
GIMP_DIRTY_ACTIVE_DRAWABLE)))
{
/* create a new one, deleting the current */
gimp_context_tool_changed (gimp_get_user_context (gimp));
@@ -1787,6 +1803,17 @@ gimp_display_shell_compress_motion (GimpDisplayShell *shell)
last_motion = event;
}
else if ((gtk_get_event_widget (event) == shell->canvas) &&
(event->any.type == GDK_BUTTON_RELEASE))
{
requeued_events = g_list_prepend (requeued_events, event);
while (gdk_events_pending ())
if ((event = gdk_event_get ()))
requeued_events = g_list_prepend (requeued_events, event);
break;
}
else
{
requeued_events = g_list_prepend (requeued_events, event);

View File

@@ -738,9 +738,14 @@ gimp_display_shell_constructed (GObject *object)
}
else
{
#if 0
/* Disabled because it sets GDK_POINTER_MOTION_HINT on
* shell->canvas. For info see Bug 677375
*/
gimp_help_set_help_data (shell->canvas,
_("Drop image files here to open them"),
NULL);
#endif
gimp_statusbar_empty (GIMP_STATUSBAR (shell->statusbar));
}
@@ -1314,10 +1319,13 @@ gimp_display_shell_empty (GimpDisplayShell *shell)
gimp_display_shell_unset_cursor (shell);
gimp_display_shell_appearance_update (shell);
gimp_display_shell_sync_config (shell, shell->display->config);
gimp_display_shell_appearance_update (shell);
#if 0
gimp_help_set_help_data (shell->canvas,
_("Drop image files here to open them"), NULL);
#endif
gimp_statusbar_empty (GIMP_STATUSBAR (shell->statusbar));
@@ -1366,8 +1374,9 @@ gimp_display_shell_fill (GimpDisplayShell *shell,
gimp_display_shell_sync_config (shell, shell->display->config);
gimp_display_shell_appearance_update (shell);
#if 0
gimp_help_set_help_data (shell->canvas, NULL, NULL);
#endif
gimp_statusbar_fill (GIMP_STATUSBAR (shell->statusbar));

View File

@@ -74,6 +74,9 @@
/* GtkPaned position of the right docks area */
#define GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS "right-docks-position"
/* Whether the window's maximized or not */
#define GIMP_IMAGE_WINDOW_MAXIMIZED "maximized"
enum
{
@@ -589,7 +592,7 @@ gimp_image_window_window_state_event (GtkWidget *widget,
GIMP_LOG (WM, "Image window '%s' [%p] set fullscreen %s",
gtk_window_get_title (GTK_WINDOW (widget)),
widget,
fullscreen ? "TURE" : "FALSE");
fullscreen ? "TRUE" : "FALSE");
if (private->menubar)
gtk_widget_set_name (private->menubar,
@@ -805,8 +808,8 @@ gimp_image_window_get_aux_info (GimpSessionManaged *session_managed)
if (config->single_window_mode)
{
GimpSessionInfoAux *aux;
char widthbuf[128];
gchar widthbuf[128];
g_snprintf (widthbuf, sizeof (widthbuf), "%d",
gtk_paned_get_position (GTK_PANED (private->left_hpane)));
aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_LEFT_DOCKS_WIDTH, widthbuf);
@@ -816,6 +819,11 @@ gimp_image_window_get_aux_info (GimpSessionManaged *session_managed)
gtk_paned_get_position (GTK_PANED (private->right_hpane)));
aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS, widthbuf);
aux_info = g_list_append (aux_info, aux);
aux = gimp_session_info_aux_new (GIMP_IMAGE_WINDOW_MAXIMIZED,
gimp_image_window_is_maximized (GIMP_IMAGE_WINDOW (session_managed)) ?
"yes" : "no");
aux_info = g_list_append (aux_info, aux);
}
return aux_info;
@@ -846,6 +854,7 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
gint left_docks_width = -1;
gint right_docks_pos = -1;
gboolean wait_with_right_docks = FALSE;
gboolean maximized = FALSE;
g_return_if_fail (GIMP_IS_IMAGE_WINDOW (session_managed));
@@ -860,6 +869,9 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
width = &left_docks_width;
else if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_RIGHT_DOCKS_POS))
width = &right_docks_pos;
else if (! strcmp (aux->name, GIMP_IMAGE_WINDOW_MAXIMIZED))
if (! g_ascii_strcasecmp (aux->value, "yes"))
maximized = TRUE;
if (width)
sscanf (aux->value, "%d", width);
@@ -899,6 +911,11 @@ gimp_image_window_set_aux_info (GimpSessionManaged *session_managed,
right_docks_pos);
}
}
if (maximized)
gtk_window_maximize (GTK_WINDOW (session_managed));
else
gtk_window_unmaximize (GTK_WINDOW (session_managed));
}
@@ -1165,6 +1182,18 @@ gimp_image_window_is_iconified (GimpImageWindow *window)
return (private->window_state & GDK_WINDOW_STATE_ICONIFIED) != 0;
}
gboolean
gimp_image_window_is_maximized (GimpImageWindow *window)
{
GimpImageWindowPrivate *private;
g_return_val_if_fail (GIMP_IS_IMAGE_WINDOW (window), FALSE);
private = GIMP_IMAGE_WINDOW_GET_PRIVATE (window);
return (private->window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
}
/**
* gimp_image_window_has_toolbox:
* @window:
@@ -1606,6 +1635,9 @@ gimp_image_window_switch_page (GtkNotebook *notebook,
active_display,
NULL /*new_entry_id*/);
gimp_context_set_display (gimp_get_user_context (private->gimp),
active_display);
gimp_ui_manager_update (private->menubar_manager, active_display);
}
@@ -1872,6 +1904,7 @@ gimp_image_window_create_tab_label (GimpImageWindow *window,
view = gimp_view_new_by_types (gimp_get_user_context (shell->display->gimp),
GIMP_TYPE_VIEW, GIMP_TYPE_IMAGE,
GIMP_VIEW_SIZE_LARGE, 0, FALSE);
gtk_widget_set_size_request (view, GIMP_VIEW_SIZE_LARGE, -1);
gtk_box_pack_start (GTK_BOX (hbox), view, FALSE, FALSE, 0);
gtk_widget_show (view);

View File

@@ -81,6 +81,7 @@ void gimp_image_window_set_show_statusbar (GimpImageWindow *win
gboolean gimp_image_window_get_show_statusbar (GimpImageWindow *window);
gboolean gimp_image_window_is_iconified (GimpImageWindow *window);
gboolean gimp_image_window_is_maximized (GimpImageWindow *window);
gboolean gimp_image_window_has_toolbox (GimpImageWindow *window);

View File

@@ -53,10 +53,26 @@ static void gimp_tool_dialog_shell_unmap (GimpDisplayShell *shell,
G_DEFINE_TYPE (GimpToolDialog, gimp_tool_dialog, GIMP_TYPE_VIEWABLE_DIALOG)
static void
gimp_tool_dialog_dispose (GObject *object)
{
GimpToolDialogPrivate *private = GET_PRIVATE (object);
if (private->shell)
{
g_object_remove_weak_pointer (G_OBJECT (private->shell),
(gpointer) &private->shell);
private->shell = NULL;
}
G_OBJECT_CLASS (gimp_tool_dialog_parent_class)->dispose (object);
}
static void
gimp_tool_dialog_class_init (GimpToolDialogClass *klass)
{
G_OBJECT_CLASS (klass)->dispose = gimp_tool_dialog_dispose;
g_type_class_add_private (klass, sizeof (GimpToolDialogPrivate));
}
@@ -137,6 +153,8 @@ gimp_tool_dialog_set_shell (GimpToolDialog *tool_dialog,
if (private->shell)
{
g_object_remove_weak_pointer (G_OBJECT (private->shell),
(gpointer) &private->shell);
g_signal_handlers_disconnect_by_func (private->shell,
gimp_tool_dialog_shell_unmap,
tool_dialog);
@@ -153,6 +171,8 @@ gimp_tool_dialog_set_shell (GimpToolDialog *tool_dialog,
G_CALLBACK (gimp_tool_dialog_shell_unmap),
tool_dialog, 0);
g_object_add_weak_pointer (G_OBJECT (private->shell),
(gpointer) &private->shell);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
gtk_window_set_transient_for (GTK_WINDOW (tool_dialog),

View File

@@ -436,13 +436,17 @@ file_open_with_proc_and_display (Gimp *gimp,
{
GimpDocumentList *documents = GIMP_DOCUMENT_LIST (gimp->documents);
GimpImagefile *imagefile;
const gchar *any_uri;
imagefile = gimp_document_list_add_uri (documents, uri, mime_type);
/* can only create a thumbnail if the passed uri and the
* resulting image's uri match.
* resulting image's uri match. Use any_uri() here so we
* create thumbnails for both XCF and imported images.
*/
if (strcmp (uri, gimp_image_get_uri_or_untitled (image)) == 0)
any_uri = gimp_image_get_any_uri (image);
if (any_uri && ! strcmp (uri, any_uri))
{
/* no need to save a thumbnail if there's a good one already */
if (! gimp_imagefile_check_thumbnail (imagefile))

View File

@@ -74,7 +74,8 @@ file_save (Gimp *gimp,
GimpPlugInProcedure *file_proc,
GimpRunMode run_mode,
gboolean change_saved_state,
gboolean export,
gboolean export_backward,
gboolean export_forward,
GError **error)
{
GimpDrawable *drawable;
@@ -91,6 +92,8 @@ file_save (Gimp *gimp,
g_return_val_if_fail (uri != NULL, GIMP_PDB_CALLING_ERROR);
g_return_val_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (file_proc),
GIMP_PDB_CALLING_ERROR);
g_return_val_if_fail ((export_backward && export_forward) == FALSE,
GIMP_PDB_CALLING_ERROR);
g_return_val_if_fail (error == NULL || *error == NULL,
GIMP_PDB_CALLING_ERROR);
@@ -168,7 +171,17 @@ file_save (Gimp *gimp,
gimp_image_clean_all (image);
}
else if (export)
else if (export_backward)
{
/* We exported the image back to its imported source,
* change nothing about export/import flags, only set
* the export state to clean
*/
gimp_image_export_clean_all (image);
gimp_object_name_changed (GIMP_OBJECT (image));
}
else if (export_forward)
{
/* Remeber the last entered Export URI for the image. We
* only need to do this explicitly when exporting. It
@@ -186,7 +199,7 @@ file_save (Gimp *gimp,
gimp_image_export_clean_all (image);
}
if (export)
if (export_backward || export_forward)
gimp_image_exported (image, uri);
else
gimp_image_saved (image, uri);

View File

@@ -28,7 +28,8 @@ GimpPDBStatusType file_save (Gimp *gimp,
GimpPlugInProcedure *file_proc,
GimpRunMode run_mode,
gboolean change_saved_state,
gboolean export,
gboolean export_backward,
gboolean export_forward,
GError **error);

View File

@@ -32,7 +32,6 @@
/*#define DEBUG_CAGE */
#define N_ITEMS_PER_ALLOC 10
/* This DELTA is aimed to not have handle on exact pixel during computation,
* to avoid particular case. It shouldn't be so usefull, but it's a double
* safety. */

View File

@@ -23,6 +23,11 @@
#include <windows.h>
#endif
#ifdef GDK_WINDOWING_QUARTZ
#include <Carbon/Carbon.h>
#include <sys/param.h>
#endif
#if HAVE_DBUS_GLIB
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
@@ -36,6 +41,8 @@
#include "display/gimpdisplay.h"
#include "file/file-open.h"
#include "gimpdbusservice.h"
#include "gui-unique.h"
@@ -48,8 +55,6 @@ static DBusGConnection *dbus_connection = NULL;
#endif
#ifdef G_OS_WIN32
#include "file/file-open.h"
static void gui_unique_win32_init (Gimp *gimp);
static void gui_unique_win32_exit (void);
@@ -57,6 +62,14 @@ static Gimp *unique_gimp = NULL;
static HWND proxy_window = NULL;
#endif
#ifdef GDK_WINDOWING_QUARTZ
static void gui_unique_mac_init (Gimp *gimp);
static void gui_unique_mac_exit (void);
static Gimp *unique_gimp = NULL;
AEEventHandlerUPP open_document_callback_proc;
#endif
void
gui_unique_init (Gimp *gimp)
@@ -66,6 +79,10 @@ gui_unique_init (Gimp *gimp)
#elif HAVE_DBUS_GLIB
gui_dbus_service_init (gimp);
#endif
#ifdef GDK_WINDOWING_QUARTZ
gui_unique_mac_init (gimp);
#endif
}
void
@@ -76,6 +93,10 @@ gui_unique_exit (void)
#elif HAVE_DBUS_GLIB
gui_dbus_service_exit ();
#endif
#ifdef GDK_WINDOWING_QUARTZ
gui_unique_mac_exit ();
#endif
}
@@ -179,7 +200,6 @@ gui_unique_win32_idle_open (IdleOpenData *data)
return FALSE;
}
static LRESULT CALLBACK
gui_unique_win32_message_handler (HWND hWnd,
UINT uMsg,
@@ -254,5 +274,108 @@ gui_unique_win32_exit (void)
DestroyWindow (proxy_window);
}
#endif /* G_OS_WIN32 */
#ifdef GDK_WINDOWING_QUARTZ
static gboolean
gui_unique_mac_idle_open (gchar *data)
{
/* We want to be called again later in case that GIMP is not fully
* started yet.
*/
if (! gimp_is_restored (unique_gimp))
return TRUE;
if (data)
{
file_open_from_command_line (unique_gimp, data, FALSE);
}
return FALSE;
}
/* Handle the kAEOpenDocuments Apple events. This will register
* an idle source callback for each filename in the event.
*/
static pascal OSErr
gui_unique_mac_open_documents (const AppleEvent *inAppleEvent,
AppleEvent *outAppleEvent,
long handlerRefcon)
{
OSStatus status;
AEDescList documents;
gchar path[MAXPATHLEN];
status = AEGetParamDesc (inAppleEvent,
keyDirectObject, typeAEList,
&documents);
if (status == noErr)
{
long count = 0;
int i;
AECountItems (&documents, &count);
for (i = 0; i < count; i++)
{
FSRef ref;
gchar *callback_path;
GSource *source;
GClosure *closure;
status = AEGetNthPtr (&documents, i + 1, typeFSRef,
0, 0, &ref, sizeof (ref),
0);
if (status != noErr)
continue;
FSRefMakePath (&ref, (UInt8 *) path, MAXPATHLEN);
callback_path = g_strdup (path);
closure = g_cclosure_new (G_CALLBACK (gui_unique_mac_idle_open),
(gpointer) callback_path,
(GClosureNotify) g_free);
g_object_watch_closure (G_OBJECT (unique_gimp), closure);
source = g_idle_source_new ();
g_source_set_priority (source, G_PRIORITY_LOW);
g_source_set_closure (source, closure);
g_source_attach (source, NULL);
g_source_unref (source);
}
}
return status;
}
static void
gui_unique_mac_init (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (unique_gimp == NULL);
unique_gimp = gimp;
open_document_callback_proc = NewAEEventHandlerUPP(gui_unique_mac_open_documents);
AEInstallEventHandler (kCoreEventClass, kAEOpenDocuments,
open_document_callback_proc,
0L, TRUE);
}
static void
gui_unique_mac_exit (void)
{
unique_gimp = NULL;
AERemoveEventHandler (kCoreEventClass, kAEOpenDocuments,
open_document_callback_proc, TRUE);
DisposeAEEventHandlerUPP(open_document_callback_proc);
}
#endif /* GDK_WINDOWING_QUARTZ */

View File

@@ -502,6 +502,13 @@ carbon_menu_item_connect (GtkWidget *menu_item,
return carbon_item;
}
static gboolean
menu_event_activate_callback (GtkMenuItem *widget)
{
gtk_menu_item_activate (GTK_MENU_ITEM (widget));
return FALSE;
}
/*
* carbon event handler
@@ -545,7 +552,20 @@ menu_event_handler_func (EventHandlerCallRef event_handler_call_ref,
sizeof (widget), 0, &widget);
if (err == noErr && GTK_IS_WIDGET (widget))
{
gtk_menu_item_activate (GTK_MENU_ITEM (widget));
GSource *source;
GClosure *closure;
closure = g_cclosure_new (G_CALLBACK (menu_event_activate_callback),
widget, NULL);
g_object_watch_closure (G_OBJECT (widget), closure);
source = g_idle_source_new ();
g_source_set_priority (source, G_PRIORITY_HIGH);
g_source_set_closure (source, closure);
g_source_attach (source, NULL);
g_source_unref (source);
return noErr;
}
}

View File

@@ -138,18 +138,7 @@ splash_create (gboolean be_verbose)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
/* If the splash image is static, we use a drawing area and set the
* image as back pixmap, otherwise a GtkImage is being used.
*/
if (gdk_pixbuf_animation_is_static_image (pixbuf))
{
splash->area = gtk_drawing_area_new ();
}
else
{
splash->area = gtk_image_new_from_animation (pixbuf);
}
splash->area = gtk_image_new_from_animation (pixbuf);
gtk_box_pack_start (GTK_BOX (vbox), splash->area, TRUE, TRUE, 0);
gtk_widget_show (splash->area);
@@ -167,27 +156,6 @@ splash_create (gboolean be_verbose)
gdk_pixbuf_animation_get_static_image (pixbuf),
&splash->color);
gtk_widget_realize (splash->area);
if (gdk_pixbuf_animation_is_static_image (pixbuf))
{
GdkPixbuf *static_pixbuf = gdk_pixbuf_animation_get_static_image (pixbuf);
GdkPixmap *pixmap;
cairo_t *cr;
pixmap = gdk_pixmap_new (gtk_widget_get_window (splash->area),
splash->width, splash->height, -1);
cr = gdk_cairo_create (pixmap);
gdk_cairo_set_source_pixbuf (cr, static_pixbuf, 0.0, 0.0);
cairo_paint (cr);
cairo_destroy (cr);
gdk_window_set_back_pixmap (gtk_widget_get_window (splash->area),
pixmap, FALSE);
g_object_unref (pixmap);
}
g_object_unref (pixbuf);
g_signal_connect_after (splash->area, "expose-event",

View File

@@ -50,673 +50,673 @@ language_init (const gchar *language)
switch (GetUserDefaultUILanguage())
{
case 1078:
language = "af"; /* Afrikaans - South Africa */
language = "af"; /* Afrikaans - South Africa */
break;
case 1052:
language = "sq"; /* Albanian - Albania */
language = "sq"; /* Albanian - Albania */
break;
case 1118:
language = "am"; /* Amharic - Ethiopia */
language = "am"; /* Amharic - Ethiopia */
break;
case 1025:
language = "ar"; /* Arabic - Saudi Arabia */
language = "ar_SA"; /* Arabic - Saudi Arabia */
break;
case 5121:
language = "ar"; /* Arabic - Algeria */
language = "ar_DZ"; /* Arabic - Algeria */
break;
case 15361:
language = "ar"; /* Arabic - Bahrain */
language = "ar_BH"; /* Arabic - Bahrain */
break;
case 3073:
language = "ar"; /* Arabic - Egypt */
language = "ar_EG"; /* Arabic - Egypt */
break;
case 2049:
language = "ar"; /* Arabic - Iraq */
language = "ar_IQ"; /* Arabic - Iraq */
break;
case 11265:
language = "ar"; /* Arabic - Jordan */
language = "ar_JO"; /* Arabic - Jordan */
break;
case 13313:
language = "ar"; /* Arabic - Kuwait */
language = "ar_KW"; /* Arabic - Kuwait */
break;
case 12289:
language = "ar"; /* Arabic - Lebanon */
language = "ar_LB"; /* Arabic - Lebanon */
break;
case 4097:
language = "ar"; /* Arabic - Libya */
language = "ar_LY"; /* Arabic - Libya */
break;
case 6145:
language = "ar"; /* Arabic - Morocco */
language = "ar_MO"; /* Arabic - Morocco */
break;
case 8193:
language = "ar"; /* Arabic - Oman */
language = "ar_OM"; /* Arabic - Oman */
break;
case 16385:
language = "ar"; /* Arabic - Qatar */
language = "ar_QA"; /* Arabic - Qatar */
break;
case 10241:
language = "ar"; /* Arabic - Syria */
language = "ar_SY"; /* Arabic - Syria */
break;
case 7169:
language = "ar"; /* Arabic - Tunisia */
language = "ar_TN"; /* Arabic - Tunisia */
break;
case 14337:
language = "ar"; /* Arabic - U.A.E. */
language = "ar_AE"; /* Arabic - U.A.E. */
break;
case 9217:
language = "ar"; /* Arabic - Yemen */
language = "ar_YE"; /* Arabic - Yemen */
break;
case 1067:
language = "hy"; /* Armenian - Armenia */
language = "hy"; /* Armenian - Armenia */
break;
case 1101:
language = "as"; /* Assamese */
language = "as"; /* Assamese */
break;
case 2092:
language = NULL; /* Azeri (Cyrillic) */
language = NULL; /* Azeri (Cyrillic) */
break;
case 1068:
language = NULL; /* Azeri (Latin) */
language = NULL; /* Azeri (Latin) */
break;
case 1069:
language = "eu"; /* Basque */
language = "eu"; /* Basque */
break;
case 1059:
language = "be"; /* Belarusian */
language = "be"; /* Belarusian */
break;
case 1093:
language = "bn"; /* Bengali (India) */
language = "bn_IN"; /* Bengali (India) */
break;
case 2117:
language = "bn"; /* Bengali (Bangladesh) */
language = "bn_BD"; /* Bengali (Bangladesh) */
break;
case 5146:
language = "bs"; /* Bosnian (Bosnia/Herzegovina) */
language = "bs"; /* Bosnian (Bosnia/Herzegovina) */
break;
case 1026:
language = "bg"; /* Bulgarian */
language = "bg"; /* Bulgarian */
break;
case 1109:
language = "my"; /* Burmese */
language = "my"; /* Burmese */
break;
case 1027:
language = "ca"; /* Catalan */
language = "ca"; /* Catalan */
break;
case 1116:
language = NULL; /* Cherokee - United States */
language = NULL; /* Cherokee - United States */
break;
case 2052:
language = "zh"; /* Chinese - People"s Republic of China */
language = "zh_CN"; /* Chinese - People"s Republic of China */
break;
case 4100:
language = "zh"; /* Chinese - Singapore */
language = "zh_SG"; /* Chinese - Singapore */
break;
case 1028:
language = "zh"; /* Chinese - Taiwan */
language = "zh_TW"; /* Chinese - Taiwan */
break;
case 3076:
language = "zh"; /* Chinese - Hong Kong SAR */
language = "zh_HK"; /* Chinese - Hong Kong SAR */
break;
case 5124:
language = "zh"; /* Chinese - Macao SAR */
language = "zh_MO"; /* Chinese - Macao SAR */
break;
case 1050:
language = "hr"; /* Croatian */
language = "hr_HR"; /* Croatian */
break;
case 4122:
language = "hr"; /* Croatian (Bosnia/Herzegovina) */
language = "hr_BA"; /* Croatian (Bosnia/Herzegovina) */
break;
case 1029:
language = "cs"; /* Czech */
language = "cs"; /* Czech */
break;
case 1030:
language = "da"; /* Danish */
language = "da"; /* Danish */
break;
case 1125:
language = "dv"; /* Divehi */
language = "dv"; /* Divehi */
break;
case 1043:
language = "nl"; /* Dutch - Netherlands */
language = "nl_NL"; /* Dutch - Netherlands */
break;
case 2067:
language = "nl"; /* Dutch - Belgium */
language = "nl_BE"; /* Dutch - Belgium */
break;
case 1126:
language = NULL; /* Edo */
language = NULL; /* Edo */
break;
case 1033:
language = "en"; /* English - United States */
language = "en_US"; /* English - United States */
break;
case 2057:
language = "en"; /* English - United Kingdom */
language = "en_UK"; /* English - United Kingdom */
break;
case 3081:
language = "en"; /* English - Australia */
language = "en_AU"; /* English - Australia */
break;
case 10249:
language = "en"; /* English - Belize */
language = "en_BZ"; /* English - Belize */
break;
case 4105:
language = "en"; /* English - Canada */
language = "en_CA"; /* English - Canada */
break;
case 9225:
language = "en"; /* English - Caribbean */
language = "en"; /* English - Caribbean */
break;
case 15369:
language = "en"; /* English - Hong Kong SAR */
language = "en_HK"; /* English - Hong Kong SAR */
break;
case 16393:
language = "en"; /* English - India */
language = "en_IN"; /* English - India */
break;
case 14345:
language = "en"; /* English - Indonesia */
language = "en_ID"; /* English - Indonesia */
break;
case 6153:
language = "en"; /* English - Ireland */
language = "en_IR"; /* English - Ireland */
break;
case 8201:
language = "en"; /* English - Jamaica */
language = "en_JM"; /* English - Jamaica */
break;
case 17417:
language = "en"; /* English - Malaysia */
language = "en_MW"; /* English - Malaysia */
break;
case 5129:
language = "en"; /* English - New Zealand */
language = "en_NZ"; /* English - New Zealand */
break;
case 13321:
language = "en"; /* English - Philippines */
language = "en_PH"; /* English - Philippines */
break;
case 18441:
language = "en"; /* English - Singapore */
language = "en_SG"; /* English - Singapore */
break;
case 7177:
language = "en"; /* English - South Africa */
language = "en_ZA"; /* English - South Africa */
break;
case 11273:
language = "en"; /* English - Trinidad */
language = "en_TT"; /* English - Trinidad */
break;
case 12297:
language = "en"; /* English - Zimbabwe */
language = "en_ZW"; /* English - Zimbabwe */
break;
case 1061:
language = "et"; /* Estonian */
language = "et"; /* Estonian */
break;
case 1080:
language = "fo"; /* Faroese */
language = "fo"; /* Faroese */
break;
case 1065:
language = NULL; /* Farsi */
language = "fa"; /* Farsi */
break;
case 1124:
language = NULL; /* Filipino */
language = NULL; /* Filipino */
break;
case 1035:
language = "fi"; /* Finnish */
language = "fi"; /* Finnish */
break;
case 1036:
language = "fr"; /* French - France */
language = "fr_FR"; /* French - France */
break;
case 2060:
language = "fr"; /* French - Belgium */
language = "fr_BE"; /* French - Belgium */
break;
case 11276:
language = "fr"; /* French - Cameroon */
language = "fr_CM"; /* French - Cameroon */
break;
case 3084:
language = "fr"; /* French - Canada */
language = "fr_CA"; /* French - Canada */
break;
case 9228:
language = "fr"; /* French - Democratic Rep. of Congo */
language = "fr_CD"; /* French - Democratic Rep. of Congo */
break;
case 12300:
language = "fr"; /* French - Cote d"Ivoire */
language = "fr_CI"; /* French - Cote d"Ivoire */
break;
case 15372:
language = "fr"; /* French - Haiti */
language = "fr_HT"; /* French - Haiti */
break;
case 5132:
language = "fr"; /* French - Luxembourg */
language = "fr_LU"; /* French - Luxembourg */
break;
case 13324:
language = "fr"; /* French - Mali */
language = "fr_ML"; /* French - Mali */
break;
case 6156:
language = "fr"; /* French - Monaco */
language = "fr_MC"; /* French - Monaco */
break;
case 14348:
language = "fr"; /* French - Morocco */
language = "fr_MA"; /* French - Morocco */
break;
case 58380:
language = "fr"; /* French - North Africa */
language = "fr"; /* French - North Africa */
break;
case 8204:
language = "fr"; /* French - Reunion */
language = "fr_RE"; /* French - Reunion */
break;
case 10252:
language = "fr"; /* French - Senegal */
language = "fr_SN"; /* French - Senegal */
break;
case 4108:
language = "fr"; /* French - Switzerland */
language = "fr_CH"; /* French - Switzerland */
break;
case 7180:
language = "fr"; /* French - West Indies */
language = "fr"; /* French - West Indies */
break;
case 1122:
language = "fy"; /* Frisian - Netherlands */
language = "fy"; /* Frisian - Netherlands */
break;
case 1127:
language = NULL; /* Fulfulde - Nigeria */
language = NULL; /* Fulfulde - Nigeria */
break;
case 1071:
language = "mk"; /* FYRO Macedonian */
language = "mk"; /* FYRO Macedonian */
break;
case 2108:
language = "ga"; /* Gaelic (Ireland) */
language = "ga"; /* Gaelic (Ireland) */
break;
case 1084:
language = "gd"; /* Gaelic (Scotland) */
language = "gd"; /* Gaelic (Scotland) */
break;
case 1110:
language = "gl"; /* Galician */
language = "gl"; /* Galician */
break;
case 1079:
language = "ka"; /* Georgian */
language = "ka"; /* Georgian */
break;
case 1031:
language = "de"; /* German - Germany */
language = "de_DE"; /* German - Germany */
break;
case 3079:
language = "de"; /* German - Austria */
language = "de_AT"; /* German - Austria */
break;
case 5127:
language = "de"; /* German - Liechtenstein */
language = "de_LI"; /* German - Liechtenstein */
break;
case 4103:
language = "de"; /* German - Luxembourg */
language = "de_LU"; /* German - Luxembourg */
break;
case 2055:
language = "de"; /* German - Switzerland */
language = "de_CH"; /* German - Switzerland */
break;
case 1032:
language = "el"; /* Greek */
language = "el"; /* Greek */
break;
case 1140:
language = "gn"; /* Guarani - Paraguay */
language = "gn"; /* Guarani - Paraguay */
break;
case 1095:
language = "gu"; /* Gujarati */
language = "gu"; /* Gujarati */
break;
case 1128:
language = "ha"; /* Hausa - Nigeria */
language = "ha"; /* Hausa - Nigeria */
break;
case 1141:
language = NULL; /* Hawaiian - United States */
language = NULL; /* Hawaiian - United States */
break;
case 1037:
language = "he"; /* Hebrew */
language = "he"; /* Hebrew */
break;
case 1081:
language = "hi"; /* Hindi */
language = "hi"; /* Hindi */
break;
case 1038:
language = "hu"; /* Hungarian */
language = "hu"; /* Hungarian */
break;
case 1129:
language = NULL; /* Ibibio - Nigeria */
language = NULL; /* Ibibio - Nigeria */
break;
case 1039:
language = "is"; /* Icelandic */
language = "is"; /* Icelandic */
break;
case 1136:
language = "ig"; /* Igbo - Nigeria */
language = "ig"; /* Igbo - Nigeria */
break;
case 1057:
language = "id"; /* Indonesian */
language = "id"; /* Indonesian */
break;
case 1117:
language = "iu"; /* Inuktitut */
language = "iu"; /* Inuktitut */
break;
case 1040:
language = "it"; /* Italian - Italy */
language = "it_IT"; /* Italian - Italy */
break;
case 2064:
language = "it"; /* Italian - Switzerland */
language = "it_CH"; /* Italian - Switzerland */
break;
case 1041:
language = "ja"; /* Japanese */
language = "ja"; /* Japanese */
break;
case 1099:
language = "kn"; /* Kannada */
language = "kn"; /* Kannada */
break;
case 1137:
language = "kr"; /* Kanuri - Nigeria */
language = "kr"; /* Kanuri - Nigeria */
break;
case 2144:
language = "ks"; /* Kashmiri */
language = "ks"; /* Kashmiri */
break;
case 1120:
language = "ks"; /* Kashmiri (Arabic) */
language = "ks"; /* Kashmiri (Arabic) */
break;
case 1087:
language = "kk"; /* Kazakh */
language = "kk"; /* Kazakh */
break;
case 1107:
language = "km"; /* Khmer */
language = "km"; /* Khmer */
break;
case 1111:
language = NULL; /* Konkani */
language = NULL; /* Konkani */
break;
case 1042:
language = "ko"; /* Korean */
language = "ko"; /* Korean */
break;
case 1088:
language = "ky"; /* Kyrgyz (Cyrillic) */
language = "ky"; /* Kyrgyz (Cyrillic) */
break;
case 1108:
language = "lo"; /* Lao */
language = "lo"; /* Lao */
break;
case 1142:
language = "la"; /* Latin */
language = "la"; /* Latin */
break;
case 1062:
language = "lv"; /* Latvian */
language = "lv"; /* Latvian */
break;
case 1063:
language = "lt"; /* Lithuanian */
language = "lt"; /* Lithuanian */
break;
case 1086:
language = "ms"; /* Malay - Malaysia */
language = "ms_MY"; /* Malay - Malaysia */
break;
case 2110:
language = "ms"; /* Malay - Brunei Darussalam */
language = "ms_BN"; /* Malay - Brunei Darussalam */
break;
case 1100:
language = "ml"; /* Malayalam */
language = "ml"; /* Malayalam */
break;
case 1082:
language = "mt"; /* Maltese */
language = "mt"; /* Maltese */
break;
case 1112:
language = NULL; /* Manipuri */
language = NULL; /* Manipuri */
break;
case 1153:
language = "mi"; /* Maori - New Zealand */
language = "mi"; /* Maori - New Zealand */
break;
case 1102:
language = "mr"; /* Marathi */
language = "mr"; /* Marathi */
break;
case 1104:
language = "mn"; /* Mongolian (Cyrillic) */
language = "mn"; /* Mongolian (Cyrillic) */
break;
case 2128:
language = "mn"; /* Mongolian (Mongolian) */
language = "mn"; /* Mongolian (Mongolian) */
break;
case 1121:
language = "ne"; /* Nepali */
language = "ne_NP"; /* Nepali */
break;
case 2145:
language = "ne"; /* Nepali - India */
language = "ne_IN"; /* Nepali - India */
break;
case 1044:
language = "no"; /* Norwegian (Bokmᅢᆬl) */
language = "no"; /* Norwegian (Bokmᅢᆬl) */
break;
case 2068:
language = "no"; /* Norwegian (Nynorsk) */
language = "no"; /* Norwegian (Nynorsk) */
break;
case 1096:
language = "or"; /* Oriya */
language = "or"; /* Oriya */
break;
case 1138:
language = "om"; /* Oromo */
language = "om"; /* Oromo */
break;
case 1145:
language = NULL; /* Papiamentu */
language = NULL; /* Papiamentu */
break;
case 1123:
language = "ps"; /* Pashto */
language = "ps"; /* Pashto */
break;
case 1045:
language = "pl"; /* Polish */
language = "pl"; /* Polish */
break;
case 1046:
language = "pt"; /* Portuguese - Brazil */
language = "pt_BR"; /* Portuguese - Brazil */
break;
case 2070:
language = "pt"; /* Portuguese - Portugal */
language = "pt_PT"; /* Portuguese - Portugal */
break;
case 1094:
language = "pa"; /* Punjabi */
language = "pa"; /* Punjabi */
break;
case 2118:
language = "pa"; /* Punjabi (Pakistan) */
language = "pa_PK"; /* Punjabi (Pakistan) */
break;
case 1131:
language = "qu"; /* Quecha - Bolivia */
language = "qu_BO"; /* Quecha - Bolivia */
break;
case 2155:
language = "qu"; /* Quecha - Ecuador */
language = "qu_EC"; /* Quecha - Ecuador */
break;
case 3179:
language = "qu"; /* Quecha - Peru */
language = "qu_PE"; /* Quecha - Peru */
break;
case 1047:
language = "rm"; /* Rhaeto-Romanic */
language = "rm"; /* Rhaeto-Romanic */
break;
case 1048:
language = "ro"; /* Romanian */
language = "ro_RO"; /* Romanian */
break;
case 2072:
language = "ro"; /* Romanian - Moldava */
language = "ro_MD"; /* Romanian - Moldava */
break;
case 1049:
language = "ru"; /* Russian */
language = "ru_RU"; /* Russian */
break;
case 2073:
language = "ru"; /* Russian - Moldava */
language = "ru_MD"; /* Russian - Moldava */
break;
case 1083:
language = NULL; /* Sami (Lappish) */
language = NULL; /* Sami (Lappish) */
break;
case 1103:
language = "sa"; /* Sanskrit */
language = "sa"; /* Sanskrit */
break;
case 1132:
language = NULL; /* Sepedi */
language = NULL; /* Sepedi */
break;
case 3098:
language = "sr"; /* Serbian (Cyrillic) */
language = "sr"; /* Serbian (Cyrillic) */
break;
case 2074:
language = "sr"; /* Serbian (Latin) */
language = "sr@latin"; /* Serbian (Latin) */
break;
case 1113:
language = "sd"; /* Sindhi - India */
language = "sd_IN"; /* Sindhi - India */
break;
case 2137:
language = "sd"; /* Sindhi - Pakistan */
language = "sd_PK"; /* Sindhi - Pakistan */
break;
case 1115:
language = "si"; /* Sinhalese - Sri Lanka */
language = "si"; /* Sinhalese - Sri Lanka */
break;
case 1051:
language = "sk"; /* Slovak */
language = "sk"; /* Slovak */
break;
case 1060:
language = "sl"; /* Slovenian */
language = "sl"; /* Slovenian */
break;
case 1143:
language = "so"; /* Somali */
language = "so"; /* Somali */
break;
case 1070:
language = NULL; /* Sorbian */
language = NULL; /* Sorbian */
break;
case 3082:
language = "es"; /* Spanish - Spain (Modern Sort) */
language = "es"; /* Spanish - Spain (Modern Sort) */
break;
case 1034:
language = "es"; /* Spanish - Spain (Traditional Sort) */
language = "es"; /* Spanish - Spain (Traditional Sort) */
break;
case 11274:
language = "es"; /* Spanish - Argentina */
language = "es_AR"; /* Spanish - Argentina */
break;
case 16394:
language = "es"; /* Spanish - Bolivia */
language = "es_BO"; /* Spanish - Bolivia */
break;
case 13322:
language = "es"; /* Spanish - Chile */
language = "es_CL"; /* Spanish - Chile */
break;
case 9226:
language = "es"; /* Spanish - Colombia */
language = "es_CO"; /* Spanish - Colombia */
break;
case 5130:
language = "es"; /* Spanish - Costa Rica */
language = "es_CR"; /* Spanish - Costa Rica */
break;
case 7178:
language = "es"; /* Spanish - Dominican Republic */
language = "es_DO"; /* Spanish - Dominican Republic */
break;
case 12298:
language = "es"; /* Spanish - Ecuador */
language = "es_EC"; /* Spanish - Ecuador */
break;
case 17418:
language = "es"; /* Spanish - El Salvador */
language = "es_SV"; /* Spanish - El Salvador */
break;
case 4106:
language = "es"; /* Spanish - Guatemala */
language = "es_GT"; /* Spanish - Guatemala */
break;
case 18442:
language = "es"; /* Spanish - Honduras */
language = "es_HN"; /* Spanish - Honduras */
break;
case 58378:
language = "es"; /* Spanish - Latin America */
language = "es"; /* Spanish - Latin America */
break;
case 2058:
language = "es"; /* Spanish - Mexico */
language = "es_MX"; /* Spanish - Mexico */
break;
case 19466:
language = "es"; /* Spanish - Nicaragua */
language = "es_NI"; /* Spanish - Nicaragua */
break;
case 6154:
language = "es"; /* Spanish - Panama */
language = "es_PA"; /* Spanish - Panama */
break;
case 15370:
language = "es"; /* Spanish - Paraguay */
language = "es_PY"; /* Spanish - Paraguay */
break;
case 10250:
language = "es"; /* Spanish - Peru */
language = "es_PE"; /* Spanish - Peru */
break;
case 20490:
language = "es"; /* Spanish - Puerto Rico */
language = "es_PR"; /* Spanish - Puerto Rico */
break;
case 21514:
language = "es"; /* Spanish - United States */
language = "es_US"; /* Spanish - United States */
break;
case 14346:
language = "es"; /* Spanish - Uruguay */
language = "es_UY"; /* Spanish - Uruguay */
break;
case 8202:
language = "es"; /* Spanish - Venezuela */
language = "es_VE"; /* Spanish - Venezuela */
break;
case 1072:
language = NULL; /* Sutu */
language = NULL; /* Sutu */
break;
case 1089:
language = "sw"; /* Swahili */
language = "sw"; /* Swahili */
break;
case 1053:
language = "sv"; /* Swedish */
language = "sv_SE"; /* Swedish */
break;
case 2077:
language = "sv"; /* Swedish - Finland */
language = "sv_FI"; /* Swedish - Finland */
break;
case 1114:
language = NULL; /* Syriac */
language = NULL; /* Syriac */
break;
case 1064:
language = "tg"; /* Tajik */
language = "tg"; /* Tajik */
break;
case 1119:
language = NULL; /* Tamazight (Arabic) */
language = NULL; /* Tamazight (Arabic) */
break;
case 2143:
language = NULL; /* Tamazight (Latin) */
language = NULL; /* Tamazight (Latin) */
break;
case 1097:
language = "ta"; /* Tamil */
language = "ta"; /* Tamil */
break;
case 1092:
language = "tt"; /* Tatar */
language = "tt"; /* Tatar */
break;
case 1098:
language = "te"; /* Telugu */
language = "te"; /* Telugu */
break;
case 1054:
language = "th"; /* Thai */
language = "th"; /* Thai */
break;
case 2129:
language = "bo"; /* Tibetan - Bhutan */
language = "bo_BT"; /* Tibetan - Bhutan */
break;
case 1105:
language = "bo"; /* Tibetan - People"s Republic of China */
language = "bo_CN"; /* Tibetan - People"s Republic of China */
break;
case 2163:
language = "ti"; /* Tigrigna - Eritrea */
language = "ti_ER"; /* Tigrigna - Eritrea */
break;
case 1139:
language = "ti"; /* Tigrigna - Ethiopia */
language = "ti_ET"; /* Tigrigna - Ethiopia */
break;
case 1073:
language = "ts"; /* Tsonga */
language = "ts"; /* Tsonga */
break;
case 1074:
language = "tn"; /* Tswana */
language = "tn"; /* Tswana */
break;
case 1055:
language = "tr"; /* Turkish */
language = "tr"; /* Turkish */
break;
case 1090:
language = "tk"; /* Turkmen */
language = "tk"; /* Turkmen */
break;
case 1152:
language = "ug"; /* Uighur - China */
language = "ug"; /* Uighur - China */
break;
case 1058:
language = "uk"; /* Ukrainian */
language = "uk"; /* Ukrainian */
break;
case 1056:
language = "ur"; /* Urdu */
language = "ur"; /* Urdu */
break;
case 2080:
language = "ur"; /* Urdu - India */
language = "ur_IN"; /* Urdu - India */
break;
case 2115:
language = "uz"; /* Uzbek (Cyrillic) */
language = "uz"; /* Uzbek (Cyrillic) */
break;
case 1091:
language = "uz"; /* Uzbek (Latin) */
language = "uz@latin"; /* Uzbek (Latin) */
break;
case 1075:
language = "ve"; /* Venda */
language = "ve"; /* Venda */
break;
case 1066:
language = "vi"; /* Vietnamese */
language = "vi"; /* Vietnamese */
break;
case 1106:
language = "cy"; /* Welsh */
language = "cy"; /* Welsh */
break;
case 1076:
language = "xh"; /* Xhosa */
language = "xh"; /* Xhosa */
break;
case 1144:
language = NULL; /* Yi */
language = NULL; /* Yi */
break;
case 1085:
language = "yi"; /* Yiddish */
language = "yi"; /* Yiddish */
break;
case 1130:
language = "yo"; /* Yoruba */
language = "yo"; /* Yoruba */
break;
case 1077:
language = "zu"; /* Zulu */
language = "zu"; /* Zulu */
break;
default:
language = NULL;

View File

@@ -62,7 +62,9 @@ static void scale (TileManager *srcTM,
GimpProgressFunc progress_callback,
gpointer progress_data,
gint *progress,
gint max_progress);
gint max_progress,
const gdouble scalex,
const gdouble scaley);
static void decimate_xy (TileManager *srcTM,
TileManager *dstTM,
GimpInterpolationType interpolation,
@@ -212,14 +214,14 @@ scale_determine_levels (PixelRegion *srcPR,
while (scalex < 0.5 && width > 1)
{
scalex *= 2;
width /= 2;
width = (width + 1) / 2;
*levelx += 1;
}
while (scaley < 0.5 && height > 1)
{
scaley *= 2;
height *= 2;
height = (height + 1) / 2;
*levely += 1;
}
}
@@ -240,36 +242,10 @@ scale_determine_progress (PixelRegion *srcPR,
/* The logic here should be kept in sync with scale_region_tile(). */
while (levelx < 0 && levely < 0)
{
width <<= 1;
height <<= 1;
levelx++;
levely++;
tiles += NUM_TILES (width, height);
}
while (levelx < 0)
{
width <<= 1;
levelx++;
tiles += NUM_TILES (width, height);
}
while (levely < 0)
{
height <<= 1;
levely++;
tiles += NUM_TILES (width, height);
}
while (levelx > 0 && levely > 0)
{
width >>= 1;
height >>= 1;
width = (width + 1) >> 1;
height = (height + 1) >> 1;
levelx--;
levely--;
@@ -278,7 +254,7 @@ scale_determine_progress (PixelRegion *srcPR,
while (levelx > 0)
{
width >>= 1;
width = (width + 1) >> 1;
levelx--;
tiles += NUM_TILES (width, height);
@@ -286,7 +262,7 @@ scale_determine_progress (PixelRegion *srcPR,
while (levely > 0)
{
height >>= 1;
height = (height + 1) >> 1;
levely--;
tiles += NUM_TILES (width, height);
@@ -314,6 +290,8 @@ scale_region_tile (PixelRegion *srcPR,
gint progress = 0;
gint levelx = 0;
gint levely = 0;
gdouble scalex = (gdouble) width / dstPR->w;
gdouble scaley = (gdouble) height / dstPR->h;
/* determine scaling levels */
if (interpolation != GIMP_INTERPOLATION_NONE)
@@ -326,60 +304,16 @@ scale_region_tile (PixelRegion *srcPR,
if (levelx == 0 && levely == 0)
{
scale (srcTM, dstTM, interpolation,
progress_callback, progress_data, &progress, max_progress);
}
while (levelx < 0 && levely < 0)
{
width <<= 1;
height <<= 1;
tmpTM = tile_manager_new (width, height, bytes);
scale (srcTM, tmpTM, interpolation,
progress_callback, progress_data, &progress, max_progress);
if (srcTM != srcPR->tiles)
tile_manager_unref (srcTM);
srcTM = tmpTM;
levelx++;
levely++;
}
while (levelx < 0)
{
width <<= 1;
tmpTM = tile_manager_new (width, height, bytes);
scale (srcTM, tmpTM, interpolation,
progress_callback, progress_data, &progress, max_progress);
if (srcTM != srcPR->tiles)
tile_manager_unref (srcTM);
srcTM = tmpTM;
levelx++;
}
while (levely < 0)
{
height <<= 1;
tmpTM = tile_manager_new (width, height, bytes);
scale (srcTM, tmpTM, interpolation,
progress_callback, progress_data, &progress, max_progress);
if (srcTM != srcPR->tiles)
tile_manager_unref (srcTM);
srcTM = tmpTM;
levely++;
progress_callback, progress_data, &progress, max_progress,
scalex, scaley);
}
while (levelx > 0 && levely > 0)
{
width >>= 1;
height >>= 1;
width = (width + 1) >> 1;
height = (height + 1) >> 1;
scalex *= .5;
scaley *= .5;
tmpTM = tile_manager_new (width, height, bytes);
decimate_xy (srcTM, tmpTM, interpolation,
@@ -395,7 +329,8 @@ scale_region_tile (PixelRegion *srcPR,
while (levelx > 0)
{
width >>= 1;
width = (width + 1) >> 1;
scalex *= .5;
tmpTM = tile_manager_new (width, height, bytes);
decimate_x (srcTM, tmpTM, interpolation,
@@ -410,7 +345,8 @@ scale_region_tile (PixelRegion *srcPR,
while (levely > 0)
{
height >>= 1;
height = (height + 1) >> 1;
scaley *= .5;
tmpTM = tile_manager_new (width, height, bytes);
decimate_y (srcTM, tmpTM, interpolation,
@@ -426,7 +362,8 @@ scale_region_tile (PixelRegion *srcPR,
if (tmpTM != NULL)
{
scale (tmpTM, dstTM, interpolation,
progress_callback, progress_data, &progress, max_progress);
progress_callback, progress_data, &progress, max_progress,
scalex, scaley);
tile_manager_unref (tmpTM);
}
@@ -443,7 +380,9 @@ scale (TileManager *srcTM,
GimpProgressFunc progress_callback,
gpointer progress_data,
gint *progress,
gint max_progress)
gint max_progress,
const gdouble scalex,
const gdouble scaley)
{
PixelRegion region;
PixelSurround *surround = NULL;
@@ -452,8 +391,6 @@ scale (TileManager *srcTM,
const guint bytes = tile_manager_bpp (dstTM);
const guint dst_width = tile_manager_width (dstTM);
const guint dst_height = tile_manager_height (dstTM);
const gdouble scaley = (gdouble) src_height / (gdouble) dst_height;
const gdouble scalex = (gdouble) src_width / (gdouble) dst_width;
gpointer pr;
gfloat *kernel_lookup = NULL;
@@ -509,7 +446,7 @@ scale (TileManager *srcTM,
{
guchar *pixel = row;
gdouble yfrac = (y + 0.5) * scaley - 0.5;
gint sy = (gint) yfrac;
gint sy = floor (yfrac);
gint x;
yfrac = yfrac - sy;
@@ -517,7 +454,7 @@ scale (TileManager *srcTM,
for (x = region.x; x < x1; x++)
{
gdouble xfrac = (x + 0.5) * scalex - 0.5;
gint sx = (gint) xfrac;
gint sx = floor (xfrac);
xfrac = xfrac - sx;
@@ -965,7 +902,7 @@ sinc (const gdouble x)
gfloat *
create_lanczos_lookup (void)
{
const gdouble dx = LANCZOS_WIDTH / (gdouble) (LANCZOS_SAMPLES - 1);
const gdouble dx = LANCZOS_MIN;
gfloat *lookup = g_new (gfloat, LANCZOS_SAMPLES);
gdouble x = 0.0;
@@ -984,7 +921,7 @@ create_lanczos_lookup (void)
static gfloat *
create_lanczos3_lookup (void)
{
const gdouble dx = 3.0 / (gdouble) (LANCZOS_SAMPLES - 1);
const gdouble dx = LANCZOS_MIN;
gfloat *lookup = g_new (gfloat, LANCZOS_SAMPLES);
gdouble x = 0.0;
@@ -1051,7 +988,7 @@ interpolate_bilinear (PixelSurround *surround,
switch (bytes)
{
case 1:
sum = weighted_sum (xfrac, yfrac, p1[0], p2[0], p3[0], p4[0]);
sum = RINT (weighted_sum (xfrac, yfrac, p1[0], p2[0], p3[0], p4[0]));
pixel[0] = CLAMP (sum, 0, 255);
break;
@@ -1063,7 +1000,8 @@ interpolate_bilinear (PixelSurround *surround,
sum = weighted_sum (xfrac, yfrac,
p1[0] * p1[1], p2[0] * p2[1],
p3[0] * p3[1], p4[0] * p4[1]);
sum /= alphasum;
sum = RINT (sum / alphasum);
alphasum = RINT (alphasum);
pixel[0] = CLAMP (sum, 0, 255);
pixel[1] = CLAMP (alphasum, 0, 255);
@@ -1077,7 +1015,7 @@ interpolate_bilinear (PixelSurround *surround,
case 3:
for (b = 0; b < 3; b++)
{
sum = weighted_sum (xfrac, yfrac, p1[b], p2[b], p3[b], p4[b]);
sum = RINT (weighted_sum (xfrac, yfrac, p1[b], p2[b], p3[b], p4[b]));
pixel[b] = CLAMP (sum, 0, 255);
}
@@ -1092,11 +1030,12 @@ interpolate_bilinear (PixelSurround *surround,
sum = weighted_sum (xfrac, yfrac,
p1[b] * p1[3], p2[b] * p2[3],
p3[b] * p3[3], p4[b] * p4[3]);
sum /= alphasum;
sum = RINT (sum / alphasum);
pixel[b] = CLAMP (sum, 0, 255);
}
alphasum = RINT (alphasum);
pixel[3] = CLAMP (alphasum, 0, 255);
}
else
@@ -1152,7 +1091,7 @@ interpolate_cubic (PixelSurround *surround,
p2 = cubic_spline_fit (xfrac, s2[0], s2[1], s2[2], s2[3]);
p3 = cubic_spline_fit (xfrac, s3[0], s3[1], s3[2], s3[3]);
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum = RINT (cubic_spline_fit (yfrac, p0, p1, p2, p3));
pixel[0]= CLAMP (sum, 0, 255);
break;
@@ -1180,10 +1119,11 @@ interpolate_cubic (PixelSurround *surround,
s3[0] * s3[1], s3[2] * s3[3],
s3[4] * s3[5], s3[6] * s3[7]);
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum /= alphasum;
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum = RINT (sum / alphasum);
pixel[0] = CLAMP (sum, 0, 255);
alphasum = RINT (alphasum);
pixel[1] = CLAMP (alphasum, 0, 255);
}
else
@@ -1200,7 +1140,7 @@ interpolate_cubic (PixelSurround *surround,
p2 = cubic_spline_fit (xfrac, s2[b], s2[3 + b], s2[6 + b], s2[9 + b]);
p3 = cubic_spline_fit (xfrac, s3[b], s3[3 + b], s3[6 + b], s3[9 + b]);
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum = RINT (cubic_spline_fit (yfrac, p0, p1, p2, p3));
pixel[b] = CLAMP (sum, 0, 255);
}
@@ -1231,12 +1171,13 @@ interpolate_cubic (PixelSurround *surround,
s3[0 + b] * s3[ 3], s3[ 4 + b] * s3[7],
s3[8 + b] * s3[11], s3[12 + b] * s3[15]);
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum /= alphasum;
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum = RINT (sum / alphasum);
pixel[b] = CLAMP (sum, 0, 255);
}
alphasum = RINT (alphasum);
pixel[3] = CLAMP (alphasum, 0, 255);
}
else
@@ -1346,7 +1287,7 @@ interpolate_lanczos3 (PixelSurround *surround,
switch (bytes)
{
case 1:
sum = lanczos3_mul (src, x_kernel, y_kernel, stride, 1, 0);
sum = RINT (lanczos3_mul (src, x_kernel, y_kernel, stride, 1, 0));
pixel[0] = CLAMP (sum, 0, 255);
break;
@@ -1356,9 +1297,10 @@ interpolate_lanczos3 (PixelSurround *surround,
if (alphasum > 0)
{
sum = lanczos3_mul_alpha (src, x_kernel, y_kernel, stride, 2, 0);
sum /= alphasum;
sum = RINT (sum / alphasum);
pixel[0] = CLAMP (sum, 0, 255);
alphasum = RINT (alphasum);
pixel[1] = CLAMP (alphasum, 0, 255);
}
else
@@ -1370,7 +1312,7 @@ interpolate_lanczos3 (PixelSurround *surround,
case 3:
for (b = 0; b < 3; b++)
{
sum = lanczos3_mul (src, x_kernel, y_kernel, stride, 3, b);
sum = RINT (lanczos3_mul (src, x_kernel, y_kernel, stride, 3, b));
pixel[b] = CLAMP (sum, 0, 255);
}
@@ -1383,11 +1325,12 @@ interpolate_lanczos3 (PixelSurround *surround,
for (b = 0; b < 3; b++)
{
sum = lanczos3_mul_alpha (src, x_kernel, y_kernel, stride, 4, b);
sum /= alphasum;
sum = RINT (sum / alphasum);
pixel[b] = CLAMP (sum, 0, 255);
}
alphasum = RINT (alphasum);
pixel[3] = CLAMP (alphasum, 0, 255);
}
else

View File

@@ -83,18 +83,21 @@ static gdouble gimp_heal_laplace_iteration (gdouble *matrix,
gint depth,
gint width,
gdouble *solution,
guchar *mask);
guchar *mask,
gint mask_stride,
gint mask_offx,
gint mask_offy);
static void gimp_heal_laplace_loop (gdouble *matrix,
gint height,
gint depth,
gint width,
gdouble *solution,
guchar *mask);
PixelRegion *maskPR);
static PixelRegion *gimp_heal_region (PixelRegion *tempPR,
PixelRegion *srcPR,
const TempBuf *mask_buf);
PixelRegion *maskPR);
static void gimp_heal_motion (GimpSourceCore *source_core,
GimpDrawable *drawable,
@@ -269,7 +272,10 @@ gimp_heal_laplace_iteration (gdouble *matrix,
gint depth,
gint width,
gdouble *solution,
guchar *mask)
guchar *mask,
gint mask_stride,
gint mask_offx,
gint mask_offy)
{
const gint rowstride = width * depth;
gint i, j, k, off, offm, offm0, off0;
@@ -283,12 +289,12 @@ gimp_heal_laplace_iteration (gdouble *matrix,
for (i = 0; i < height; i++)
{
off0 = i * rowstride;
offm0 = i * width;
offm0 = (i + mask_offy) * mask_stride;
for (j = i % 2; j < width; j += 2)
{
off = off0 + j * depth;
offm = offm0 + j;
offm = offm0 + j + mask_offx;
if ((0 == mask[offm]) ||
(i == 0) || (i == (height - 1)) ||
@@ -330,13 +336,13 @@ gimp_heal_laplace_iteration (gdouble *matrix,
*/
for (i = 0; i < height; i++)
{
off0 = i * rowstride;
offm0 = i * width;
off0 = i * rowstride;
offm0 = (i + mask_offy) * mask_stride;
for (j = (i % 2) ? 0 : 1; j < width; j += 2)
{
off = off0 + j * depth;
offm = offm0 + j;
offm = offm0 + j + mask_offx;
if ((0 == mask[offm]) ||
(i == 0) || (i == (height - 1)) ||
@@ -375,12 +381,12 @@ gimp_heal_laplace_iteration (gdouble *matrix,
/* Solve the laplace equation for matrix and store the result in solution.
*/
static void
gimp_heal_laplace_loop (gdouble *matrix,
gint height,
gint depth,
gint width,
gdouble *solution,
guchar *mask)
gimp_heal_laplace_loop (gdouble *matrix,
gint height,
gint depth,
gint width,
gdouble *solution,
PixelRegion *maskPR)
{
#define EPSILON 0.001
#define MAX_ITER 500
@@ -393,7 +399,8 @@ gimp_heal_laplace_loop (gdouble *matrix,
/* do one iteration and store the amount of error */
sqr_err = gimp_heal_laplace_iteration (matrix, height, depth, width,
solution, mask);
solution, maskPR->data, maskPR->rowstride,
maskPR->x, maskPR->y);
/* copy solution to matrix */
memcpy (matrix, solution, width * height * depth * sizeof (double));
@@ -411,17 +418,16 @@ gimp_heal_laplace_loop (gdouble *matrix,
static PixelRegion *
gimp_heal_region (PixelRegion *tempPR,
PixelRegion *srcPR,
const TempBuf *mask_buf)
PixelRegion *maskPR)
{
gdouble *i_1 = g_new (gdouble, tempPR->h * tempPR->bytes * tempPR->w);
gdouble *i_2 = g_new (gdouble, tempPR->h * tempPR->bytes * tempPR->w);
guchar *mask = temp_buf_get_data (mask_buf);
/* substract pattern to image and store the result as a double in i_1 */
gimp_heal_sub (tempPR, srcPR, i_1);
/* FIXME: is a faster implementation needed? */
gimp_heal_laplace_loop (i_1, tempPR->h, tempPR->bytes, tempPR->w, i_2, mask);
gimp_heal_laplace_loop (i_1, tempPR->h, tempPR->bytes, tempPR->w, i_2, maskPR);
/* add solution to original image and store in tempPR */
gimp_heal_add (i_2, srcPR, tempPR);
@@ -459,6 +465,7 @@ gimp_heal_motion (GimpSourceCore *source_core,
PixelRegion origPR;
PixelRegion tempPR;
PixelRegion destPR;
PixelRegion maskPR;
GimpImageType src_type;
const TempBuf *mask_buf;
gdouble fade_point;
@@ -569,8 +576,20 @@ gimp_heal_motion (GimpSourceCore *source_core,
return;
}
/* find the offset of the brush mask's rect */
{
gint x = (gint) floor (coords->x) - (mask_buf->width >> 1);
gint y = (gint) floor (coords->y) - (mask_buf->height >> 1);
gint off_x = (x < 0) ? -x : 0;
gint off_y = (y < 0) ? -y : 0;
pixel_region_init_temp_buf (&maskPR, mask_buf, off_x, off_y,
paint_area_width, paint_area_height);
}
/* heal tempPR using srcPR */
gimp_heal_region (&tempPR, srcPR, mask_buf);
gimp_heal_region (&tempPR, srcPR, &maskPR);
temp_buf_free (src);

View File

@@ -434,27 +434,28 @@ context_get_brush_size_invoker (GimpProcedure *procedure,
GError **error)
{
gboolean success = TRUE;
gdouble size;
GValueArray *return_vals;
gdouble size = 0.0;
size = g_value_get_double (&args->values[0]);
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-size", &size,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
{
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
g_value_set_double (&return_vals->values[1], size);
if (options)
g_object_get (options,
"brush-size", &size,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
return return_vals;
}
static GValueArray *
@@ -533,27 +534,28 @@ context_get_brush_aspect_ratio_invoker (GimpProcedure *procedure,
GError **error)
{
gboolean success = TRUE;
gdouble aspect;
GValueArray *return_vals;
gdouble aspect = 0.0;
aspect = g_value_get_double (&args->values[0]);
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-aspect-ratio", &aspect,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
{
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
g_value_set_double (&return_vals->values[1], aspect);
if (options)
g_object_get (options,
"brush-aspect-ratio", &aspect,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
return return_vals;
}
static GValueArray *
@@ -597,27 +599,28 @@ context_get_brush_angle_invoker (GimpProcedure *procedure,
GError **error)
{
gboolean success = TRUE;
gdouble angle;
GValueArray *return_vals;
gdouble angle = 0.0;
angle = g_value_get_double (&args->values[0]);
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
if (options)
g_object_get (options,
"brush-angle", &angle,
NULL);
else
success = FALSE;
return_vals = gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
if (success)
{
/* all options should have the same value, so pick a random one */
GimpPaintOptions *options =
gimp_pdb_context_get_paint_options (GIMP_PDB_CONTEXT (context),
"gimp-paintbrush");
g_value_set_double (&return_vals->values[1], angle);
if (options)
g_object_get (options,
"brush-angle", &angle,
NULL);
else
success = FALSE;
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
return return_vals;
}
static GValueArray *
@@ -2403,12 +2406,12 @@ register_context_procs (GimpPDB *pdb)
"Ed Swartz",
"2012",
NULL);
gimp_procedure_add_argument (procedure,
g_param_spec_double ("size",
"size",
"brush size in pixels",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("size",
"size",
"brush size in pixels",
0, G_MAXDOUBLE, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2466,12 +2469,12 @@ register_context_procs (GimpPDB *pdb)
"Ed Swartz",
"2012",
NULL);
gimp_procedure_add_argument (procedure,
g_param_spec_double ("aspect",
"aspect",
"aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("aspect",
"aspect",
"aspect ratio",
-20, 20, -20,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@@ -2512,12 +2515,12 @@ register_context_procs (GimpPDB *pdb)
"Ed Swartz",
"2012",
NULL);
gimp_procedure_add_argument (procedure,
g_param_spec_double ("angle",
"angle",
"angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("angle",
"angle",
"angle in degrees",
-180, 180, -180,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);

View File

@@ -53,6 +53,7 @@
#include "core/gimpprogress.h"
#include "core/gimpselection.h"
#include "core/gimpunit.h"
#include "file/file-utils.h"
#include "vectors/gimpvectors.h"
#include "gimppdb.h"
@@ -2286,7 +2287,11 @@ image_get_name_invoker (GimpProcedure *procedure,
if (success)
{
name = g_strdup (gimp_image_get_display_name (image));
/* XXX do we really want to return this, or the name as in the title? */
const gchar *uri = gimp_image_get_uri_or_untitled (image);
name = file_utils_uri_display_basename (uri);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
@@ -3664,7 +3669,7 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-image-insert-layer",
"Add the specified layer to the image.",
"This procedure adds the specified layer to the image at the given position. If the specified parent is a valid layer group (See 'gimp-item-is-group' and 'gimp-layer-group-new') then the layer is added inside the group. If the parent is 0, the layer is added inside the main stack, outside of any group. The position argument specifies the location of the layer inside the stack (or the group, if a valid parent was supplied), starting from the top (0) and increasing. If the position is specified as -1 and the parent is specified as 0, then the layer is inserted above the active layer. The layer type must be compatible with the image base type.",
"This procedure adds the specified layer to the image at the given position. If the specified parent is a valid layer group (See 'gimp-item-is-group' and 'gimp-layer-group-new') then the layer is added inside the group. If the parent is 0, the layer is added inside the main stack, outside of any group. The position argument specifies the location of the layer inside the stack (or the group, if a valid parent was supplied), starting from the top (0) and increasing. If the position is specified as -1 and the parent is specified as 0, then the layer is inserted above the active layer, or inside the group if the active layer is a layer group. The layer type must be compatible with the image base type.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",

View File

@@ -420,8 +420,6 @@ void
gimp_plug_in_close (GimpPlugIn *plug_in,
gboolean kill_it)
{
GList *list;
g_return_if_fail (GIMP_IS_PLUG_IN (plug_in));
g_return_if_fail (plug_in->open);
@@ -533,9 +531,9 @@ gimp_plug_in_close (GimpPlugIn *plug_in,
gimp_wire_clear_error ();
for (list = plug_in->temp_proc_frames; list; list = g_list_next (list))
while (plug_in->temp_proc_frames)
{
GimpPlugInProcFrame *proc_frame = list->data;
GimpPlugInProcFrame *proc_frame = plug_in->temp_proc_frames->data;
#ifdef GIMP_UNSTABLE
g_printerr ("plug-in '%s' aborted before sending its "
@@ -548,6 +546,12 @@ gimp_plug_in_close (GimpPlugIn *plug_in,
{
g_main_loop_quit (proc_frame->main_loop);
}
/* pop the frame here, because normally this only happens in
* gimp_plug_in_handle_temp_proc_return(), which can't
* be called after plug_in_close()
*/
gimp_plug_in_proc_frame_pop (plug_in);
}
if (plug_in->main_proc_frame.main_loop &&

View File

@@ -930,8 +930,6 @@ gimp_plug_in_procedure_set_mime_type (GimpPlugInProcedure *proc,
{
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
proc->file_proc = TRUE;
if (proc->mime_type)
g_free (proc->mime_type);
@@ -944,8 +942,6 @@ gimp_plug_in_procedure_set_thumb_loader (GimpPlugInProcedure *proc,
{
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
proc->file_proc = TRUE;
if (proc->thumb_loader)
g_free (proc->thumb_loader);

View File

@@ -23,7 +23,8 @@
(open-on-exit)
(aux-info
(left-docks-width "80")
(right-docks-position "200"))
(right-docks-position "200")
(maximized "no"))
(gimp-toolbox
(side left))
(gimp-dock

View File

@@ -23,7 +23,8 @@
(open-on-exit)
(aux-info
(left-docks-width "80")
(right-docks-position "200"))
(right-docks-position "200")
(maximized "no"))
(gimp-toolbox
(side left))
(gimp-dock

View File

@@ -219,7 +219,8 @@ saved_imported_file_uris (gconstpointer data)
proc,
GIMP_RUN_NONINTERACTIVE,
TRUE /*change_saved_state*/,
FALSE /*export*/,
FALSE /*export_backward*/,
FALSE /*export_forward*/,
NULL /*error*/);
/* Assert */
@@ -259,7 +260,8 @@ exported_file_uris (gconstpointer data)
proc,
GIMP_RUN_NONINTERACTIVE,
FALSE /*change_saved_state*/,
TRUE /*export*/,
FALSE /*export_backward*/,
TRUE /*export_forward*/,
NULL /*error*/);
g_assert (gimp_image_get_uri (image) == NULL);
@@ -323,7 +325,8 @@ clear_import_uri_after_export (gconstpointer data)
proc,
GIMP_RUN_NONINTERACTIVE,
FALSE /*change_saved_state*/,
TRUE /*export*/,
FALSE /*export_backward*/,
TRUE /*export_forward*/,
NULL /*error*/);
g_assert (gimp_image_get_uri (image) == NULL);

View File

@@ -43,6 +43,8 @@
#include "widgets/gimpdockwindow.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpsessioninfo.h"
#include "widgets/gimpsessioninfo-aux.h"
#include "widgets/gimpsessionmanaged.h"
#include "widgets/gimptoolbox.h"
#include "widgets/gimptooloptionseditor.h"
#include "widgets/gimpuimanager.h"
@@ -89,6 +91,8 @@ static GtkWidget * gimp_ui_find_window (GimpDialogFacto
static gboolean gimp_ui_not_toolbox_window (GObject *object);
static gboolean gimp_ui_multicolumn_not_toolbox_window (GObject *object);
static gboolean gimp_ui_is_gimp_layer_list (GObject *object);
static int gimp_ui_aux_data_eqiuvalent (gconstpointer _a,
gconstpointer _b);
static void gimp_ui_switch_window_mode (Gimp *gimp);
@@ -570,6 +574,55 @@ show_docks_in_single_window_mode (gconstpointer data)
gimp_ui_toggle_docks_in_single_window_mode (gimp);
}
static void
maximize_state_in_aux_data (gconstpointer data)
{
Gimp *gimp = GIMP (data);
GimpDisplay *display = GIMP_DISPLAY (gimp_get_display_iter (gimp)->data);
GimpDisplayShell *shell = gimp_display_get_shell (display);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
gint i;
for (i = 0; i < 2; i++)
{
GList *aux_info = NULL;
GimpSessionInfoAux *target_info;
gboolean target_max_state;
if (i == 0)
{
target_info = gimp_session_info_aux_new ("maximized" , "yes");
target_max_state = TRUE;
}
else
{
target_info = gimp_session_info_aux_new ("maximized", "no");
target_max_state = FALSE;
}
/* Set the aux info to out target data */
aux_info = g_list_append (aux_info, target_info);
gimp_session_managed_set_aux_info (GIMP_SESSION_MANAGED (window), aux_info);
g_list_free (aux_info);
/* Give the WM a chance to maximize/unmaximize us */
gimp_test_run_mainloop_until_idle ();
g_usleep (500 * 1000);
gimp_test_run_mainloop_until_idle ();
/* Make sure the maximize/unmaximize happened */
g_assert (gimp_image_window_is_maximized (window) == target_max_state);
/* Make sure we can read out the window state again */
aux_info = gimp_session_managed_get_aux_info (GIMP_SESSION_MANAGED (window));
g_assert (g_list_find_custom (aux_info, target_info, gimp_ui_aux_data_eqiuvalent));
g_list_free_full (aux_info,
(GDestroyNotify) gimp_session_info_aux_free);
gimp_session_info_aux_free (target_info);
}
}
static void
switch_back_to_multi_window_mode (gconstpointer data)
{
@@ -831,6 +884,14 @@ gimp_ui_is_gimp_layer_list (GObject *object)
return strcmp (entry->identifier, "gimp-layer-list") == 0;
}
static int
gimp_ui_aux_data_eqiuvalent (gconstpointer _a, gconstpointer _b)
{
GimpSessionInfoAux *a = (GimpSessionInfoAux*) _a;
GimpSessionInfoAux *b = (GimpSessionInfoAux*) _b;
return (strcmp (a->name, b->name) || strcmp (a->value, b->value));
}
static void
gimp_ui_switch_window_mode (Gimp *gimp)
{
@@ -875,6 +936,10 @@ int main(int argc, char **argv)
ADD_TEST (switch_to_single_window_mode);
ADD_TEST (hide_docks_in_single_window_mode);
ADD_TEST (show_docks_in_single_window_mode);
#warning FIXME: maximize_state_in_aux_data doesn't work without WM
#if 0
ADD_TEST (maximize_state_in_aux_data);
#endif
ADD_TEST (switch_back_to_multi_window_mode);
ADD_TEST (close_image);
ADD_TEST (repeatedly_switch_window_mode);

View File

@@ -312,7 +312,8 @@ gimp_write_and_read_file (Gimp *gimp,
proc,
GIMP_RUN_NONINTERACTIVE,
FALSE /*change_saved_state*/,
FALSE /*export*/,
FALSE /*export_backward*/,
FALSE /*export_forward*/,
NULL /*error*/);
/* Load from file */

View File

@@ -116,10 +116,8 @@ gimp_fonts_reset (Gimp *gimp)
if (gimp->no_fonts)
return;
/* We clear the default config here, so any subsequent fontconfig use will
* reinit the library with defaults. (Maybe we should call FcFini here too?)
*/
FcConfigSetCurrent (NULL);
/* Reinit the library with defaults. */
FcInitReinitialize ();
}
static gboolean

View File

@@ -75,13 +75,7 @@ gimp_text_vectors_new (GimpImage *image,
context.vectors = vectors;
/* A cairo_t needs an image surface to function, so "surface" is
* created temporarily for this purpose. Nothing is drawn to
* "surface", but it is still needed to be connected to "cr" for
* "cr" to execute cr_glyph_path(). The size of surface is
* therefore irrelevant.
*/
surface = cairo_image_surface_create (CAIRO_FORMAT_A8, 2, 2);
surface = cairo_recording_surface_create (CAIRO_CONTENT_ALPHA, NULL);
cr = cairo_create (surface);
gimp_image_get_resolution (image, &xres, &yres);

View File

@@ -184,7 +184,8 @@ gimp_cage_tool_init (GimpCageTool *self)
GIMP_DIRTY_IMAGE |
GIMP_DIRTY_IMAGE_STRUCTURE |
GIMP_DIRTY_DRAWABLE |
GIMP_DIRTY_SELECTION);
GIMP_DIRTY_SELECTION |
GIMP_DIRTY_ACTIVE_DRAWABLE);
gimp_tool_control_set_wants_click (tool->control, TRUE);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_PERSPECTIVE);
@@ -237,13 +238,13 @@ gimp_cage_tool_control (GimpTool *tool,
if (ct->image_map)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_abort (ct->image_map);
g_object_unref (ct->image_map);
ct->image_map = NULL;
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_image_flush (gimp_display_get_image (tool->display));
}
@@ -418,7 +419,7 @@ gimp_cage_tool_key_press (GimpTool *tool,
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
case GDK_KEY_ISO_Enter:
if (! ct->cage_complete)
if (ct->cage_complete == FALSE && gimp_cage_config_get_n_points (ct->config) > 2)
{
g_object_set (gimp_tool_get_options (tool),
"cage-mode", GIMP_CAGE_MODE_DEFORM,
@@ -426,13 +427,13 @@ gimp_cage_tool_key_press (GimpTool *tool,
}
else if (ct->tool_state == DEFORM_STATE_WAIT)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_commit (ct->image_map);
g_object_unref (ct->image_map);
ct->image_map = NULL;
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_image_flush (gimp_display_get_image (display));
@@ -565,7 +566,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
case CAGE_STATE_WAIT:
if (ct->cage_complete == FALSE)
{
if (handle == -1 && edge == -1)
if (handle == -1 && edge <= 0)
{
/* User clicked on the background, we add a new handle
* and move it
@@ -608,7 +609,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
ct->tool_state = CAGE_STATE_MOVE_HANDLE;
}
else if (edge >= 0)
else if (edge > 0)
{
/* User clicked on an edge, we add a new handle here and select it */

View File

@@ -313,7 +313,7 @@ gimp_curves_tool_key_press (GimpTool *tool,
{
GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
if (gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
if (c_tool->graph && gtk_widget_event (c_tool->graph, (GdkEvent *) kevent))
return TRUE;
return GIMP_TOOL_CLASS (parent_class)->key_press (tool, kevent, display);

View File

@@ -59,8 +59,9 @@
#include "gimpdrawtool.h"
#define DRAW_TIMEOUT 4
#define USE_TIMEOUT 1
#define DRAW_TIMEOUT 4
#define USE_TIMEOUT 1
#define MINIMUM_DRAW_INTERVAL 50000 /* 50000 microseconds == 20 fps */
static void gimp_draw_tool_dispose (GObject *object);
@@ -179,6 +180,12 @@ gimp_draw_tool_control (GimpTool *tool,
static gboolean
gimp_draw_tool_draw_timeout (GimpDrawTool *draw_tool)
{
guint64 now = g_get_monotonic_time ();
/* keep the timeout running if the last drawing just happened */
if ((now - draw_tool->last_draw_time) <= MINIMUM_DRAW_INTERVAL)
return FALSE;
draw_tool->draw_timeout = 0;
gimp_draw_tool_draw (draw_tool);
@@ -190,12 +197,21 @@ gimp_draw_tool_draw_timeout (GimpDrawTool *draw_tool)
static void
gimp_draw_tool_draw (GimpDrawTool *draw_tool)
{
guint64 now = g_get_monotonic_time ();
if (draw_tool->display &&
draw_tool->paused_count == 0 &&
! draw_tool->draw_timeout)
(! draw_tool->draw_timeout ||
(now - draw_tool->last_draw_time) > MINIMUM_DRAW_INTERVAL))
{
GimpDisplayShell *shell = gimp_display_get_shell (draw_tool->display);
if (draw_tool->draw_timeout)
{
g_source_remove (draw_tool->draw_timeout);
draw_tool->draw_timeout = 0;
}
gimp_draw_tool_undraw (draw_tool);
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
@@ -216,6 +232,8 @@ gimp_draw_tool_draw (GimpDrawTool *draw_tool)
if (draw_tool->item)
gimp_display_shell_add_tool_item (shell, draw_tool->item);
draw_tool->last_draw_time = now;
}
}
@@ -275,6 +293,8 @@ gimp_draw_tool_stop (GimpDrawTool *draw_tool)
draw_tool->draw_timeout = 0;
}
draw_tool->last_draw_time = 0;
draw_tool->display = NULL;
}
@@ -308,16 +328,29 @@ gimp_draw_tool_resume (GimpDrawTool *draw_tool)
draw_tool->paused_count--;
if (draw_tool->paused_count == 0)
{
#ifdef USE_TIMEOUT
if (draw_tool->paused_count == 0 && ! draw_tool->draw_timeout)
draw_tool->draw_timeout =
gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
DRAW_TIMEOUT,
(GSourceFunc) gimp_draw_tool_draw_timeout,
draw_tool, NULL);
#else
gimp_draw_tool_draw (draw_tool);
/* Don't install the timeout if the draw tool isn't active, so
* suspend()/resume() can always be called, and have no side
* effect on an inactive tool. See bug #687851.
*/
if (gimp_draw_tool_is_active (draw_tool) && ! draw_tool->draw_timeout)
{
draw_tool->draw_timeout =
gdk_threads_add_timeout_full (G_PRIORITY_HIGH_IDLE,
DRAW_TIMEOUT,
(GSourceFunc) gimp_draw_tool_draw_timeout,
draw_tool, NULL);
}
#endif
/* call draw() anyway, it will do nothing if the timeout is
* running, but will additionally check the drawing times to
* ensure the minimum framerate
*/
gimp_draw_tool_draw (draw_tool);
}
}
/**

View File

@@ -42,12 +42,13 @@ struct _GimpDrawTool
{
GimpTool parent_instance;
GimpDisplay *display; /* The display we are drawing to (may be
* a different one than tool->display)
*/
GimpDisplay *display; /* The display we are drawing to (may be
* a different one than tool->display)
*/
gint paused_count; /* count to keep track of multiple pauses */
guint draw_timeout; /* draw delay timeout ID */
gint paused_count; /* count to keep track of multiple pauses */
guint draw_timeout; /* draw delay timeout ID */
guint64 last_draw_time; /* time of last draw(), monotonically */
GimpCanvasItem *preview;
GimpCanvasItem *item;

View File

@@ -183,7 +183,9 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
gimp_tool_control_set_scroll_lock (tool->control, FALSE);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_dirty_mask (tool->control, GIMP_DIRTY_IMAGE_SIZE);
gimp_tool_control_set_dirty_mask (tool->control,
GIMP_DIRTY_IMAGE_SIZE |
GIMP_DIRTY_ACTIVE_DRAWABLE);
gimp_tool_control_set_precision (tool->control,
GIMP_CURSOR_PRECISION_PIXEL_CENTER);
gimp_tool_control_set_tool_cursor (tool->control,

View File

@@ -1385,8 +1385,8 @@ gimp_free_select_tool_modifier_key (GimpTool *tool,
{
gimp_draw_tool_pause (draw_tool);
priv->constrain_angle = state & (gimp_get_constrain_behavior_mask () ?
TRUE : FALSE);
priv->constrain_angle = ((state & gimp_get_constrain_behavior_mask ()) ?
TRUE : FALSE);
priv->supress_handles = state & GDK_SHIFT_MASK ? TRUE : FALSE;
@@ -1415,8 +1415,8 @@ gimp_free_select_tool_active_modifier_key (GimpTool *tool,
gimp_draw_tool_pause (draw_tool);
priv->constrain_angle = state & (gimp_get_constrain_behavior_mask () ?
TRUE : FALSE);
priv->constrain_angle = ((state & gimp_get_constrain_behavior_mask ()) ?
TRUE : FALSE);
/* If we didn't came here due to a mouse release, immediately update
* the position of the thing we move.

View File

@@ -201,7 +201,8 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
GIMP_DIRTY_IMAGE |
GIMP_DIRTY_IMAGE_STRUCTURE |
GIMP_DIRTY_DRAWABLE |
GIMP_DIRTY_SELECTION);
GIMP_DIRTY_SELECTION |
GIMP_DIRTY_ACTIVE_DRAWABLE);
image_map_tool->drawable = NULL;
image_map_tool->operation = NULL;
@@ -419,15 +420,29 @@ gimp_image_map_tool_control (GimpTool *tool,
if (image_map_tool->image_map)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
GimpImage *image;
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_abort (image_map_tool->image_map);
g_object_unref (image_map_tool->image_map);
image_map_tool->image_map = NULL;
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_image_flush (gimp_display_get_image (tool->display));
/* don't call gimp_image_flush() here, because the tool
* might be cancelled from some other place opening an undo
* group, so flushing the image would update menus and
* whatnot while that other operation is running, with
* unforeseeable side effects. Also, flusing the image here
* is not needed because we didn't change anything in the
* image. Instead, make sure manually that the display is
* updated correctly after restoring GimpImageMapTool's
* temporary editing.
*/
image = gimp_display_get_image (tool->display);
gimp_projection_flush_now (gimp_image_get_projection (image));
gimp_display_flush_now (tool->display);
}
tool->drawable = NULL;
@@ -487,19 +502,19 @@ gimp_image_map_tool_options_notify (GimpTool *tool,
if (im_options->preview)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_tool_map (image_map_tool);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
else
{
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_clear (image_map_tool->image_map);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_image_map_tool_flush (image_map_tool->image_map,
image_map_tool);
@@ -653,7 +668,7 @@ gimp_image_map_tool_response (GtkWidget *widget,
{
GimpImageMapOptions *options = GIMP_IMAGE_MAP_TOOL_GET_OPTIONS (tool);
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
if (! options->preview)
gimp_image_map_tool_map (image_map_tool);
@@ -662,7 +677,7 @@ gimp_image_map_tool_response (GtkWidget *widget,
g_object_unref (image_map_tool->image_map);
image_map_tool->image_map = NULL;
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_image_flush (gimp_display_get_image (tool->display));
@@ -726,11 +741,11 @@ gimp_image_map_tool_preview (GimpImageMapTool *image_map_tool)
if (image_map_tool->image_map && options->preview)
{
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_map_tool_map (image_map_tool);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
}
@@ -741,11 +756,11 @@ gimp_image_map_tool_gegl_notify (GObject *config,
{
if (im_tool->image_map)
{
gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, TRUE);
gimp_tool_control_push_preserve (GIMP_TOOL (im_tool)->control, TRUE);
gimp_image_map_tool_create_map (im_tool);
gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, FALSE);
gimp_tool_control_pop_preserve (GIMP_TOOL (im_tool)->control);
gimp_image_map_tool_preview (im_tool);
}

View File

@@ -328,7 +328,9 @@ gimp_iscissors_tool_init (GimpIscissorsTool *iscissors)
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_snap_to (tool->control, FALSE);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_dirty_mask (tool->control, GIMP_DIRTY_IMAGE_SIZE);
gimp_tool_control_set_dirty_mask (tool->control,
GIMP_DIRTY_IMAGE_SIZE |
GIMP_DIRTY_ACTIVE_DRAWABLE);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_ISCISSORS);
iscissors->op = ISCISSORS_OP_NONE;

View File

@@ -132,7 +132,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
scale = gimp_prop_spin_scale_new (config, "brush-size",
_("Size"),
0.01, 1.0, 2);
1.0, 10.0, 2);
gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), 1.0, 1000.0);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
@@ -157,7 +157,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
scale = gimp_prop_spin_scale_new (config, "brush-aspect-ratio",
_("Aspect Ratio"),
0.01, 0.1, 2);
0.1, 1.0, 2);
gtk_box_pack_start (GTK_BOX (hbox), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);

View File

@@ -229,6 +229,7 @@ gimp_rectangle_select_tool_init (GimpRectangleSelectTool *rect_sel_tool)
GIMP_CURSOR_PRECISION_PIXEL_BORDER);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_TOOL_CURSOR_RECT_SELECT);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_dirty_mask (tool->control,
GIMP_DIRTY_IMAGE_SIZE |
GIMP_DIRTY_SELECTION);
@@ -421,11 +422,11 @@ gimp_rectangle_select_tool_button_press (GimpTool *tool,
if (undo && priv->undo == undo)
{
/* prevent this change from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_undo (image);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
/* we will need to redo if the user cancels or executes */
priv->redo = gimp_undo_stack_peek (redo_stack);
@@ -477,12 +478,12 @@ gimp_rectangle_select_tool_button_release (GimpTool *tool,
if (redo && priv->redo == redo)
{
/* prevent this from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_redo (image);
priv->redo = NULL;
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
}
@@ -494,11 +495,11 @@ gimp_rectangle_select_tool_button_release (GimpTool *tool,
if (priv->redo)
{
/* prevent this from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_redo (image);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
priv->use_saved_op = TRUE; /* is this correct? */
@@ -784,7 +785,7 @@ gimp_rectangle_select_tool_execute (GimpRectangleTool *rectangle,
GimpChannelOps operation;
/* prevent this change from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
/* We can conceptually think of a click outside of the
* selection as adding a 0px selection. Behave intuitivly
@@ -806,7 +807,7 @@ gimp_rectangle_select_tool_execute (GimpRectangleTool *rectangle,
break;
}
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
}
@@ -843,12 +844,12 @@ gimp_rectangle_select_tool_cancel (GimpRectangleTool *rectangle)
if (undo && priv->undo == undo)
{
/* prevent this change from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
gimp_image_undo (image);
gimp_image_flush (image);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
}
}
@@ -870,7 +871,7 @@ gimp_rectangle_select_tool_rectangle_change_complete (GimpRectangleTool *rectang
priv = GIMP_RECTANGLE_SELECT_TOOL_GET_PRIVATE (rect_sel_tool);
/* prevent change in selection from halting the tool */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
if (tool->display && ! gimp_tool_control_is_active (tool->control))
{
@@ -919,7 +920,7 @@ gimp_rectangle_select_tool_rectangle_change_complete (GimpRectangleTool *rectang
gimp_image_flush (image);
}
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_rectangle_select_tool_update_option_defaults (rect_sel_tool, FALSE);

View File

@@ -133,8 +133,13 @@ gimp_selection_tool_modifier_key (GimpTool *tool,
*/
button_op = selection_tool->saved_operation;
}
else
else if (state & (extend_mask |
modify_mask))
{
/* else get the operation from the modifier state, but only
* if there is actually a modifier pressed, so we don't
* override the "last modifier released" assignment above
*/
button_op = gimp_modifiers_to_channel_op (state);
}
@@ -411,15 +416,36 @@ gimp_selection_tool_start_edit (GimpSelectionTool *sel_tool,
return TRUE;
case SELECTION_MOVE:
gimp_edit_selection_tool_start (tool, display, coords,
GIMP_TRANSLATE_MODE_MASK_TO_LAYER, FALSE);
return TRUE;
case SELECTION_MOVE_COPY:
gimp_edit_selection_tool_start (tool, display, coords,
GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER,
FALSE);
return TRUE;
{
GimpImage *image = gimp_display_get_image (display);
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
{
gimp_tool_message_literal (tool, display,
_("Cannot modify the pixels of layer groups."));
}
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable)))
{
gimp_tool_message_literal (tool, display,
_("The active layer's pixels are locked."));
}
else
{
GimpTranslateMode edit_mode;
if (sel_tool->function == SELECTION_MOVE)
edit_mode = GIMP_TRANSLATE_MODE_MASK_TO_LAYER;
else
edit_mode = GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER;
gimp_edit_selection_tool_start (tool, display, coords,
edit_mode, FALSE);
}
return TRUE;
}
default:
break;

View File

@@ -415,18 +415,38 @@ gboolean
gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
GdkEventKey *kevent)
{
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter cursor;
GtkTextIter selection;
gint x_pos = -1;
gboolean retval = TRUE;
GimpTool *tool = GIMP_TOOL (text_tool);
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter cursor;
GtkTextIter selection;
gboolean retval = TRUE;
if (! gtk_widget_has_focus (shell->canvas))
{
/* The focus is in the floating style editor, and the event
* was not handled there, focus the canvas.
*/
switch (kevent->keyval)
{
case GDK_KEY_Tab:
case GDK_KEY_KP_Tab:
case GDK_KEY_ISO_Left_Tab:
case GDK_KEY_Escape:
gtk_widget_grab_focus (shell->canvas);
return TRUE;
default:
break;
}
}
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
return TRUE;
return TRUE;
}
gimp_text_tool_ensure_proxy (text_tool);
@@ -470,7 +490,7 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
retval = FALSE;
}
text_tool->x_pos = x_pos;
text_tool->x_pos = -1;
return retval;
}
@@ -698,23 +718,31 @@ gimp_text_tool_move_cursor (GimpTextTool *text_tool,
if (count > 0)
{
if (g_utf8_get_char (text + index) == word_joiner)
pango_layout_move_cursor_visually (layout, TRUE, index, 0, 1,
pango_layout_move_cursor_visually (layout, TRUE,
index, 0, 1,
&new_index, &trailing);
else
new_index = index;
pango_layout_move_cursor_visually (layout, TRUE, new_index, trailing, 1,
pango_layout_move_cursor_visually (layout, TRUE,
new_index, trailing, 1,
&new_index, &trailing);
count--;
}
else
{
pango_layout_move_cursor_visually (layout, TRUE, index, 0, -1,
pango_layout_move_cursor_visually (layout, TRUE,
index, 0, -1,
&new_index, &trailing);
if (new_index != -1 && g_utf8_get_char (text + new_index) == word_joiner)
pango_layout_move_cursor_visually (layout, TRUE, new_index, trailing, -1,
&new_index, &trailing);
if (new_index != -1 && new_index != G_MAXINT &&
g_utf8_get_char (text + new_index) == word_joiner)
{
pango_layout_move_cursor_visually (layout, TRUE,
new_index, trailing, -1,
&new_index, &trailing);
}
count++;
}
@@ -1127,8 +1155,7 @@ gimp_text_tool_options_notify (GimpTextOptions *options,
{
if (options->use_editor)
{
if (text_tool->text)
gimp_text_tool_editor_dialog (text_tool);
gimp_text_tool_editor_dialog (text_tool);
}
else
{

View File

@@ -259,6 +259,7 @@ gimp_text_tool_init (GimpTextTool *text_tool)
gimp_text_tool_editor_init (text_tool);
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_handle_empty_image (tool->control, TRUE);
gimp_tool_control_set_wants_click (tool->control, TRUE);
gimp_tool_control_set_wants_double_click (tool->control, TRUE);
gimp_tool_control_set_wants_triple_click (tool->control, TRUE);
@@ -1167,11 +1168,10 @@ gimp_text_tool_text_notify (GimpText *text,
g_signal_handlers_block_by_func (text_tool->buffer,
gimp_text_tool_buffer_end_edit,
text_tool);
if (pspec->name[0] == 't')
gimp_text_buffer_set_text (text_tool->buffer, text->text);
else
if (text->markup)
gimp_text_buffer_set_markup (text_tool->buffer, text->markup);
else
gimp_text_buffer_set_text (text_tool->buffer, text->text);
g_signal_handlers_unblock_by_func (text_tool->buffer,
gimp_text_tool_buffer_end_edit,

View File

@@ -90,6 +90,8 @@ gimp_tool_control_finalize (GObject *object)
{
GimpToolControl *control = GIMP_TOOL_CONTROL (object);
g_slist_free (control->preserve_stack);
g_free (control->action_value_1);
g_free (control->action_value_2);
g_free (control->action_value_3);
@@ -171,6 +173,31 @@ gimp_tool_control_get_preserve (GimpToolControl *control)
return control->preserve;
}
void
gimp_tool_control_push_preserve (GimpToolControl *control,
gboolean preserve)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->preserve_stack =
g_slist_prepend (control->preserve_stack,
GINT_TO_POINTER (control->preserve));
control->preserve = preserve ? TRUE : FALSE;
}
void
gimp_tool_control_pop_preserve (GimpToolControl *control)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
g_return_if_fail (control->preserve_stack != NULL);
control->preserve = GPOINTER_TO_INT (control->preserve_stack->data);
control->preserve_stack = g_slist_delete_link (control->preserve_stack,
control->preserve_stack);
}
void
gimp_tool_control_set_scroll_lock (GimpToolControl *control,
gboolean scroll_lock)

View File

@@ -42,6 +42,8 @@ struct _GimpToolControl
gboolean preserve; /* Preserve this tool across *
* drawable changes */
GSList *preserve_stack; /* for push/pop preserve */
gboolean scroll_lock; /* allow scrolling or not */
gboolean handle_empty_image; /* invoke the tool on images *
* without active drawable */
@@ -100,6 +102,10 @@ void gimp_tool_control_set_preserve (GimpToolControl *control,
gboolean preserve);
gboolean gimp_tool_control_get_preserve (GimpToolControl *control);
void gimp_tool_control_push_preserve (GimpToolControl *control,
gboolean preserve);
void gimp_tool_control_pop_preserve (GimpToolControl *control);
void gimp_tool_control_set_scroll_lock (GimpToolControl *control,
gboolean scroll_lock);
gboolean gimp_tool_control_get_scroll_lock (GimpToolControl *control);

View File

@@ -201,7 +201,8 @@ gimp_transform_tool_init (GimpTransformTool *tr_tool)
gimp_tool_control_set_dirty_mask (tool->control,
GIMP_DIRTY_IMAGE_SIZE |
GIMP_DIRTY_DRAWABLE |
GIMP_DIRTY_SELECTION);
GIMP_DIRTY_SELECTION |
GIMP_DIRTY_ACTIVE_DRAWABLE);
gimp_tool_control_set_precision (tool->control,
GIMP_CURSOR_PRECISION_SUBPIXEL);
@@ -1103,7 +1104,7 @@ gimp_transform_tool_transform (GimpTransformTool *tr_tool,
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tr_tool));
/* We're going to dirty this image, but we want to keep the tool around */
gimp_tool_control_set_preserve (tool->control, TRUE);
gimp_tool_control_push_preserve (tool->control, TRUE);
undo_desc = GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->get_undo_desc (tr_tool);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, undo_desc);
@@ -1190,7 +1191,7 @@ gimp_transform_tool_transform (GimpTransformTool *tr_tool,
/* We're done dirtying the image, and would like to be restarted if
* the image gets dirty while the tool exists
*/
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_pop_preserve (tool->control);
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);

View File

@@ -23,6 +23,7 @@
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
@@ -760,7 +761,17 @@ gimp_action_view_accel_edited (GtkCellRendererAccel *accel,
if (! accel_path)
return;
if (! accel_key)
if (! accel_key ||
/* Don't allow arrow keys, they are all swallowed by the canvas
* and cannot be invoked anyway, the same applies to space.
*/
accel_key == GDK_KEY_Left ||
accel_key == GDK_KEY_Right ||
accel_key == GDK_KEY_Up ||
accel_key == GDK_KEY_Down ||
accel_key == GDK_KEY_space ||
accel_key == GDK_KEY_KP_Space)
{
gimp_message_literal (view->manager->gimp,
G_OBJECT (view), GIMP_MESSAGE_ERROR,

View File

@@ -514,7 +514,8 @@ gimp_clipboard_set_buffer (Gimp *gimp,
G_OBJECT (gimp));
/* mark the first entry (image/png) as suitable for storing */
gtk_clipboard_set_can_store (clipboard, gimp_clip->target_entries, 1);
if (gimp_clip->n_target_entries > 0)
gtk_clipboard_set_can_store (clipboard, gimp_clip->target_entries, 1);
}
else if (gtk_clipboard_get_owner (clipboard) == G_OBJECT (gimp))
{

View File

@@ -334,6 +334,13 @@ gimp_color_display_editor_dispose (GObject *object)
{
GimpColorDisplayEditor *editor = GIMP_COLOR_DISPLAY_EDITOR (object);
if (editor->selected)
{
g_object_remove_weak_pointer (G_OBJECT (editor->selected),
(gpointer) &editor->selected);
editor->selected = NULL;
}
if (editor->stack)
{
g_object_unref (editor->stack);

View File

@@ -477,6 +477,10 @@ gimp_container_popup_show (GimpContainerPopup *popup,
if (y + requisition.height > rect.y + rect.height)
y = orig_y - requisition.height;
gtk_window_set_screen (GTK_WINDOW (popup), screen);
gtk_window_set_transient_for (GTK_WINDOW (popup),
GTK_WINDOW (gtk_widget_get_toplevel (widget)));
gtk_window_move (GTK_WINDOW (popup), x, y);
gtk_widget_show (GTK_WIDGET (popup));
}

View File

@@ -142,6 +142,31 @@ gimp_container_tree_view_drop_status (GimpContainerTreeView *tree_view,
drop_pos = GTK_TREE_VIEW_DROP_BEFORE;
}
}
else
{
GtkTreeIter iter;
gint n_children;
n_children = gtk_tree_model_iter_n_children (tree_view->model, NULL);
if (n_children > 0 &&
gtk_tree_model_iter_nth_child (tree_view->model, &iter,
NULL, n_children - 1))
{
GimpViewRenderer *renderer;
gtk_tree_model_get (tree_view->model, &iter,
GIMP_CONTAINER_TREE_STORE_COLUMN_RENDERER,
&renderer,
-1);
drop_path = gtk_tree_model_get_path (tree_view->model, &iter);
dest_viewable = renderer->viewable;
drop_pos = GTK_TREE_VIEW_DROP_AFTER;
g_object_unref (renderer);
}
}
if (dest_viewable || tree_view->priv->dnd_drop_to_empty)
{

View File

@@ -522,6 +522,8 @@ gimp_container_tree_view_set_container (GimpContainerView *view,
if (old_container)
{
tree_view->priv->dnd_renderer = NULL;
g_signal_handlers_disconnect_by_func (tree_view->view,
gimp_container_tree_view_row_expanded,
tree_view);

View File

@@ -111,7 +111,7 @@ gimp_device_info_get_device_coords (GimpDeviceInfo *info,
GdkWindow *window,
GimpCoords *coords)
{
gdouble axes[GDK_AXIS_LAST];
gdouble axes[GDK_AXIS_LAST] = { 0, };
*coords = default_coords;

View File

@@ -34,6 +34,7 @@
#include "core/gimpcurve-map.h"
#include "core/gimpdatafactory.h"
#include "core/gimpmarshal.h"
#include "core/gimptoolinfo.h"
#include "gimpdeviceinfo.h"
@@ -630,6 +631,26 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
gimp_device_info_changed (info);
}
void
gimp_device_info_set_default_tool (GimpDeviceInfo *info)
{
g_return_if_fail (GIMP_IS_DEVICE_INFO (info));
if (info->device &&
gdk_device_get_source (info->device) == GDK_SOURCE_ERASER)
{
GimpContainer *tools = GIMP_CONTEXT (info)->gimp->tool_info_list;
GimpToolInfo *eraser;
eraser =
GIMP_TOOL_INFO (gimp_container_get_child_by_name (tools,
"gimp-eraser-tool"));
if (eraser)
gimp_context_set_tool (GIMP_CONTEXT (info), eraser);
}
}
GdkInputMode
gimp_device_info_get_mode (GimpDeviceInfo *info)
{

View File

@@ -85,6 +85,8 @@ void gimp_device_info_set_device (GimpDeviceInfo *info,
GdkDevice *device,
GdkDisplay *display);
void gimp_device_info_set_default_tool (GimpDeviceInfo *info);
GdkInputMode gimp_device_info_get_mode (GimpDeviceInfo *info);
void gimp_device_info_set_mode (GimpDeviceInfo *info,
GdkInputMode mode);

View File

@@ -140,6 +140,7 @@ static const gchar *const axis_use_strings[] =
N_("Pressure"),
N_("X tilt"),
N_("Y tilt"),
/* Wheel as in mouse or input device wheel */
N_("Wheel")
};
@@ -190,6 +191,7 @@ gimp_device_info_editor_init (GimpDeviceInfoEditor *editor)
/* the axes */
/* The axes of an input device */
frame = gimp_frame_new (_("Axes"));
gtk_box_pack_start (GTK_BOX (private->vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@@ -409,6 +411,7 @@ gimp_device_info_editor_constructed (GObject *object)
GimpCurve *curve;
gchar *title;
/* e.g. "Pressure Curve" for mapping input device axes */
title = g_strdup_printf (_("%s Curve"), axis_use_strings[i - 1]);
frame = gimp_frame_new (title);

View File

@@ -329,6 +329,8 @@ gimp_device_manager_device_added (GdkDisplay *gdk_display,
{
device_info = gimp_device_info_new (private->gimp, device, gdk_display);
gimp_device_info_set_default_tool (device_info);
gimp_container_add (GIMP_CONTAINER (manager), GIMP_OBJECT (device_info));
g_object_unref (device_info);
}

View File

@@ -118,6 +118,8 @@ gimp_devices_restore (Gimp *gimp)
gimp_context_copy_properties (user_context, GIMP_CONTEXT (device_info),
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_device_info_set_default_tool (device_info);
}
filename = gimp_personal_rc_file ("devicerc");

View File

@@ -657,7 +657,14 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
}
if (present && GTK_IS_WINDOW (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
{
/* Work around focus-stealing protection, or whatever makes the
* dock appear below the one where we clicked a button to open
* it. See bug #630173.
*/
gtk_widget_show_now (toplevel);
gdk_window_raise (gtk_widget_get_window (toplevel));
}
return dialog;
}

View File

@@ -164,7 +164,8 @@ gimp_dnd_xds_save_image (GdkDragContext *context,
{
if (file_save (image->gimp,
image, NULL,
uri, proc, GIMP_RUN_INTERACTIVE, TRUE, export,
uri, proc, GIMP_RUN_INTERACTIVE,
! export, FALSE, export,
&error) == GIMP_PDB_SUCCESS)
{
gtk_selection_data_set (selection,

View File

@@ -652,6 +652,7 @@ gimp_editor_add_action_button (GimpEditor *editor,
stock_id = gtk_action_get_stock_id (action);
tooltip = g_strdup (gtk_action_get_tooltip (action));
help_id = g_object_get_qdata (G_OBJECT (action), GIMP_HELP_ID);
old_child = gtk_bin_get_child (GTK_BIN (button));
@@ -719,8 +720,6 @@ gimp_editor_add_action_button (GimpEditor *editor,
NULL);
}
help_id = g_object_get_qdata (G_OBJECT (action), GIMP_HELP_ID);
if (tooltip || help_id)
gimp_help_set_help_data_with_markup (button, tooltip, help_id);

View File

@@ -167,6 +167,10 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
gimp_message_box_set_primary_text (GIMP_MESSAGE_BOX (box), "%s", domain);
else
gimp_message_box_set_primary_text (GIMP_MESSAGE_BOX (box),
/* %s is a message domain,
* like "GIMP Message" or
* "PNG Message"
*/
_("%s Message"), domain);
gimp_message_box_set_text (GIMP_MESSAGE_BOX (box), "%s", message);

Some files were not shown because too many files have changed in this diff Show More