Commit Graph

26209 Commits

Author SHA1 Message Date
Martin Nordholts 8bfcd14f9a app: Add GimpSessionInfo getters and setters 2009-09-20 14:51:03 +02:00
Martin Nordholts 7cac9dff67 app: gimp_session_info_set/get_geometry -> apply/read_geometry()
Rename gimp_session_info_set_geometry() to
gimp_session_info_apply_geometry() and gimp_session_info_get_geometry
to gimp_session_info_read_geometry(). The old functions were not
getters and setters and thus the names were misleading.
2009-09-20 13:17:27 +02:00
Martin Nordholts 4ab58d2e77 app: Have only one GimpDialogFactoryEntry member in GimpSessionInfo
Simplify the code a bit by replacing the 'toplevel_entry' and
'dockable_entry' members in GimpSessionInfo with a single
'factory_entry'. We compensate for this by adding a 'dockable'
gboolean to GimpDialogFactoryEntry.
2009-09-20 12:24:41 +02:00
Martin Nordholts 44d5728d7b app: Add and use factory entry related getters for GimpSessionInfo
Add GimpSessionInfo getters for a bunch of dialog factory entry
fields. This moves much of the GimpDock special casing to a common
place and also reduces direct access to session info fields.
2009-09-20 11:43:41 +02:00
Martin Nordholts 8d86735f20 app: Increase scope of 'info' in gimp_dialog_factory_add_dialog()
Increase scope of 'info' in gimp_dialog_factory_add_dialog() so we can
use it at the end of the function.
2009-09-20 11:33:22 +02:00
Martin Nordholts 6460385553 app: Add docs to GimpSessionInfo related classes 2009-09-20 10:26:32 +02:00
Martin Nordholts 09b04c62c9 app: Introduce and use gimp_dialog_factory_dialog_sane()
Collect common error checking in a new helper function
gimp_dialog_factory_dialog_sane().
2009-09-20 10:25:13 +02:00
Martin Nordholts c8853243ea app: Clarify session_init() a bit
Clarify session_init() by adding comments and using
gimp_config_deserialize() and g_str_equal() in sessionrc parsing.
2009-09-19 18:37:17 +02:00
Martin Nordholts a0923b62ee libgimpconfig: Add gimp_config_serialize() and _deserialize() 2009-09-19 18:00:03 +02:00
Martin Nordholts 93d8b91d49 app: Also allow GIMP_DEBUG as debug environment variable
Also allow GIMP_DEBUG as debug environment variable since that is what
you would guess the name is if you used e.g. the GDK_DEBUG environment
variable before.
2009-09-19 16:03:43 +02:00
Michael Natterer 82c48eeb9e Indentation fix 2009-09-19 15:09:56 +02:00
Michael Natterer b77cbdf3a1 More tool event log output and some minor whitespace cleanup 2009-09-19 15:09:55 +02:00
Martin Nordholts fca590925b app/tests: Add dockrc to session regression testing
Add dockrc to session regression testing and do some general cleanups
and generalizations in the test.
2009-09-19 13:04:18 +02:00
Khaled Hosny d9f89832c7 Updated Arabic translation 2009-09-19 03:24:07 +02:00
Martin Nordholts 6e0befa6ba app: Add regression testing for sessionrc/docks
Add a regression test for sessionrc parsing, handing and writing. The
test work in the following way: GIMP starts so that sessionrc is
deserialized and stored internally, the UI is shown, and then the
internal data structure about windows is serialized to a new
sessionrc. The test makes sure that a new sessionrc actually has been
created, and then that the content of the new file is identical to the
old one.
2009-09-17 01:56:17 +02:00
Martin Nordholts dc51d81671 app: Don't use the gimpdir for WM tests
The WM tests mess up the GIMP dir, in particular any sessionrc if it
exists, due to the interface never being shown. Make the WM test use a
tmp dir to avoid that.
2009-09-17 01:51:54 +02:00
Martin Nordholts 05eb29b766 app: Don't blindly increment last-tip-shown
Don't blindly increment last-tip-shown so that the sessionrc is not
modified between each GIMP run. The change is to make it easier to
write regression tests for sessionrc. Eventually we might want some
proper fix.
2009-09-17 01:51:54 +02:00
Martin Nordholts 1923280e57 app: Add gimp_test_run_temp_mainloop()
Add gimp_test_run_temp_mainloop() which is a helper function for tests
that wants to run a main loop for a while. Useful when you want GIMP's
state to settle before doing tests.
2009-09-17 01:51:53 +02:00
Martin Nordholts 0601229f9f app: Add show_gui parameter to gimp_init_for_gui_testing()
Add show_gui parameter to gimp_init_for_gui_testing() so that we can
have tests that shows the the actual GIMP interface.
2009-09-17 01:51:53 +02:00
Martin Nordholts c847b56d0e app: Add GIMPDIR for tests
Add GIMPDIR for tests, both to get rid of warning about missing
tags.xml and for future usage.
2009-09-17 01:51:53 +02:00
Martin Nordholts fb549cdabf app: Call gimp_exit() in tests to avoid warnings about broken pipes 2009-09-17 01:51:53 +02:00
Julien Hardelin 9bf17abd75 Updated French translation 2009-09-16 23:25:43 +02:00
Michael Natterer ab6406faa8 gui_sanity_check(): bump GTK+ version here too 2009-09-16 22:08:36 +02:00
Michael Natterer 699b112940 Require GTK+ >= 2.16.6
That version contains a GtkTreeView fix essential to group layers.
2009-09-16 22:04:17 +02:00
Michael Natterer ff3ca8eee3 Don't lose the active item when reordering between containers of a tree
Implement GimpContainerView::insert_item_after() and select the newly
inserted item if it is the active item in the image.
2009-09-16 20:00:48 +02:00
Michael Natterer ebe72148dd Add new vfunc GimpContainerView::insert_item_after()
The new function is called after the item is inserted. This is a much
smaller change than turning all vfuncs into signals just to be able
connect_after to one of them.
2009-09-16 19:53:13 +02:00
Sven Neumann 6700caafb2 Fix error handling in gimp-file-save PDB invoker 2009-09-15 23:01:29 +02:00
Michael Natterer 8734c71150 Build "tests" after "." 2009-09-15 21:05:08 +02:00
Claude Paroz 276d8aa599 Updated French translation
Contributed by Julien Hardelin and Claude Paroz
2009-09-15 14:00:52 +02:00
Martin Nordholts e87ed66ba7 app: Don't cast GimpDock to GimpDockWindow
In preparation for making GimpDock inherit from a non-window, stop
casting GimpDocks to GimpDockWindows. Instead look up the toplevel
widget for a dock and get the dock window that way.
2009-09-15 07:58:14 +02:00
Martin Nordholts 17f0b1aa1e app: Add and use windows_menu_dock_to_merge_id() 2009-09-15 07:17:00 +02:00
Martin Nordholts 8ffda9d20f app: Add and use windows_actions_dock_to_action_name() 2009-09-14 23:36:22 +02:00
Martin Nordholts 531c3d6253 app: Update default export filename precedences
Update export filename priorities according to changes in spec. Also
consistently use GIMP_FILE_EXPORT_URI_KEY instead of
GIMP_FILE_EXPORT_TO_URI_KEY. They have the same value.
2009-09-14 23:36:22 +02:00
Michael Natterer 5df0aa7b41 Bug 594983 - Build fails with "--enable-gtk-doc-app"
Tons of doc updates, it's almost up-to-date now. Also fixes the build.
2009-09-14 21:41:09 +02:00
Michael Natterer 61e76b4bff Random doc fixes 2009-09-14 21:40:09 +02:00
Michael Natterer 2c43da09e0 Random doc fixes 2009-09-14 21:39:46 +02:00
Michael Natterer be23b17a17 Add missing boilerplate macro 2009-09-14 21:39:19 +02:00
Michael Natterer b5b8aff42d Make class and instance structs public
There is no need to keep these specific structs hidden and
gtk-doc likes it better that way.
2009-09-14 21:38:30 +02:00
Michael Natterer 17f345fa1a Add missing boilterplate macro 2009-09-14 21:37:53 +02:00
Michael Natterer 892363605c Random doc fix 2009-09-14 21:36:50 +02:00
Claude Paroz 1cf5bfd9c0 Updated French translation
Contributed by Julien Hardelin and Claude Paroz
2009-09-13 23:05:05 +02:00
Michael Natterer fd224caa10 Make sure don't lose the selected item when the tree get collapsed
Collapsing the tree gets rid of any selection in the collapsed branch,
and doesn't restore it upon exapnding. So connect to the
GtkTreeView::row-expanded signal and select the active item manually.

Had to add evil hack that makes sure we don't try this on child items
that are currently being inserted, because our parent class has no
choice but to expand the tree while the item is not completely
inserted in all subclasses yet.
2009-09-13 22:39:01 +02:00
Michael Natterer 717b4e6a07 Fix undoing a group layer type conversion
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
  GimpDrawable::convert_type().

* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
  conversion functions.

* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
  because it can be called on unattached items only.

* app/core/gimpimage-convert.c: pass TRUE.

* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
  which simply calls gimp_drawable_convert_type() with the old type
  when undone/redone.

* app/core/gimpgrouplayer.c: push a group layer convert undo so this
  can be properly undone/redone.
2009-09-13 19:24:19 +02:00
Martin Nordholts 2ac7cedbfc app: Make GimpDockbook instance data private
Make GimpDockbook instance data private and add necessary getters and
setters.
2009-09-13 16:30:09 +02:00
Martin Nordholts 67128d6034 app: Add GimpDock::set_host_geometry_hints()
In order to allow the toolbox dock to set geometry hints on the
GtkWindow it is in, introduce host geometry hint setting through a new
virtual function GimpDock::set_host_geometry_hints() and a new
"geometry-invalidated" signal.

Docks that needs to setup geometry hints on the window they are in
call gimp_dock_invalidate_geometry(). The GimpDockWindow will listen
to this and give the dock a chance to set geometry hints (or any setup
really) on the GimpDockWindow.
2009-09-13 14:14:08 +02:00
Martin Nordholts a23a220d60 app: Add and use GimpDockWindow window title infrastructure
Add a "title-invalidated" signal to GimpDock and a virtual function
GimpDock::get_title(). When GimpDocks have a state change that their
title depends on they call gimp_dock_invalidate_title(). The
GimpDockWindow listens to this signal and update its window title
using GimpDock::get_title() in an idle handler.
2009-09-13 13:14:18 +02:00
Martin Nordholts 0d4e8d0526 app: Move 'Recently Closed Docks' logic to GimpDockWindow
Move 'Recently Closed Docks' logic from GimpDock to
GimpDockWindow. GimpDock is now free of explicit GtkWindow
dependencies.
2009-09-13 12:04:50 +02:00
Martin Nordholts dc3521e074 app: Add and use gimp_dock_get_n_dockables() 2009-09-13 11:51:39 +02:00
Martin Nordholts fb99f99788 Move dock window themeing to GimpDockWindow
Move the dock window related themeing namely default dock heght and
font scale from GimpDock to GimpDockWindow to get rid of yet another
GtkWindow dependency from GimpDock.

Note that this change requires gtkrc updates where "GimpDock::" needs
to be repaced with "GimpDockWindow::".
2009-09-13 11:23:02 +02:00
Martin Nordholts fc3ab53645 app: Get rid of GimpImageDock typedef 2009-09-13 11:08:38 +02:00