gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
We need to mount every non-native GFile's volume, regardless of
whether the file procedure uses GIO directly or needs file-remote to
download/upload the file. Move the entire mount logic to a new
file-remote function and change gimp-gui.c and gui-vtable.c to only
return a GMountOperation. Try to mount every non-native file in
file-open.c and file-save.c and bail out if mounting fails. Simplify
the uploading and downloading code accordingly.
Change gimp_get_display_name() to also return the screen, and its
implementation in the GUI to return the initial monitor during
startup. Retrieve that information in app.c using a weird callback
construct and pass the monitor to file_open_from_command_line().
Half-related, add screen and monitor parameters to GimpDisplayShell
and use these initial values for calculating the canvas's initial
extents.
The image windows still don't position themselves correctly though
because we have no mechanism for that whatsoever just yet, but we now
at least pass the needed monitor information to the right objects.
Add a "monitor" parameter and return something reasonable, instead
of a useless resolution average of all the screen's monitors. Also
require a screen to be passed now.
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:
- pass integer monitor numbers around in all places where we already
pass around a GdkScreen. Pass the "current" monitor to these changed
APIs, where "current" is either the monitor where the action-triggering
widget is, or if that is unavailable the monitor where the mouse is.
- add gimp_widget_get_monitor() in order to easily get to the monitor,
just like gtk_widget_get_screen().
- add screen and monitor parameters in some places that were missed
before.
- in sessionrc, save all window positions relative to the window's
monitor, and save the monitor separately, if it's not the screen's
primary monitor.
- when restoring window positions, use the stored monitor when the new
prefs options says so (use the screen's primary monitor if there is
no stored monitor), otherwise use current monitor that is now passed
around.
Delete the re-inserted 'ige_mac_menu_add_app_menu_group()' function
call. GIMP has migrated to external gtk-mac-integration for the global
menubar integration - ige_mac_menu* functions are no longer available.
Fix various bugs, improve code design and efficiency, change feature
name, update the feature up to our standards (now uses GIMP preferences,
session management, less overwhelming settings...).
Also now action history is tightly tied to GimpAction and logs all
action activation (however it activates, and the show_unavailable
parameter also applies to history).
Search algorithm greatly improved with basic tokenization, better
ordering, filtering, etc.
The current comment is technical and not meant for translators, but it
ends up in po file. Move it where it won't be extracted and add a real
comment for translators. Ideally this string should not be extracted by
xgettext, but it won't verify domains.
If docks are hidden and single-window-mode is active, emit
"notify::hide-docks" manually on gimp->config in session_restore() so
GimpImageWindow syncs its state at the right time.
Improvements:
- setenv/getenv() are not thread-safe, hence they should be run only at
startup before any threading occurs.
- it is counter-productive to load the huge ISO-639 XML file each time
the user opens the Preferences dialog or the text tool options.
Small fix from commit 2697b29. This previous commit was working well, but
implied calling this method as many time as there are opened shells,
whereas once is enough.
Drop the glib-dbus dependency and port stuff to GDBus. Use it
unconditionally if not on Windows or OSX. It seels to work just like
before but I have no idea if everything is really correct.
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.
create a dummy indexed format if neccessary, which can only be used
for checking with babl_format_is_palette(). Port the rest of
GimpImageFile from GimpImageType to Babl*.
Gegl >= 0.1.8, Babl >= 0.1.6, Gdk-Pixbuf >= 1.24.0, Pango >= 1.29.4,
GLib >= 2.28.8, GTK+ 2.24.7
Which means depending on a gazillion of bug fixes, which means less
pain for GIMP 2.8 users, and less useless bugzilla traffic eating
developer resources.
when window positions aren't automatically saved.
Save "hide-docks" and "single-window-mode" in sessionrc instead of
gimprc, so a session layout is always saved either completely or not
at all. Also change "last-tip-shown" saving a bit so all three
session-saved gimprc properties are implemented the same.
Apply cleaned up and fixed patch from Alex Mankuta which
undeprecates ige-mac-menu.c. The file builds now and I only
see warnings about using unknown Carbon API, but I have no
way of checking if it still works on systems where the
deprecated Carbon API actually does something.
When moving out GimpDock:s from a GimpDockColumns into a new
GimpDockWindow when switching off single-window mode, try to preserve
the size of the original GimpDockColumns.
Distribute dock windows better when switching off single-window
mode. First, create one dock window per side of the image window
rather than one dock window per dock. Secondly, move the left docks to
the upper left corner of the screen, and the right docks to the upper
right corner.
Add GimpWindowingStrategy with create_dockable_dialog() and use it in
dialogs_create_dockable_cmd_callback(). There are two implementations:
GimpSingleWindowStrategy and GimpMultiWindowStrategy. Depending on the
window mode, we want new dockables to appear in different places when
created. In single-window mode, they should appear inside the single
image window. In multi-window mode, a new dock window is created.
Make GimpDockContainer::get_docks() return a new list and not just a
pointer to a list so that GimpImageWindow can implement it (who needs
to merge its two GimpDockColumns lists).
Make GimpDockWindow implement the GimpDockContainer interface. The
plan is to make GimpImageWindow also implement the GimpDockContainer
interface when we start to session manage docks in single-window mode.
and completely separate configure and sanity checks for gdk-pixbuf
from GTK+, because it's now distributed as a separate package. Remove
all sorts of conditional compiling based on GDK_CHECK_VERSION() and
CAIRO_VERSION.
- change gimp_devices_get_list() to gimp_devices_get_manager()
- remove gimp_devices_get_current()
- let GimpDeviceStatus connect to the manager's "notify::current-device"
directly and remove device status updating code from gui.c
- cleanup in gimpdevices.c
Add a GimpDeviceManager object and take over most code from
gimpdevices.c, but leave all functions in gimpdevices.c there as
wrappers in order to make rebasing in gtk3-port simpler.
when dealing with native window handles. Also get rid of using
GdkNativeWindow and simply consistently use guint32 all over the
place. This is more obvious and consistent and keeps the diff to the
gtk3-port branch smaller.
The the presence of docks in the image window into account when
deciding whether to show the statusbar resize grip, and simply call
gimp_display_shell_appearance_update() on all shells when
reconfiguring the UI for single-window-mode (which feels like the
right thing to do anyway).
because the packing options are different for GtkH/VBox and GtkBox
itself which is now instantiable. Instead, always use
gtk_box_pack_start() and specify expanding explicitely.
which would have been the correct oder all the time, because these
systems are initialized in reverse order. The wrong order didn't
matter until now, but for some reason it now sometimes triggered
warnings about dialog_factories being NULL during controllers
shutdown.
We need to be able to pass a GimpUIManager to
gimp_dialog_factory_dialog_new(), so make that possible. Also make
sure to set ui_manager in gimp_dialog_factory_dialog_new_internal()
when we create both a dock window and a dock, so tooltips works in
toolboxes created from scratch.
Move toolbox special casing into
gimp_dialog_factory_dialog_new_internal() and on the fly fix problems
with double toolboxes appearing and sometimes not appearing.
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.
Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
We only have one dialog factory now, and
gimp_dialog_factory_from_name() doesn't provide compile-time type
safety, so use global_dialog_factory directly instead.
Update image window side docks visiblity from the image window itself
instead of from the ui configurer. The image window has a dependency
to the config object anyway, so no need to complicate things.
Get rid of 'global_toolbox_factory' and manage everything dock-related
with 'global_dock_factory'. The whole of 'global_toolbox_factory' was
a big special-case and getting rid of it makes it easier to extend the
session management with e.g. single-window mode dock functionality.
To get rid of 'global_toolbox_factory' we, roughly, have to
* Replace 'global_toolbox_factory' with 'global_dock_factory'
everywhere. We can also get rid of lots of code that did special
things for the "toolbox" factory.
* Make the use or interaction with the toolbox explicit in some
places. For example, a function gimp_dock_window_has_toolbox() has
been introduced.
* Make GimpSessionInfoDock have an 'identifier' parameter so we can
differentiate between the "gimp-dock" and "gimp-toolbox" dock
types.
Rename back global_dock_window_factory to
global_dock_factory. Renaming to global_dock_window_factory was done
under the assumption that there would be a separate factory that would
create non-toplevel dockables, but I don't expect this to happen in
the forseeable future.
Let dock windows have proper GimpDialogFactory entries. This allows us
to get rid of a lot of ugly mostly duplicated code. This also makes us
ready the merge the dock window and toolbox factories which will soon
be done. A few things should be noted:
* We adjust the wrap box aspect ratio in the toolbox to avoid having
the toolbox dock window explode
* We make sure that we still can handle sessionrc files from GIMP 2.6
and older
Check for dirty images before forcing single-window mode since it is
annoying to have the UI split up and _then_ being asked about unsaved
images. The user might even click 'Cancel' in which case the UI will
have been switched to multi-window mode.
In order to prevent people from losing dockable dialogs, force
multi-window mode on exit. This is a workaround until single-window
mode is session managed.
This idea comes from some guy in the IRC channel who I unfortunately
forgot the name of and fail to find in the logs.
With the introduction of a single-window mode, not only dock windows
needs to be able to create docks, the image window also needs to. So
give it a "dock-factory" property.
Move g_list_copy() out from gimp_dock_columns_get_docks(). Fixes at
least one memory leak (in gimp_dock_window_get_dock()) and feels nicer
and more flexible.
Enable repeated toggling between Multi- an Single-window mode. When
enabling Single-window mode all docks and displays are put in a single
window. When disabling Single-window mode they are moved out to their
own windows again.
Rename gimp_get_image_window_iter() to gimp_get_image_windows() and
make it return a copy of the list of windows. Typically we will kill
or create new windows when we use this function which is why we do a
copy.
Since we added a GimpDockColumns to GimpDockWindows we need to use
gimp_dock_window_remove_dock() not gtk_container_remove(). This makes
"Windows→Single-window mode" work as before again.
When 'Single-window mode is enabled, move the toolbox and existing
docks into the image window. Needs a lot of more work but is
functional enough for curious people.
Implemented by adding a new GimpUIConfigurer component that has global
knowledge. There is a single application instance of this
component. It subscribes to changes in the single-window-mode config
property and adjusts the UI accordingly.
(gimp_image_window_image_notify): update the ui manager unconditionally
(both when a display is emptied *and* filled)
(gui_display_create): remove updating code here. It was not belonging
here anyway and the image window does the right thing now.
The new function does the right thing, unlike get_toplevel() which
returns the shell itself if it is not in a window. Check the return
value of get_window() for being non-NULL.
Also move some of their related code and update other code to
go via gtk_widget_get_toplevel(), but also add some horrid temp
/* FIXME image window */ hacks.
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.
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-02-26 Sven Neumann <sven@gimp.org>
* app/gui/gui.c (gui_restore_callback): connect to changes of
the
"user-manual-online" gimprc property and kill the gimp-help
plug-in as it caches the location of the help pages.
* app/widgets/gimphelp.[ch]: added
gimp_help_user_manual_changed()
for this purpose.
svn path=/trunk/; revision=28073
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-10-17 Sven Neumann <sven@sven>
* app/core/gimp.[ch]: added signal Gimp::image-opened to
announce
that an image has been loaded and a display was created for it.
* app/file/file-open.c (file_open_with_proc_and_display): call
gimp_opened() to emit the new signal.
* app/gui/dbus-service.xml
* app/gui/gimpdbusservice.[ch]: propagate the 'opened' signal to
listeners of the "org.gimp.GIMP.UI" DBus service.
* app/gui/gui-unique.c: formatting.
svn path=/trunk/; revision=27297
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-09-30 Sven Neumann <sven@gimp.org>
* app/gui/splash.c: don't make the upper label bold. This change
compensates for the smaller width of the new splash screen.
svn path=/trunk/; revision=27089
2008-09-30 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: added
gimp_pango_layout_set_scale().
* app/gui/splash.c: set a smaller font size on the lower label.
svn path=/trunk/; revision=27088
2008-09-25 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]: added a 'restored' flag to the Gimp object
and set it in gimp_real_restore(). Added method
gimp_is_restored().
* app/gui/gui.c: call gui_unique_init() in gui_init() instead of
that later in gui_restore_after_callback(). By doing so we start
our DBus service (or message proxy window on Win32) much earlier
in the start process, thus reducing the time frame where two
instances of gimp can be launched.
* app/gui/gui-unique.c
* app/gui/gimpdbusservice.c: wait handling the queued file-open
requests until gimp is fully restored.
* app/gui/splash.c (splash_update): only run one iteration of
the
main loop. Doing it in a while loop can cause us to get stuck if
the gimp-unique service already added an idle handler.
svn path=/trunk/; revision=27049
2008-09-10 Tor Lillqvist <tml@novell.com>
* app/gui/gui-unique.c (gui_unique_win32_exit): Destroy the proxy
window here so that gimp_unique_win32_open() in app/unique.c won't
find it. This is important especially in a developer version where
the debug output window might be left open and the proxy window
still existing for a long time after the GTK+ main loop of the
GIMP GUI has finished. Thanks to Michael Schumacher for pointing
this out.
There is still a small race window here after GIMP has begun
closing down its GUI in gui_exit_callback() and before the proxy
window has gone away. If another GIMP starts during that interval,
it will find the proxy window and send it a message, which will
then either be ignored, or the proxy window will have been
destroyed before it gets the message. Let's ignore that. There is
a much wider time window during which multiple GIMP instances may
be started during GIMP startup anyway.
svn path=/trunk/; revision=26917
2008-09-10 Tor Lillqvist <tml@novell.com>
* app/gui/gui-unique.c: gui_unique_win32_message_handler() can be
static. Include file/file-open.h for file_open_from_command_line()
declaration. Fix copy/paste glitch in gui_unique_exit().
svn path=/trunk/; revision=26916
2008-08-05 Sven Neumann <sven@gimp.org>
* app/gui/gimpdbusservice.[ch]: changed refcounting and fixed a
bug that I had introduced with the latest changes.
svn path=/trunk/; revision=26391
2008-08-05 Sven Neumann <sven@gimp.org>
* app/gui/gimpdbusservice.[ch]: keep a queue of D-Bus requests
and
work on them one after another instead of handling them all in
parallel. Complements the fix for bug #546426.
svn path=/trunk/; revision=26386
2008-08-05 Sven Neumann <sven@gimp.org>
* app/gui/gimpdbusservice.c: open the files from an idle
handler.
Opening a file may take a while (in particular if it involves
asking the user for input) and we need to respond to the D-Bus
call before it times out.
svn path=/trunk/; revision=26370
2008-07-21 Michael Natterer <mitch@gimp.org>
* app/gui/splash.c
* plug-ins/common/*.c: don't use gtk_box_pack_start_defaults(),
it got deprecated in GTK+ trunk.
svn path=/trunk/; revision=26252
2008-07-13 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimpdbusservice.[ch]
* app/widgets/dbus-service.xml: removed here ...
* app/gui/Makefile.am
* app/gui/gimpdbusservice.[ch]
* app/gui/dbus-service.xml: ... and moved here.
(gimp_dbus_service_activate): raise the first display instead of
the toolbox.
* app/gui/gui-unique.c (gui_unique_win32_idle_open): same change
here, raise the display instead of the toolbox.
* app/unique.c: changed accordingly.
svn path=/trunk/; revision=26184
2008-07-13 Sven Neumann <sven@gimp.org>
* app/unique.c
* app/gui/gui-unique.c: on Win32, if the gimp binary is started
without filenames, raise the toolbox, just as we do in the DBus
code path.
svn path=/trunk/; revision=26183
2008-07-11 Tor Lillqvist <tml@novell.com>
* app/gui/gui-unique.c: Include <windows.h> on Windows.
(gui_unique_win32_init): Drop unused variable.
svn path=/trunk/; revision=26125
2008-07-11 Sven Neumann <sven@gimp.org>
* app/unique.c
* app/gui/gui-unique.[ch]: merged code from bug #410439 to
provide
builtin gimp-win-remote functionality for Win32. This is
untested
and most probably doesn't even compile.
svn path=/trunk/; revision=26120
2008-07-11 Sven Neumann <sven@gimp.org>
* app/gui/Makefile.am
* app/gui/gui-unique.[ch]: new files providing functionality to
ensure a unique GUI instance of GIMP. Code split out of gui.c.
* app/gui/gui.c: changed accordingly.
svn path=/trunk/; revision=26119
2008-05-16 Michael Natterer <mitch@gimp.org>
Implement the presistent menu of recently closed docks, still
somewhat hackish but fully functional. Fixes bug #132744.
* app/actions/dialogs-actions.c
* app/actions/dialogs-commands.[ch]
* menus/image-menu.xml.in: remove the menu items that were
creating the hardcoded preconfigured docks.
* app/dialogs/dialogs.[ch]: add GimpContainer of recently closed
docks and API to load and save it.
* app/gui/session.c: call the recent dock load and save functions.
* app/widgets/gimpsessioninfo.[ch]: implement the GimpConfig interface
and (de)serialize via proper interface methods.
* app/gui/session.c
* app/widgets/gimpdialogfactory.c: use the GimpConfig API
to (de)serialize session infos and added the code that was
formerly in the info's (de)serialize functions but didn't belong
there.
* app/widgets/gimpaction.[ch]: add "max-width-chars" property and
set it on proxy menu item labels.
* app/actions/windows-actions.[ch]
* app/actions/windows-commands.[ch]
* app/menus/windows-menu.c: add actions and menu of recently
closed docks and code to restore the dock when the menu items are
selected. Use above new action property to ensure a minimum
width of the menu.
* app/widgets/gimpmenudock.c: use '-' instead of '|' for
separating notebooks in the window title. Menu items don't like '|'.
* app/widgets/gimpdock.c: removed the confirmation dialog when
closing docks and simply add them to the recent docks container.
This code is totally misplaced and will move to another file soon.
svn path=/trunk/; revision=25671
2008-05-10 Michael Natterer <mitch@gimp.org>
Start changing the "Dialogs" menu to "Windows", still incomplete.
Addresses bug #309707.
* app/actions/Makefile.am
* app/actions/windows-actions.[ch]
* app/actions/windows-commands.[ch]: new files which currently
hold the "show toolbox" action and callback and new code which
maintains automatically generated actions for accessing (raising)
all open images.
* app/actions/actions.c: register the new "windows" action group.
* app/actions/dialogs-actions.c
* app/actions/dialogs-commands.[ch]: remove "show toolbox"
action and callback and also the action for the "Disalogs" menu.
* app/menus/Makefile.am
* app/menus/windows-menu.[ch]: new files which create and destroy
the menu items for the image window actions.
* app/menus/menus.c: register the "windows" action group with
all UI managers that have the "dialogs" action group.
* app/menus/image-menu.c (image_menu_setup): call
windows_menu_setup().
* app/gui/gui.c: s/dialogs_show_toolbox/windows_show_toolbox/g
* menus/image-menu.xml.in: some minor s/dialogs/windows/
and add the "Images" submenu.
svn path=/trunk/; revision=25623
2008-04-10 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.[ch]
(gimp_statusbar_progress_message):
improved the check if the message can be shown in the statusbar.
Do not show messages that don't fit into the given space.
* app/gui/gui-message.c (gui_message_error_dialog): if there's
already an error dialog associated with a progress, then use it.
svn path=/trunk/; revision=25461
2008-04-09 Sven Neumann <sven@gimp.org>
* app/core/gimpcontainer.[ch]: added new methods
gimp_container_get_{first,last}_child().
* app/actions/file-actions.c (file_actions_close_all_update)
* app/dialogs/layer-add-mask-dialog.c (layer_add_mask_dialog_new)
* app/dialogs/palette-import-dialog.c (palette_import_image_callback)
* app/gui/gui-vtable.c (gui_get_empty_display):
* app/widgets/gimpmenudock.c (gimp_menu_dock_image_changed): use
the new GimpContainer methods.
* app/core/gimpundostack.c: use the new GimpContainer methods and
cleaned up the code.
svn path=/trunk/; revision=25426