Commit Graph

74 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer bdbec7941c Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-20 21:06:34 +02:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 7da7bab09c app: get rid of icons in dialog buttons (use labels not stock IDs)
Nobody has them anymore, and they are deprecated in GTK+ 3.x. This
also fixes all conflicting mnemonics except those I missed, but we can
fix them now.
2017-02-12 16:18:54 +01:00
Jehan 3fa016fb4b app: clean out tab indentations. 2016-12-21 04:05:32 +01:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Michael Natterer 4ea518fee3 Bug 768736 - Button order differs in "Quit GIMP" and "Close View"...
...dialogs with modified images

Move the "Discard Changes" button to the right (affirmative) position
in gimp_display_shell_close_dialog().
2016-07-24 23:55:35 +02:00
Mukund Sivaraman a805f8426a app: Use gint64 for dirty_time 2014-08-25 19:55:29 +05:30
Michael Natterer d0a6d95dad app: remove a bunch of file-utils.h includes 2014-07-08 00:23:34 +02:00
Michael Natterer ff6ea69569 app: change the image's various URIs to GFiles
which gets rid of a lot of temporarily added GFile code again because
we don't need to convert between URI and GFile any longer.
2014-07-07 23:58:11 +02:00
Michael Natterer 65a65947d9 app, libgimp: replace GTK_STOCK_FOO by icon names
unless it's a stock ID used for an action button, will address that
later.
2014-05-11 22:49:22 +02:00
Michael Natterer 5ad15cecbe app: fix typo in last commit 2013-11-08 23:33:54 +01:00
Michael Natterer 9057b63c1b app: add the same <Primary>D shortcut in the image close dialog
and change the button label to "_Discard Changes" so it's the same as
in quit.
2013-11-08 23:26:34 +01:00
Michael Natterer beb184e395 app: show file:// uris as filename in the close and quit dialogs
and make the quit dialog's "Exported to foo" string easier to
translate by constructing the markup in a separate step.
2013-11-07 19:14:04 +01:00
Michael Natterer 55f025e469 Bug 687673 - The image has been exported to '(null)' when export...
Show the imported URI if the exported URI is NULL, they are equivalent
for this dialog.
2012-11-06 22:13:49 +01:00
Michael Natterer 56c6935a0c Bug 686025 - Closing a tab closes wrong tab
Replace /* FIXME: switch tabs */ with an actual call to
gimp_image_window_set_active_shell(). WTF...
2012-10-13 00:22:21 +02:00
Michael Natterer 57d4680ab3 Bug 675399 - Mention that the image was at least exported in the close...
If the image was exported, mention it in the close warning dialog.
2012-05-10 01:10:27 +02:00
Michael Natterer e2c8a60665 app: remove the "confirm-on-close" preference
the warning dialog cannot be disabled any longer now.
2012-05-07 14:02:36 +02:00
Martin Nordholts 480d6e0cf2 app: Add and use gimp_image_get_uri() 2011-01-26 08:19:39 +01:00
Michael Natterer 0b2c804e9d Move "disp_count" and "instance_count" to GimpImagePrivate
and add the neccessary API to access and modify them.
2010-02-03 21:22:00 +01:00
Michael Natterer f769284aca Start private struct for GimpImage and move the first members there 2010-02-03 20:31:25 +01:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +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 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 a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Martin Nordholts c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
Martin Nordholts 9a8efbe410 app: Remove unused variable 2009-05-01 17:29:17 +02:00
Sven Neumann c11ef1413f adapt button labels to the latest GNOME HIG.
2009-03-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c
	(gimp_display_shell_close_dialog): adapt button labels to the
	latest GNOME HIG.


svn path=/trunk/; revision=28161
2009-03-16 13:48:46 +00: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
Sven Neumann ada8336822 added gimp_image_get_display_name().
2008-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_display_name().

	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-title.c
	* app/pdb/gimppdb-utils.c

	* app/widgets/gimpviewabledialog.c: use the new method instead 
of
	getting the image URI and mangling it with
	file_utils_uri_display_basename().


svn path=/trunk/; revision=27637
2008-11-13 12:09:05 +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 23459bf568 if a save dialog is active for this image, then don't allow to close it.
2008-07-09  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c (gimp_display_shell_close):
	if a save dialog is active for this image, then don't allow to
	close it. Fixes bug #511965.

svn path=/trunk/; revision=26095
2008-07-09 10:59:19 +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 1db77c5a04 invoke the quit action instead of calling gimp_exit() so its sensitivity
2008-03-21  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-close.c (gimp_display_shell_close):
	invoke the quit action instead of calling gimp_exit() so its
	sensitivity is taken into account.


svn path=/trunk/; revision=25157
2008-03-21 18:02:42 +00:00
Martin Nordholts 667abcec21 gimp_exit() when closing the "no image" window.
2008-03-20  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-close.c
	(gimp_display_shell_close): gimp_exit() when closing the "no
	image" window.

svn path=/trunk/; revision=25147
2008-03-20 20:43:48 +00:00
Michael Natterer a098b12f55 add gimp_display_empty()/fill() which turns it into an empty display and
2008-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.[ch]: add gimp_display_empty()/fill()
	which turns it into an empty display and back.

	* app/display/gimpdisplayshell.[ch]: add same api here.

	* app/display/gimpdisplayshell-close.c
	* app/gui/gui-vtable.c: use the new functions instead of having
	the code here.

	* app/display/gimpdisplayshell-selection.c
	(gimp_display_shell_selection_control): stop the timeout and free
	the segments when this function is called on an empty display.


svn path=/trunk/; revision=25124
2008-03-19 16:15:50 +00:00
Michael Natterer bd636468e8 add new options object for the "no image" display appearance.
2008-03-18  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayoptions.[ch]: add new options object
	for the "no image" display appearance.

	* app/display/gimpdisplayshell.[ch]: keep one of them around.

	* app/display/gimpdisplayshell-appearance.[ch]: use the options
	object when the display is empty. Add guards against no image
	to some functions. Add gimp_display_shell_appearance_update()
	which sets all options according to the current display state
	(normal, fullscreen, no image).

	* app/actions/view-actions.c: don't allow to configure the GUI
	of the empty display.

	* app/display/gimpdisplayshell-callbacks.c: use the new appearance
	update function instead of doing it all here.

	* app/display/gimpdisplayshell-close.c
	* app/gui/gui-vtable.c: update the appearance when clearing or
	filling the display.

	* app/display/gimpdisplayshell-selection.c: forgot some guards
	against empty displays.


svn path=/trunk/; revision=25114
2008-03-18 22:21:47 +00:00
Michael Natterer cee3baea0f First draft of the "no image open" window, which is implemented as a
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
2008-03-18 21:22:21 +00:00
Sven Neumann 13104834a5 use g_timeout_source_new_seconds().
2007-10-31  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c
	(gimp_display_shell_close_dialog): use g_timeout_source_new_seconds().

svn path=/trunk/; revision=24016
2007-10-31 12:26:06 +00:00
Sven Neumann 207d8d1ee1 use GTK_STOCK_SAVE as icon for the message dialog.
2007-02-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c: use GTK_STOCK_SAVE as icon
	for the message dialog.

	* app/actions/data-commands.c (data_delete_cmd_callback): improved
	delete dialog.


svn path=/trunk/; revision=21928
2007-02-16 12:59:10 +00:00
Sven Neumann 87bbb162f9 round up to full hours for time periods over two hours.
2007-01-15  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c (gimp_time_since): round up
	to full hours for time periods over two hours.


svn path=/trunk/; revision=21714
2007-01-15 13:34:36 +00:00
Sven Neumann 6a6d5e2cf7 use ngettext() for the close dialog. Fixes bug #396513.
2007-01-15  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c: use ngettext() for the
	close dialog. Fixes bug #396513.


svn path=/trunk/; revision=21709
2007-01-15 10:03:18 +00:00
Sven Neumann 50fabff948 added new function gimp_ui_manager_activate_action() as a shortcut for
2006-12-15  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpuimanager.[ch]: added new function
	gimp_ui_manager_activate_action() as a shortcut for looking up the
	action and activating it.

	* app/actions/dialogs-actions.c
	* app/display/gimpdisplayshell-close.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c: use the new function.

	* app/actions/file-commands.c
	* app/dialogs/file-save-dialog.c: minor code cleanup.
2006-12-15 12:03:47 +00:00
Sven Neumann 7f6033fe72 app/actions/file-actions.c app/actions/file-commands.[ch] introduced new
2006-12-11  Sven Neumann  <sven@gimp.org>

	* app/actions/file-actions.c
	* app/actions/file-commands.[ch]
	* app/display/gimpdisplayshell-close.c: introduced new action
	'file-save-and-close' and moved display deletion there.
2006-12-11 20:33:01 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Sven Neumann 03b750a40e reduced precision of the display of time since the last change.
2006-04-03  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c: reduced precision of the
	display of time since the last change.
2006-04-03 10:13:41 +00:00
Sven Neumann 5439aa4995 did a global gdisp -> display substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gdisp -> display substitution.
2006-03-28 17:55:52 +00:00
Sven Neumann 905fdfcbed did a global gimage -> image substitution.
2006-03-28  Sven Neumann  <sven@gimp.org>

	* app/*: did a global gimage -> image substitution.
2006-03-28 17:08:36 +00:00