[gimp] app: Add and use gimp_image_get_string_untitled()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Add and use gimp_image_get_string_untitled()
- Date: Wed, 2 Feb 2011 21:45:07 +0000 (UTC)
commit d4493175011bf5fec0ed57bf29d966267b8d41b9
Author: Martin Nordholts <martinn src gnome org>
Date: Wed Jan 26 18:32:17 2011 +0100
app: Add and use gimp_image_get_string_untitled()
app/core/gimpimage.c | 14 +++++++++++++-
app/core/gimpimage.h | 2 ++
app/widgets/gimpfiledialog.c | 4 ++--
3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 5b234f3..4c0a87c 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1518,6 +1518,18 @@ gimp_image_take_uri (GimpImage *image,
}
/**
+ * gimp_image_get_untitled_string:
+ *
+ * Returns: The (translated) "Untitled" string for newly created
+ * images.
+ **/
+const gchar *
+gimp_image_get_string_untitled (void)
+{
+ return _("Untitled");
+}
+
+/**
* gimp_image_get_uri_or_untitled:
* @image: A #GimpImage.
*
@@ -1534,7 +1546,7 @@ gimp_image_get_uri_or_untitled (const GimpImage *image)
uri = gimp_image_get_uri (image);
- return uri ? uri : _("Untitled");
+ return uri ? uri : gimp_image_get_string_untitled ();
}
/**
diff --git a/app/core/gimpimage.h b/app/core/gimpimage.h
index 6d7cf91..912c734 100644
--- a/app/core/gimpimage.h
+++ b/app/core/gimpimage.h
@@ -473,5 +473,7 @@ gboolean gimp_image_coords_in_active_pickable (GimpImage *image,
void gimp_image_invalidate_previews (GimpImage *image);
+const gchar * gimp_image_get_string_untitled (void);
+
#endif /* __GIMP_IMAGE_H__ */
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index deace29..8e75215 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -566,7 +566,7 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
GIMP_FILE_IMPORT_SOURCE_URI_KEY);
if (! name_uri)
- name_uri = gimp_image_get_uri_or_untitled (image);
+ name_uri = gimp_image_get_string_untitled ();
/* Priority of default type/extension for Save:
@@ -637,7 +637,7 @@ gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
GIMP_FILE_IMPORT_SOURCE_URI_KEY);
if (! name_uri)
- name_uri = gimp_image_get_uri_or_untitled (image);
+ name_uri = gimp_image_get_string_untitled ();
/* Priority of default type/extension for Export:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]