Commit Graph

94 Commits

Author SHA1 Message Date
Jehan f44fb1ece4 app: more gimp_unit_get_scaled_digits() usage.
The print size displayed in image property and title format should use
gimp_unit_get_scaled_digits() instead of gimp_unit_get_digits() and
adding 1, which is quite random or magic number-y.
2017-01-24 00:28:33 +01:00
Michael Natterer e69bb90197 app: show the image's "is color managed" state in the window title string
Instead of the profile name, print "(not color managed)".
2016-05-08 19:53:16 +02:00
Michael Natterer 5f8b6ce8da app: s/gimp_babl_get_description/gimp_babl_format_get_description/ 2016-04-15 19:19:09 +01:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 281a529b0c app: use gimp_color_managed_get_color_profile()
instead of gimp_image_get_color_profile() and remove all fallback
code, GimpColorManaged always returns a profile.
2015-05-30 00:58:22 +02:00
Michael Natterer e06a620d11 app: rename gimp_image_get_profile() to _get_color_profile() 2015-05-30 00:47:13 +02:00
Joao S. O. Bueno 2746544328 Add new codes for title bar: '%e' for offsets, '%r' for rotation 2015-01-29 11:06:54 -02:00
Michael Natterer 53f4dda3b4 Bug 735894 - Option to display the image ICC profile...
...on the title bar and status bar

Implement %o for the title and status format strings, which expands
to the image profile's label.
2014-09-03 22:20:36 +02:00
Michael Natterer a6339dccd2 app: clenup and fixes in gimp_display_shell_format_title()
Get the active drawable once instead of several times and always check
if it exists before using it. Also fix an xres/yres confusion.
2014-04-21 16:15:49 +02:00
João S. O. Bueno bb172b52c8 Implements Title bar codes for Layer dimensions
Implements codes %x, %y and %X, %Y to display
a layer's size in title and status bars
for image windows.
Addresses request at bug #728493
2014-04-21 00:30:49 -03:00
Michael Natterer 220b28677b Bug 676566 - Window title becomes "Untitled" after exporting without saving
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().

Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.

Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.
2012-07-17 22:52:49 +02:00
Michael Natterer 20f3cba2b6 app: rename gimp_image_base_type() to gimp_image_get_base_type() 2012-05-07 21:57:33 +02:00
Michael Natterer 7f8c6c475f app: show the precision in the image title string for %t 2012-05-02 17:51:11 +02:00
Michael Natterer e737bf77fa app: add gimp-babl.[ch] and move Babl specific code there 2012-05-02 17:51:08 +02:00
Michael Natterer 310c1bfb71 app: add gimp_babl_get_description()
which keeps around human readable and translatable strings for Babl
formats, as replacement for the to-be-obsoleted image type etc. enum
descriptions.
2012-05-02 17:51:03 +02:00
Michael Natterer 9781aa65ea Bug 658467 - Replace g_format_size_for_display() by g_format_size()
Use g_format_size() instead of g_format_size_for_display() because
the latter is deprecated.
2011-11-30 23:37:55 +01:00
Martin Nordholts 366cddc856 app: gimp_image_get/set_imported/exported/save_a_copy_uri()
Add more proper core API for GimpImage URI management.
2011-02-02 22:28:46 +01:00
Martin Nordholts 8d61a61c0e app: Remove GIMP_FILE_EXPORT_TO_URI_KEY
Remove GIMP_FILE_EXPORT_TO_URI_KEY which is always identical to
GIMP_FILE_EXPORT_URI_KEY.
2011-02-02 22:28:46 +01:00
Martin Nordholts ac773489e4 app: gimp_image_get_uri() -> gimp_image_get_uri_or_untitled() 2011-01-26 07:55:14 +01:00
Mukund Sivaraman 14f9074675 Remove unused code 2010-09-30 23:01:33 +05:30
Sven Neumann 2a67bfcb10 app: document the new display title option 2010-09-30 10:14:43 +02:00
Mukund Sivaraman f03cf53e0c Convert tabs to spaces in last commit 2010-09-30 12:54:26 +05:30
Mukund Sivaraman fee8f4008e Avoid overflow in expression 2010-09-30 12:47:19 +05:30
Bogdan Szczurek aa47dd22f0 app: Support 'M' for 'megapixels' in image title format string 2010-09-30 08:07:20 +02:00
Michael Natterer 0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer 23cd244c65 Make display->instance private, add an accessor and use it everywhere 2009-10-06 09:16:46 +02:00
Michael Natterer 35588efaa1 Remove "gimp-" prefix from the shell's "icon" and "title" properties
The prefix was needed because GtkWindow also has "icon" and "title"
properties.
2009-09-29 22:20:12 +02:00
Michael Natterer 660c333b55 Add "title" and "status" properties to GimpSisplayShell
Set the properties when updating title and status. In GimpImageWindow,
connect to notifications of the properties to update window title and
statusbar.
2009-09-28 22:55:39 +02:00
Michael Natterer 5112bc497d Remove gimp_display_shell_title() because it was completely empty 2009-09-28 22:55:39 +02:00
Michael Natterer 10b98034d4 Move the statusbar to GimpImageWindow
As with the menubar, port some code properly, and add some
horrible /* FIXME image window */ hacks to make it work.
2009-09-28 22:55:38 +02:00
Michael Natterer 13ac22d800 Add %T which expends to the active drawable's type
This is not really generally useful, but I needed it for debugging and
it doesn't hurt.
2009-09-08 19:46:19 +02:00
Michael Natterer 7805bd2186 Use the new item counting functions where appropriate 2009-08-02 12:24:06 +02:00
Martin Nordholts 1c0dea5772 app: Use gtk_window_set_title() instead of gdk_window_set_title()
Get rid of the last calls to gdk_window_set_title() and instead use
gdk_window_set_title(). The gdk_window_set_title() calls in
gimpdisplayshell-title.c is a legacy from the initial import of the
project.
2009-07-20 13:16:28 +02:00
Michael Natterer 4da5ed3a8b Use gtk_widget_get_window() instead of widget->window 2009-07-15 15:02:31 +02:00
Martin Nordholts 8e7c19b76c app: Clarify gimp_display_shell_format_filename()
Clarify gimp_display_shell_format_filename() by using booleans with
nice names in the if conditions.
2009-07-10 19:28:18 +02:00
Martin Nordholts 27f12b2505 app: Cleanup gimp_display_shell_format_filename() 2009-07-05 23:58:55 +02:00
Martin Nordholts 073d026f6c app: Show "(overwritten)" and "(exported)" status of image
When an import source has been overwritten with File -> Overwrite
<file.png>, or exported by whatever means, reflect this status in the
title bar of the image window. Do this by adding some string building
logic to gimp_display_shell_format_filename().
2009-07-05 09:28:52 +02:00
Martin Nordholts c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
Martin Nordholts ed9c12d1e7 app: Put "[<filename>] (imported)" in window title for imported files
Put "[<filename>] (imported)" in window title for imported files
instead of "Untitled (imported from <filename>)".
2009-07-02 22:17:35 +02:00
Sven Neumann d603b391c8 app: improved internationalisation, added translator comment 2009-05-16 14:58:02 +02:00
Martin Nordholts 88e1064ed3 app: Show imported image basename in titlebar
If an image is imported, make the image window title be
'Untitled (imported from <filename>)' instead of just 'Untitled'.
2009-05-16 01:12:40 +02:00
Sven Neumann b853a9bccb reverted last change. It's not helpful to use different strings for the
2009-02-02  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-title.c: reverted last change. 
It's
	not helpful to use different strings for the same information 
and
	space is not crucial in the window title.


svn path=/trunk/; revision=27979
2009-02-02 11:00:38 +00:00
Martin Nordholts 9e8b47b5d4 Use dedicated image type strings in the image window title
Use the dedicated image type strings for the image window title, the
enum value strings are too verbose.

svn path=/trunk/; revision=27978
2009-02-01 19:49:40 +00:00
Sven Neumann b25b979fc9 removed gimp_image_get_type_string() again.
2009-01-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: removed gimp_image_get_type_string()
	again.
	
	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use the GimpImageBaseType 
enum
	instead.

	* app/tools/gimptool.c (gimp_tool_oper_update): if the image is
	empty and the tool can't handle that, display a message in the
	statusbar telling the user about this.


svn path=/trunk/; revision=27970
2009-01-29 21:32:30 +00:00
Martin Nordholts 3b79e36d30 New method to get a string representation of the image type.
* app/core/gimpimage.[ch] (gimp_image_get_type_string): New method
to get a string representation of the image type.

* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): Ask the GimpImage for an image
type string instead of making assumptions about its
implementation.

svn path=/trunk/; revision=27947
2009-01-25 19:21:52 +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
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