Commit Graph

124 Commits

Author SHA1 Message Date
Michael Natterer 8df06eb5cd app: get rid of GParameter and g_object_newv() (deprecated in GLib 2.54)
Replace gimp_parameter_*() utility functions with equivalent
gimp_properties_*() functions which deal with separate arrays of names
and values, and use g_object_new_with_properties() instead of
g_object_newv().
2018-01-01 15:20:05 +01:00
Michael Natterer a3c65e6d17 app: get rid of including menus/ stuff from widgets/ and other places
Add GimpMenuFactory can always be found in a GimpDialogManager, use
gimp_dialog_factory_get_menu_factory() where we have a dialog factory
instead of accessing "global_menu_factory" or redundantly passing a
menu factory around where we already pass around a dialog factory.
2016-11-23 19:38:44 +01:00
Michael Natterer 741be87d0f app: don't let display color management settings affect file import
gimp_image_import_color_profile(): get the intent and bpc settings
from the profile import dialog instead of asking the global
GimpColorConfig.
2016-06-05 22:36:52 +02:00
Michael Natterer 5455b8bfd0 app: move some stuff out of app/file/
file-procedure.[ch] is gone and its functions moved to
GimpPlugInManager where they belong (the manager keeps around the
lists of load, save and export procedures).

Utility functions from file-utils.[ch] that have nothing to do with
image files moved to core/gimp-utils.[ch].
2016-01-03 23:38:08 +01:00
Benoit Touchette 6762bf5b9b Bug 759105 - Patch to add icon theme selection
Add support for custom icon themes much like custom theme
support. There is still work to be done but this is the
basic functionality.
2015-12-09 12:50:15 +01:00
Michael Natterer b51ee77ec0 app: implement the "Convert to RGB Working Space" import dialog in the core
Add gimp_image_import_color_profile(), a GUI vtable entry
query_profile_policy() and a new dialog which returns the profile
policy and the profile to convert to. Get rid of the wrapper that
calls the lcms plug-in for that dialog, the plug-in is now completely
unused.

This commit doesn't add any new features, it's just the former lcms
plug-in dialog implemented in app/ (except the little fix that it is
now aware of linear vs. gamma images).
2015-08-23 12:59:12 +02:00
Michael Natterer 7e7c22fc32 app: separate the mount logic from uploading/downloading
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.
2014-07-23 21:37:13 +02:00
Michael Natterer 14c39816d8 app: keep the theme directories around a GFiles
and change gimp_get_theme_dir() to return a GFile.
2014-07-20 17:09:25 +02:00
Michael Natterer 5c1f14be67 app: add gimp_mount_enclosing_volume(), using the the GimpGui vtable
and implement it in gui-vtable.c using gtk_mount_operation_new().
2014-07-11 00:40:34 +02:00
Michael Natterer 3f52828896 app: change GimpImageFile and GimpDocumentList to speak GFile 2014-07-07 23:58:11 +02:00
Michael Natterer c885af6c3e app: only add supported image files to the document history
Initialize the history after plug-ins, and check each item listed by
GtkRecentManager against the mime-types supported by our load
plug-ins.
2014-07-04 20:01:08 +02:00
Michael Natterer 8356003fa2 app: pass the startup monitor to displays opened from the copmmand line
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.
2014-05-03 00:54:20 +02:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Michael Natterer 051374a1b6 app: add gimp_get_monitor_at_pointer()
and use it instead of duplicating that code several times.
2014-05-02 13:23:25 +02:00
Martin Nordholts 07556242b0 app: Make positioning of new dockables depend on window mode
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.
2011-07-03 21:20:36 +02:00
Michael Natterer f4af9b549e Globally switch to saying "window_id" instead of just "window"
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.
2011-02-06 12:07:55 +01:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
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.
2010-02-28 23:23:24 +01:00
Martin Nordholts 2a51c69e9b app: Set_busy() on individual dialog factories 2010-02-28 20:02:45 +01:00
Martin Nordholts bf830398a5 app: Cleanup GimpImageWindow and dependencies, only one dialog factory
Cleanup GimpImageWindow and dependencies like GimpDisplay, there is
only one dialog factory now.
2010-02-20 11:09:51 +01:00
Martin Nordholts c3619fb85c app: Merge "toplevel" and "display" factories
Merge "toplevel" and "display" factories so that we only have one
dialog factory. This allows us to get rid of a lot of special casing.
2010-02-20 10:58:29 +01:00
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Martin Nordholts 66197c5d11 app: global_dock_window_factory -> global_dock_factory
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.
2010-01-19 22:40:06 +01:00
Martin Nordholts 8699511bbd app: global_dock_window_factory -> global_dock_factory
With GimpDock not being a toplevel any longer, it makes more sense to
name global_dock_factory global_dock_window_factory. Do that.
2009-12-20 14:41:02 +01:00
Martin Nordholts f3235e6f45 app: Add "dock-factory" property to GimpImageWindow
With the introduction of a single-window mode, not only dock windows
needs to be able to create docks, the image window also needs to. So
give it a "dock-factory" property.
2009-12-08 19:49:13 +01:00
Michael Natterer 454f1391d6 Use gtk_widget_get_window() instead of widget->window 2009-10-09 21:19:07 +02:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer d1ded0617f More gimp_display_get_shell() instead of display->shell 2009-10-05 19:58:03 +02:00
Michael Natterer 98a4653186 (gui_display_get_window): return the ID of the toplevel, not of the shell 2009-09-30 17:01:55 +02:00
Michael Natterer 97f556160f Remove #include "display/gimpimagewindow.h" 2009-09-30 15:00:09 +02:00
Michael Natterer ccdab9e4cd Make updagin the image window's ui manager more sane
(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.
2009-09-30 00:00:36 +02:00
Michael Natterer 1c430a2b19 Move all GimpImageWindow members to a private struct
Add accessor functions for publically available members and visibility
functions for menubar and statusbar.
2009-09-29 21:44:43 +02:00
Michael Natterer 253b8e2cbe Use gimp_display_shell_get_window() instead of gtk_widget_get_toplevel()
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.
2009-09-29 20:32:26 +02:00
Michael Natterer 54edc20113 Add missing #include "gimpimagewindow.h" 2009-09-28 22:55:54 +02:00
Michael Natterer accdd3d8a1 Go via the toplevel to get to the menubar manager 2009-09-28 22:55:52 +02:00
Michael Natterer 6793d68769 Move the menubar and the menubar_manager to GimpImageWindow
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.
2009-09-28 22:55:38 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Martin Nordholts 2f25fb132f Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
2008-11-20 23:43:58 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
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-10-09 20:24:04 +00:00
Sven Neumann 769c4f925a app/core/gimp-gui.[ch] app/widgets/gimphelp.[ch] app/gui/gui-vtable.c
2008-06-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/widgets/gimphelp.[ch]
	* app/gui/gui-vtable.c
	* app/gui/gui.c: added a GimpProgress parameter to gimp_help().

	* app/actions/help-commands.c
	* app/widgets/gimpuimanager.c
	* tools/pdbgen/pdb/help.pdb: changed accordingly.

	* app/pdb/help-cmds.c: regenerated.

svn path=/trunk/; revision=25908
2008-06-10 09:54:54 +00:00
Sven Neumann 3f2385dcc2 added new methods gimp_container_get_{first,last}_child().
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
2008-04-09 09:50:29 +00:00
Sven Neumann fe11741319 added new function gimp_display_close() which decides if
2008-04-05  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplay.[ch]: added new function
	gimp_display_close() which decides if gimp_display_delete() or
	gimp_display_empty() needs to be called.

	* app/display/gimpdisplay-foreach.[ch]: added new function
	gimp_displays_close() and removed the 'do_quit' parameter from
	gimp_displays_delete().

	* app/gui/gui.c (gui_exit_callback): changed accordingly.

	* app/display/gimpdisplayshell-close.c: removed
	gimp_display_shell_really_close() and call gimp_display_close()
	instead.

	* app/display/gimpdisplayshell.c (gimp_display_shell_empty): 
moved
	code to update the ui managers here.

	* app/actions/file-commands.c (file_save_cmd_callback)
	(file_close_cmd_callback)
	* app/dialogs/file-save-dialog.c (file_save_dialog_response)
	* app/dialogs/quit-dialog.c (quit_close_all_dialog_response):
	close displays instead of deleting them.

	* app/gui/gui-vtable.c (gui_display_delete): call
	gimp_display_close().


svn path=/trunk/; revision=25377
2008-04-05 20:32:24 +00:00
Michael Natterer 943a0ebafd remove temporary "object" variable, it's prefectly fine to say
2008-03-29  Michael Natterer  <mitch@gimp.org>

	* app/gui/gui-vtable.c (gui_display_create): remove temporary
	"object" variable, it's prefectly fine to say GIMP_DISPLAY() on a
	NULL pointer.


svn path=/trunk/; revision=25305
2008-03-29 22:08:15 +00:00
Michael Natterer a8156adf42 <gdk/gdkx.h> needs #ifdef GDK_WINDOWING_X11.
2008-03-29  Michael Natterer  <mitch@gimp.org>

	* app/gui/gui-vtable.c: <gdk/gdkx.h> needs #ifdef GDK_WINDOWING_X11.

	* app/gui/gui.c: remove the include i accidentially added here.


svn path=/trunk/; revision=25298
2008-03-29 10:50:10 +00:00
Mukund Sivaraman 9ed6b3c75f Fixes for some Sparse reported issues in app, libgimp*/
2008-03-28  Mukund Sivaraman  <muks@mukund.org>

        Fixes for some Sparse reported issues in app, libgimp*/

        * app/gui/gui-vtable.c: Included <gdk/gdkx.h>

        * libgimp/gimpprocview.c: author, date, copyright are pointers.

        * libgimpwidgets/gimpcolorprofilestore.c: Last argument of
        g_scanner_scope_add_symbol() is a pointer.


svn path=/trunk/; revision=25293
2008-03-29 00:03:52 +00:00
Sven Neumann 26d1021e77 Properly pass the focus from the core to plug-in dialogs:
2008-03-27  Sven Neumann  <sven@gimp.org>

	Properly pass the focus from the core to plug-in dialogs:

	* libgimpbase/gimpprotocol.[ch]: added a user_time member to the
	GimpConfig struct. Bumped the protocol version to 0x0012.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_user_time() to get the
	timestamp of the last user interaction.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run): pass the timestamp to in the
	GimpConfig message.

	* libgimp/gimp.[ch]:
	* libgimp/gimp.def: added method to access the timestamp as set
	in the config message.

	* libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and
	set the DESKTOP_STARTUP_ID environment variable.

svn path=/trunk/; revision=25263
2008-03-27 16:30:29 +00:00
Sven Neumann 76afd97769 app/core/gimp-gui.[ch] added gimp_get_empty_display() to the vtable.
2008-03-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: added gimp_get_empty_display() to the vtable.

	* app/file/file-open.c (file_open_from_command_line): use the
	empty display as progress window when opening an image from the
	command-line or via the DBus interface.

svn path=/trunk/; revision=25219
2008-03-25 10:50:42 +00:00
Sven Neumann a0528d8f14 sort the list into MRU order on load.
2008-03-25  Sven Neumann  <sven@gimp.org>

	* app/gui/gui-vtable.c (gui_recent_list_load): sort the list 
into
	MRU order on load.


svn path=/trunk/; revision=25213
2008-03-24 23:08:46 +00:00
Sven Neumann 3344c1b3bc Do not any longer keep the document history in two places. We only use
2008-03-24  Sven Neumann  <sven@gimp.org>

	Do not any longer keep the document history in two places. We 
only
	use GtkRecentManager now:

	* app/core/Makefile.am
	* app/core/gimp-documents.[ch]: removed these files.

	* app/core/gimpdocumentlist.c: removed code to load and save the
	"documents" file.
	(gimp_document_list_add_uri): call gimp_recent_list_add_uri() 
here.

	* app/core/gimpimagefile.[ch]: added function to set the 
mime-type.

	* app/core/gimp.c (gimp_restore): removed code to load the
	document history.
	(gimp_real_exit): removed code to save it.
	
	* app/core/gimp-gui.[ch]: extended the vtable with a method to
	populate the document list.

	* app/gui/gui-vtable.c: added code to populate the document 
history
	from the list of recently used files kept by GtkRecentManager.

	* app/gui/gui.c (gui_restore_callback): load the recent files 
here.

	* app/file/file-open.c
	* app/file/file-save.c: no need to call 
gimp_recent_list_add_uri()
	any longer as gimp_document_list_add_uri() does that for us now.

	* app/actions/documents-commands.c 
(documents_clear_cmd_callback):
	purge the items from GtkRecentManager. Also changed the dialog 
to
	emphasize that this operation now affects the document history 
in
	all applications.

	* docs/gimp.1.in: removed reference to "documents" file.


svn path=/trunk/; revision=25190
2008-03-24 11:11:15 +00:00
Michael Natterer 54d306e8ea added a dialog factory for displays and register "gimp-no-image-window"
2008-03-23  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/dialogs.[ch]: added a dialog factory for displays
	and register "gimp-no-image-window" with it.

	* app/display/gimpdisplay.[ch]: add a GimpDialogFactory parameter
	to gimp_display_new() and pass it on to gimp_display_shell_new().

	* app/display/gimpdisplayshell.[ch]: keep the passed
	GimpDialogFactory around. When the shell becomes empty, add it to
	the dialog factory and resize it to the remembered size; when it
	becomes non-empty, remove it from the dialog factory again.

	* app/gui/gui-vtable.c: pass the display dialog factory to
	gimp_display_new().


svn path=/trunk/; revision=25177
2008-03-23 13:40:39 +00:00