1. 12 Feb, 2018 1 commit
    • Jehan's avatar
      app: keep track of number of errors and traces in GimpCriticalDialog. · 34fe992f
      Jehan authored
      We don't want an infinite number of traces because it takes some time to
      get. Until now I was keeping track of traces in app/errors.c, but that
      was very sucky because then I was limiting traces per session. Instead
      save them as a variable of a GimpCriticalDialog instance. Therefore only
      generate the traces for WARNING/CRITICAL at the last second, when
      calling the dialog.
      When too many traces are displayed, just fallback to just add error
      messages only. But then even errors without traces can be time-consuming
      (if you have dozens of thousands of errors in a few seconds, as I had
      the other day, updating the dialog for all of them would just freeze the
      whole application for a long time).
      So also keep track of errors as well and as last fallback, just send the
      remaining errors to the stderr.
      34fe992f
  2. 28 Jan, 2018 1 commit
    • Jehan's avatar
      app: new error dialog to backtrace and encourage people to report bugs. · 9fdf3555
      Jehan authored
      GIMP will now try to get a backtrace (on Unix machines only for now,
      using g_on_error_stack_trace(); for Windows, we will likely have to look
      into DrMinGW).
      This is now applied to CRITICAL errors only, which usually means major
      bugs but are currently mostly hidden unless you run GIMP in terminal. We
      limit to 3 backtraces, because many CRITICAL typically get into domino
      effect and cause more CRITICALs (for instance when a g_return*_if_fail()
      returns too early).
      9fdf3555
  3. 05 Jun, 2016 1 commit
  4. 09 Dec, 2015 1 commit
  5. 23 Aug, 2015 1 commit
    • Michael Natterer's avatar
      app: implement the "Convert to RGB Working Space" import dialog in the core · b51ee77e
      Michael Natterer authored
      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).
      b51ee77e
  6. 23 Jul, 2014 1 commit
    • Michael Natterer's avatar
      app: separate the mount logic from uploading/downloading · 7e7c22fc
      Michael Natterer authored
      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.
      7e7c22fc
  7. 20 Jul, 2014 1 commit
  8. 10 Jul, 2014 1 commit
  9. 07 Jul, 2014 1 commit
  10. 02 May, 2014 2 commits
    • Michael Natterer's avatar
      app: pass the startup monitor to displays opened from the copmmand line · 8356003f
      Michael Natterer authored
      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.
      8356003f
    • Michael Natterer's avatar
      app: add screen and monitor to all display and image window constructors · 7f23fbec
      Michael Natterer authored
      so they appear on the proper monitor as well.
      7f23fbec
  11. 14 Oct, 2013 1 commit
    • Michael Natterer's avatar
      app,libgimp*: fix includes to follow our include policy · 697572cc
      Michael Natterer authored
      - don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
      - instead, include it in many .c files instead of <glib-object.h>,
        finally acknowledging the fact that app/ depends on gdk-pixbuf almost
        globally
      - fix up includes as if libgimpbase depended in GIO, which it soon will
      697572cc
  12. 03 Jul, 2011 1 commit
    • Martin Nordholts's avatar
      app: Make positioning of new dockables depend on window mode · 07556242
      Martin Nordholts authored
      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.
      07556242
  13. 06 Feb, 2011 1 commit
  14. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      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
      d9b5207a
  15. 09 Oct, 2008 1 commit
    • Michael Natterer's avatar
      Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a · 5503e6a0
      Michael Natterer authored
      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
      5503e6a0
  16. 10 Jun, 2008 1 commit
    • Sven Neumann's avatar
      app/core/gimp-gui.[ch] app/widgets/gimphelp.[ch] app/gui/gui-vtable.c · 769c4f92
      Sven Neumann authored
      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
      769c4f92
  17. 27 Mar, 2008 1 commit
    • Sven Neumann's avatar
      Properly pass the focus from the core to plug-in dialogs: · 26d1021e
      Sven Neumann authored
      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
      26d1021e
  18. 25 Mar, 2008 1 commit
    • Sven Neumann's avatar
      app/core/gimp-gui.[ch] added gimp_get_empty_display() to the vtable. · 76afd977
      Sven Neumann authored
      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
      76afd977
  19. 24 Mar, 2008 1 commit
    • Sven Neumann's avatar
      Do not any longer keep the document history in two places. We only use · 3344c1b3
      Sven Neumann authored
      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
      3344c1b3
  20. 18 Mar, 2008 1 commit
    • Michael Natterer's avatar
      First draft of the "no image open" window, which is implemented as a · cee3baea
      Michael Natterer authored
      2008-03-18  Michael Natterer  <mitch@gimp.org>
      
      	First draft of the "no image open" window, which is implemented as
      	a display without image (a view with NULL model). Didn't change
      	the display's appearance yet so I can first make sure the display
      	without image works properly in all details before hiding these
      	details.
      
      	* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
      	and allow "image" to be NULL.
      
      	* app/core/gimpcontext.c (gimp_context_real_set_display): a
      	display's image can be NULL now.
      
      	* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
      	members.  Add Gimp parameter to gimp_display_shell_new(). Changed
      	gimp_display_reconnect() to gimp_display_set_image() and allow to
      	set a NULL image.
      
      	* app/gui/gui-vtable.c (gui_display_create): if there is a single
      	display without an image, call gimp_display_set_image() on that
      	display instead of creating a new one.
      
      	* app/display/gimpdisplayshell-close.c: if the last display is
      	closed, don't close it but make it empty. Factored out that code
      	to gimp_display_shell_really_close().
      
      	* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
      	empty display, open the first one into that display and the other
      	ones as layers of the newly opened image. This is consistent with
      	dropping on an existing image but maybe needs some discussion.
      
      	* app/display/gimpdisplayshell-callbacks.c: bail out early in the
      	tool event callback so tools never have to deal with empty
      	displays. In expose(), draw the drop zone on the empty display.
      
      	* app/display/gimpdisplayshell-title.c: set the empty display's
      	title to "Gimp - Drop Files".
      
      	* app/display/gimpdisplay-foreach.c
      	* app/display/gimpdisplay-handlers.c
      	* app/display/gimpdisplayshell-appearance.c
      	* app/display/gimpdisplayshell-autoscroll.c
      	* app/display/gimpdisplayshell-callbacks.c
      	* app/display/gimpdisplayshell-cursor.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/display/gimpdisplayshell-draw.c
      	* app/display/gimpdisplayshell-filter-dialog.c
      	* app/display/gimpdisplayshell-handlers.c
      	* app/display/gimpdisplayshell-layer-select.c
      	* app/display/gimpdisplayshell-preview.c
      	* app/display/gimpdisplayshell-render.c
      	* app/display/gimpdisplayshell-scale.c
      	* app/display/gimpdisplayshell-scroll.c
      	* app/display/gimpdisplayshell-selection.c
      	* app/display/gimpdisplayshell-title.c
      	* app/display/gimpdisplayshell.c
      	* app/display/gimpnavigationeditor.c
      	* app/display/gimpstatusbar.c: use display->gimp and
      	display->config instead of going via the image. Guard against
      	empty displays in some few places (most places can't be
      	called). Where needed, use the canvas' dimensions instead of the
      	image's dimensions so scroll offsets and scrollbars still have
      	sane values instead of the last image's ones.
      
      	* app/actions/actions.c (action_data_get_gimp)
      	(action_data_get_context): use display->gimp instead of
      	display->image->gimp.
      
      	* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
      	to "paste as new" if there is an empty display.
      
      	* app/actions/tools-commands.c (tools_select_cmd_callback): don't
      	initialize the new tool on an empty display.
      
      	* app/actions/view-actions.c (view_actions_update): changed lots
      	of sensitivity settings to be insensitive when there is no image
      	(instead of no display).
      
      	* app/actions/view-commands.c: use the display's config object
      	instead of gimp's.
      
      
      svn path=/trunk/; revision=25113
      cee3baea
  21. 13 Sep, 2007 1 commit
    • Nils Philippsen's avatar
      drop own recently used files code in favour of GtkRecentManager: · 8ff9c4c8
      Nils Philippsen authored
      * app/core/gimp-gui.c (gimp_recent_list_add_uri), app/core/gimp-gui.h,
      app/gui/gui-vtable.c (gui_recent_list_add_uri): add
      {gimp,gui}_recent_list_add_uri(), gui_recent_list_add_uri() dispatches to
      GtkRecentManager
      
      * app/dialogs/file-save-dialog.c (file_save_dialog_save_image),
      app/actions/file-commands.c (file_save_cmd_callback),
      app/widgets/gimpdnd-xds.c (gimp_dnd_xds_save_image): pass Gimp instance to
      file_save() calls
      
      * app/file/file-open.c (file_open_with_proc_and_display,
      file_open_layers), app/file/file-save.c (file_save), app/file/file-save.h:
      pass Gimp instance to gimp_recent_list_add_uri() calls
      
      * app/file/gimprecentitem.c, app/file/gimprecentitem.h,
      app/file/gimprecentlist.c, app/file/gimprecentlist.h: removed
      
      * app/file/Makefile.am: drop reference to removed files
      
      svn path=/trunk/; revision=23526
      8ff9c4c8
  22. 09 Dec, 2006 1 commit
  23. 09 Oct, 2006 1 commit
    • Michael Natterer's avatar
      Added message severities and make sure all messages are routed through a · f5afb754
      Michael Natterer authored
      2006-10-09  Michael Natterer  <mitch@gimp.org>
      
      	Added message severities and make sure all messages are routed
      	through a central function, so redirecting to the error console or
      	stderr work again:
      
      	* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
      	WARNING, ERROR }.
      
      	* app/core/gimp.[ch] (gimp_message)
      	(gimp_message_valist): added severity parameter. Changed
      	"GimpProgress *progress" parameter to "GObject *handler", where
      	"handler" can be either a GimpProgress, a GtkWidget or NULL.
      
      	* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
      	--console-messages again. Always dispatch to the GUI message
      	handler first if it exists.
      
      	* app/gui/gui-message.[ch]: pass severity parameters around.
      
      	(gui_message_error_dialog): if "handler" is a progress, dispatch
      	the message to it first. If it is a widget (and *not* a progress),
      	use a GtkMessageDialog on top of that widget's toplevel. Fall
      	back to the usual GimpErrorDialog otherwise.
      
      	* app/core/gimpprogress.[ch] (gimp_progress_message): added
      	severity parameter. Also added boolean return value to the virtual
      	function so it can decide to fail if it can't handle the message.
      
      	* app/display/gimpdisplay.c: implement GimpProgress::message() and
      	redirect the message to GimpDisplayShell.
      
      	* app/display/gimpdisplayshell-progress.c: implement
      	GimpProgress::message() and redirect the message to GimpStatusbar
      	if it is not an error and if the status bar is visible.
      
      	* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
      	but fail on messages that contain a newline. Show the right icons
      	for the message severities (work in progress).
      
      	* app/display/gimpdisplayshell.[ch]: removed
      	gimp_display_shell_message() and its _valist() variant.
      
      	* app/widgets/gimperrorconsole.[ch]: show the right icons for the
      	message severities.
      
      	* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
      	return TRUE to swallow all messages.
      
      	* app/widgets/gimpwidgets-utils.[ch]: removed
      	gimp_show_message_dialog(). Added gimp_get_message_stock_id().
      
      	* app/errors.c
      	* app/actions/edit-commands.c
      	* app/actions/error-console-commands.c
      	* app/actions/file-commands.c
      	* app/actions/select-commands.c
      	* app/actions/text-editor-commands.c
      	* app/actions/vectors-commands.c
      	* app/core/gimpimage-convert.c
      	* app/core/gimpimagefile.c
      	* app/dialogs/convert-dialog.c
      	* app/dialogs/file-open-dialog.c
      	* app/dialogs/file-open-location-dialog.c
      	* app/dialogs/file-save-dialog.c
      	* app/dialogs/palette-import-dialog.c
      	* app/dialogs/stroke-dialog.c
      	* app/display/gimpdisplayshell-dnd.c
      	* app/pdb/gimppdb.c
      	* app/plug-in/gimpplugin.c
      	* app/tools/gimpimagemaptool.c
      	* app/tools/gimptool.c
      	* app/tools/gimpvectortool.c
      	* app/widgets/gimpactionview.c
      	* app/widgets/gimpcontrollerlist.c
      	* app/widgets/gimppdbdialog.c
      	* app/widgets/gimpvectorstreeview.c
      	* app/xcf/xcf-load.c
      	* app/xcf/xcf-save.c
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/brush.pdb
      	* tools/pdbgen/pdb/gradient.pdb
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/message.pdb
      	* tools/pdbgen/pdb/palette.pdb: added severity parameter to
      	gimp_message() calls. Convert all calls to
      	gimp_show_message_dialog() and gimp_display_shell_message() to
      	gimp_message(). Also converted some more g_message() calls.
      
      	* app/pdb/brush_cmds.c
      	* app/pdb/gradient_cmds.c
      	* app/pdb/image_cmds.c
      	* app/pdb/message_cmds.c
      	* app/pdb/palette_cmds.c: regenerated.
      f5afb754
  24. 22 Sep, 2006 1 commit
    • Sven Neumann's avatar
      app/gui/gui-message.c moved utility function to gimpwidgets-utils. · a69c1ff1
      Sven Neumann authored
      2006-09-22  Sven Neumann  <sven@gimp.org>
      
      	* app/gui/gui-message.c
      	* app/widgets/gimpwidgets-utils.[ch]: moved utility function to
      	gimpwidgets-utils.
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: added a progress parameter to
      	gimp_pdb_dialog_new() and make the dialog transient to the progress
      	window.
      
      	* tools/pdbgen/pdb/brush_select.pdb
      	* tools/pdbgen/pdb/font_select.pdb
      	* tools/pdbgen/pdb/gradient_select.pdb
      	* tools/pdbgen/pdb/palette_select.pdb
      	* tools/pdbgen/pdb/pattern_select.pdb: pass progress to
      	gimp_pdb_dialog_new().
      
      	* app/pdb/brush_select_cmds.c
      	* app/pdb/font_select_cmds.c
      	* app/pdb/gradient_select_cmds.c
      	* app/pdb/palette_select_cmds.c
      	* app/pdb/pattern_select_cmds.c: regenerated.
      
      	* libgimp/gimpselectbutton.c: cosmetics.
      a69c1ff1
  25. 09 Sep, 2006 1 commit
    • Sven Neumann's avatar
      app/app_procs.[ch] initialize the error subsystem after the gimp object · 188bbe5d
      Sven Neumann authored
      2006-09-09  Sven Neumann  <sven@gimp.org>
      
      	* app/app_procs.[ch]
      	* app/main.c: initialize the error subsystem after the gimp
      object
      	has been created.
      
      	* app/errors.[ch]: store a reference to the gimp object (eek)
      and
      	use it to call gimp_gui_ungrab() before g_on_error_query().
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: added gimp_gui_ungrab().
      188bbe5d
  26. 08 Aug, 2006 1 commit
  27. 19 Jul, 2006 1 commit
    • Sven Neumann's avatar
      Make message dialogs transient for the progress window. Addresses bug · 6d922b21
      Sven Neumann authored
      2006-07-19  Sven Neumann  <sven@gimp.org>
      
      	Make message dialogs transient for the progress window.
      Addresses
      	bug #347214.
      
      	* app/core/gimp-gui.[ch]: added a progress parameter to
      	gimp_message().  Let gimp_message() deal with optionally
      	delegating the message to gimp_progress_message().
      
      	* app/errors.c: changed accordingly.
      
      	* app/core/gimpprogress.[ch] (gimp_progress_message): return a
      	boolean indicating whether the message was handled.
      
      	* app/gui/Makefile.am
      	* app/gui/gui-message.[ch]
      	* app/gui/gui-vtable.c: moved message handling to a new file.
      Only
      	use the global error dialog for messages without a progress.
      	Otherwise attach an error dialog to the progress and try to make
      	it transient to the progress window.
      
      	* tools/pdbgen/pdb/message.pdb:
      	* app/plug-in/gimpplugin-progress.[ch]: don't delegate messages
      to
      	the progress interface, this is handled by gimp_message() now.
      
      	* app/pdb/message_cmds.c: regenerated.
      
      	* app/plug-in/gimpplugin.c
      	* app/actions/documents-commands.c: formatting.
      6d922b21
  28. 09 May, 2006 1 commit
    • Michael Natterer's avatar
      app/core/gimpimage.c (gimp_image_new) app/core/gimpitem.c · 1f61feee
      Michael Natterer authored
      2006-05-09  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage.c (gimp_image_new)
      	* app/core/gimpitem.c (gimp_item_configure)
      	* app/display/gimpdisplay.c (gimp_display_new): make sure IDs wrap
      	correctly at G_MAXINT and skip IDs which are currently in use.
      
      	It makes no sense to treat gimp->image_table and gimp->images
      	differently, since they keep the same set of images. And it makes
      	no sense to treat gimp->displays and gimp->images differently.
      	Moved all container adding into the objects' constructors:
      
      	* app/core/gimp.c (gimp_create_image): don't add the new image
      	to gimp->images here...
      
      	* app/core/gimpimage.c (gimp_image_constructor): ...but here.
      
      	* app/core/gimp-gui.c (gimp_create_display): don't add the new
      	display to gimp->displays here...
      
      	* app/display/gimpdisplay.c (gimp_display_new): ...but here.
      1f61feee
  29. 04 May, 2006 1 commit
    • Michael Natterer's avatar
      added signals "plug-in-opened" and "plug-in-closed". Added functions · 808b65cd
      Michael Natterer authored
      2006-05-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/gimppluginmanager.[ch]: added signals
      	"plug-in-opened" and "plug-in-closed". Added functions
      	gimp_plug_in_manager_add_open_plug_in() and _remove_open_plugin()
      	which maintain the list of open plug-ins and emit the signals.
      
      	* app/plug-in/gimpplugin.c (gimp_plug_in_open)
      	(gimp_plug_in_close): don't touch manager->open_plug_ins and don't
      	ref/unref the plug-in. Call above new functions instead. Don't
      	call gimp_pdb_dialogs_check().
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: removed gimp_pdb_dialogs_check().
      
      	* app/widgets/gimppdbdialog.[ch]: removed
      	gimp_pdb_dialogs_check_callback() and connect to the
      	plug-in-manager's "plug-in-closed" signal instead.
      808b65cd
  30. 28 Apr, 2006 1 commit
    • Michael Natterer's avatar
      app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps · f1c3e79a
      Michael Natterer authored
      2006-04-29  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/Makefile.am
      	* app/plug-in/plug-in-types.h
      	* app/plug-in/gimppluginmanager.[ch]: new object which keeps all
      	plug-in related stuff that was kept in the Gimp instance. Has
      	"menu-branch-added" and "last-plug-in-changed" signals.
      
      	* app/plug-in/plug-ins.[ch]: removed, all its functions are in
      	GimpPlugInManager now.
      
      	* app/core/gimpmarshal.list: new marshaller for the new object.
      
      	* app/core/gimp.[ch]: removed all plug-in related stuff and keep a
      	GimpPlugInManager around.
      
      	* app/plug-in/plug-in-data.[ch]
      	* app/plug-in/plug-in-file.[ch]
      	* app/plug-in/plug-in-help-domain.[ch]
      	* app/plug-in/plug-in-locale-domain.[ch]
      	* app/plug-in/plug-in-menu-branch.[ch]
      	* app/plug-in/plug-ins-query.[ch]: removed...
      
      	* app/plug-in/gimppluginmanager-data.[ch]
      	* app/plug-in/gimppluginmanager-file.[ch]
      	* app/plug-in/gimppluginmanager-help-domain.[ch]
      	* app/plug-in/gimppluginmanager-locale-domain.[ch]
      	* app/plug-in/gimppluginmanager-menu-branch.[ch]
      	* app/plug-in/gimppluginmanager-query.[ch]: ...and added as
      	methods of GimpPlugInManager.
      
      	* app/plug-in/plug-in-debug.[ch]
      	* app/plug-in/plug-in-shm.[ch]: removed...
      
      	* app/plug-in/gimpplugindebug.[ch]
      	* app/plug-in/gimppluginshm.[ch]: ...and added as properly
      	namespeced structs with constructors and destructors.
      
      	* app/core/Makefile.am
      	* app/core/gimpenvirontable.[ch]
      	* app/core/gimpinterpreterdb.[ch]: removed...
      
      	* app/plug-in/gimpenvirontable.[ch]
      	* app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged.
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all
      	related stuff.
      
      	* app/actions/plug-in-actions.[ch]: connect to the
      	plug-in-manager's "menu-path-added" signal and create menu branch
      	actions accordingly.
      
      	* app/plug-in/plug-in-context.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-run.[ch]
      	* app/plug-in/plug-in.[ch]
      	* app/app_procs.c
      	* app/actions/file-commands.c
      	* app/actions/plug-in-commands.c
      	* app/core/gimpimage.c
      	* app/dialogs/file-open-location-dialog.c
      	* app/dialogs/file-save-dialog.c
      	* app/file/file-open.c
      	* app/gui/gui.c
      	* app/menus/plug-in-menus.c
      	* app/pdb/gimppluginprocedure.c
      	* app/pdb/gimptemporaryprocedure.c
      	* app/widgets/gimpdnd-xds.c
      	* app/widgets/gimpfiledialog.c
      	* app/widgets/gimpfileprocview.c
      	* app/widgets/gimphelp.c
      	* app/widgets/gimpthumbbox.c
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/context.pdb
      	* tools/pdbgen/pdb/drawable.pdb
      	* tools/pdbgen/pdb/fileops.pdb
      	* tools/pdbgen/pdb/help.pdb
      	* tools/pdbgen/pdb/message.pdb
      	* tools/pdbgen/pdb/plug_in.pdb
      	* tools/pdbgen/pdb/procedural_db.pdb
      	* tools/pdbgen/pdb/progress.pdb
      	* tools/pdbgen/pdb/undo.pdb: follow above refactoring.
      
      	* app/pdb/context_cmds.c
      	* app/pdb/drawable_cmds.c
      	* app/pdb/fileops_cmds.c
      	* app/pdb/help_cmds.c
      	* app/pdb/message_cmds.c
      	* app/pdb/plug_in_cmds.c
      	* app/pdb/procedural_db_cmds.c
      	* app/pdb/progress_cmds.c
      	* app/pdb/undo_cmds.c: regenerated.
      f1c3e79a
  31. 27 Apr, 2006 2 commits
    • Michael Natterer's avatar
      new function which returns string arrays of all registered locale domains · 305ada63
      Michael Natterer authored
      2006-04-27  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-locale-domain.[ch] (plug_in_locale_domains):
      	new function which returns string arrays of all registered locale
      	domains and paths.
      
      	(plug_in_standard_locale_domain): removed this function. The
      	standard plug-in domain is included in the domains returned by
      	plug_in_locale_domains().
      
      	* app/plug-in/plug-ins.c (plug_ins_init): simply bind the text
      	domains here instead of calling gimp_menus_init(). Destroy
      	gimp->plug_in_defs much earlier.
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: removed gimp_menus_init().
      
      	* app/menus/plug-in-menus.[ch]: removed plug_in_menus_init(),
      	binding text domains is completely done in the core now.
      305ada63
    • Michael Natterer's avatar
      Added some signals inspired by Rockwalrus' libpdb: · ee66f2f3
      Michael Natterer authored
      2006-04-27  Michael Natterer  <mitch@gimp.org>
      
      	Added some signals inspired by Rockwalrus' libpdb:
      
      	* app/pdb/gimppdb.[ch]: added signals "register-procedure" and
      	"unregister-procedure".
      
      	* app/pdb/gimppluginprocedure.[ch]: added signal "menu-path-added".
      
      	* app/actions/plug-in-actions.[ch]
      	* app/menus/plug-in-menus.[ch]: connect to the new signals and
      	create/destroy plug-in actions and menus accordingly. Made all
      	needed functions private and merged some of them with the newly
      	added signal callbacks.
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: removed gimp_menus_create_item() and
      	gimp_menus_delete_item() and all related stuff.
      
      	* app/plug-in/plug-in.c
      	* app/plug-in/plug-ins.c: removed calls to the removed functions.
      
      	* app/plug-in/plug-ins.c (plug_ins_init): add the plug-in
      	procedures to the PDB *after* calling gimp_menus_init() so their
      	locale domains are properly initialized when the menus are
      	created.
      ee66f2f3
  32. 12 Apr, 2006 1 commit
  33. 06 Apr, 2006 1 commit
    • Michael Natterer's avatar
      app/plug-in/Makefile.am app/plug-in/plug-in-types.h removed... · 7e258dfa
      Michael Natterer authored
      2006-04-06  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/Makefile.am
      	* app/plug-in/plug-in-types.h
      	* app/plug-in/plug-in-proc-def.[ch]: removed...
      
      	* app/pdb/Makefile.am
      	* app/pdb/pdb-types.h
      	* app/pdb/gimppluginprocedure.[ch]: ...and added here. Virtualized
      	get_progname().
      
      	* app/pdb/gimptemporaryprocedure.[ch]: new class derived from
      	GimpPlugInProcedure.
      
      	* app/pdb/gimpprocedure.[ch] (struct GimpProcedure): remove union
      	exec_method and all the structs it needed. Procedure execution is
      	properly virtualized now. Removed gimp_procedure_initialize() and
      	grow the args and values arrays dynamically in
      	gimp_procedure_add_argument()/return_value(). Added marshal_func
      	parameter to gimp_procedure_new().
      
      	* app/actions/plug-in-actions.c
      	* app/actions/plug-in-commands.c
      	* app/core/gimp-gui.c
      	* app/dialogs/file-save-dialog.c
      	* app/file/file-open.c
      	* app/file/file-save.c
      	* app/file/file-utils.c
      	* app/gui/gui-vtable.c
      	* app/menus/plug-in-menus.c
      	* app/plug-in/plug-in-def.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-rc.c
      	* app/plug-in/plug-in-run.c
      	* app/plug-in/plug-in.c
      	* app/plug-in/plug-ins-query.c
      	* app/plug-in/plug-ins.c
      	* app/widgets/gimpfiledialog.c
      	* app/widgets/gimpfileprocview.c
      	* app/widgets/gimppluginaction.c
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/fileops.pdb
      	* tools/pdbgen/pdb/plug_in.pdb
      	* tools/pdbgen/app.pl: changed accordingly.
      
      	* app/pdb/*_cmds.c: regenerated.
      
      	* app/pdb/gimp-pdb.c: added uglyness to make the app link again.
      7e258dfa
  34. 05 Apr, 2006 1 commit
    • Michael Natterer's avatar
      app/plug-in/plug-in-types.h renamed to GimpPlugInProcedure and made a · 086d0b63
      Michael Natterer authored
      2006-04-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-types.h
      	* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
      	and made a GObject derived from GimpProcedure (instead of having
      	a pointer to a GimpProcedure). Added image_types and file_magic
      	utility functions taken from plug-ins.[ch]. Still lives in the
      	same crappy files because I am undecided where to put it...
      
      	* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
      	switch() statement and always call the internal marshaller because
      	GimpProcedure::execute() is properly overridden by
      	GimpPlugInProcedure now.
      
      	* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
      	utilities added to GimpPlugInProcedure.
      
      	* app/actions/file-commands.c
      	* app/actions/plug-in-actions.[ch]
      	* app/actions/plug-in-commands.[ch]
      	* app/core/gimp-gui.[ch]
      	* app/core/gimp.[ch]
      	* app/core/gimpimage.[ch]
      	* app/dialogs/file-open-dialog.c
      	* app/dialogs/file-save-dialog.c
      	* app/dialogs/print-size-dialog.c
      	* app/file/file-open.[ch]
      	* app/file/file-save.[ch]
      	* app/file/file-utils.[ch]
      	* app/gui/gui-vtable.c
      	* app/menus/plug-in-menus.[ch]
      	* app/plug-in/plug-in-def.[ch]
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-rc.c
      	* app/plug-in/plug-in-run.c
      	* app/plug-in/plug-in.c
      	* app/plug-in/plug-ins-query.c
      	* app/widgets/gimpactiongroup.[ch]
      	* app/widgets/gimpdnd-xds.c
      	* app/widgets/gimpfiledialog.[ch]
      	* app/widgets/gimpfileprocview.[ch]
      	* app/widgets/gimppluginaction.[ch]
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/fileops.pdb
      	* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.
      
      	* app/pdb/fileops_cmds.c
      	* app/pdb/plug_in_cmds.c: regenerated.
      086d0b63
  35. 28 Mar, 2006 2 commits
  36. 23 Mar, 2006 1 commit
    • Michael Natterer's avatar
      app/core/gimp-gui.[ch] app/gui/gui-vtable.c pass displays around as · acdae9b3
      Michael Natterer authored
      2006-03-23  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c
      	* app/plug-in/plug-in-progress.[ch]: pass displays around as
      	GimpObject, not as integer IDs.
      
      	* tools/pdbgen/pdb/progress.pdb: changed accordingly.
      
      	* app/pdb/progress_cmds.c
      	* libgimp/gimpprogress_pdb.c: regenerated.
      acdae9b3
  37. 07 Feb, 2006 1 commit