[gimp/gimp-2-8] app: don't ask to confirm reverting "Untitled" when the image was imported (cherry picked from commi
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] app: don't ask to confirm reverting "Untitled" when the image was imported (cherry picked from commi
- Date: Fri, 13 Jul 2012 22:12:56 +0000 (UTC)
commit c3e904fab1b29224b7dd55bb5b4af49f34c3b335
Author: Michael Natterer <mitch gimp org>
Date: Sat Jul 14 00:11:17 2012 +0200
app: don't ask to confirm reverting "Untitled" when the image was imported
(cherry picked from commit b0170ee5ea57a05e6ea6958f33c1ee9a80a2cb97)
app/actions/file-commands.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index 830407d..127b2b1 100644
--- a/app/actions/file-commands.c
+++ b/app/actions/file-commands.c
@@ -378,8 +378,7 @@ file_revert_cmd_callback (GtkAction *action,
GimpDisplay *display;
GimpImage *image;
GtkWidget *dialog;
- const gchar *uri = NULL;
- const gchar *source = NULL;
+ const gchar *uri;
return_if_no_display (display, data);
image = gimp_display_get_image (display);
@@ -387,14 +386,11 @@ file_revert_cmd_callback (GtkAction *action,
uri = gimp_image_get_uri (image);
if (! uri)
- {
- uri = gimp_image_get_imported_uri (image);
- source = uri;
- }
+ uri = gimp_image_get_imported_uri (image);
dialog = g_object_get_data (G_OBJECT (image), REVERT_DATA_KEY);
- if (! uri && ! source)
+ if (! uri)
{
gimp_message_literal (image->gimp,
G_OBJECT (display), GIMP_MESSAGE_ERROR,
@@ -434,11 +430,7 @@ file_revert_cmd_callback (GtkAction *action,
G_CALLBACK (file_revert_confirm_response),
display);
- if (! source)
- basename = file_utils_uri_display_basename (uri);
- else
- basename = g_strdup (gimp_image_get_uri_or_untitled (image));
-
+ basename = file_utils_uri_display_basename (uri);
filename = file_utils_uri_display_name (uri);
gimp_message_box_set_primary_text (GIMP_MESSAGE_DIALOG (dialog)->box,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]