aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-09-02 22:51:39 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2011-09-06 04:37:41 +0800
commitaada5fcf8f175bf5efa86b304f5db29ac4675e73 (patch)
tree3dac9b970e6a421e2b0f295730e9b26642674ac9 /src
parent7e16cb64dbb1acb2a3d7e79fc46e565dadeb6bde (diff)
downloadgsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar.gz
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar.bz2
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar.lz
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar.xz
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.tar.zst
gsoc2013-epiphany-aada5fcf8f175bf5efa86b304f5db29ac4675e73.zip
Display a notification if the web application saving fails
https://bugzilla.gnome.org/show_bug.cgi?id=658060
Diffstat (limited to 'src')
-rw-r--r--src/window-commands.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index e29e74907..286f8904b 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -577,25 +577,29 @@ dialog_save_as_application_response_cb (GtkDialog *dialog,
gtk_entry_get_text (GTK_ENTRY (data->entry)),
gtk_image_get_pixbuf (GTK_IMAGE (data->image)));
if (desktop_file)
- {
message = g_strdup_printf (_("The application '%s' is ready to be used"),
gtk_entry_get_text (GTK_ENTRY (data->entry)));
+ else
+ message = g_strdup_printf (_("The application '%s' could not be created"),
+ gtk_entry_get_text (GTK_ENTRY (data->entry)));
+
+ notification = notify_notification_new (message,
+ NULL, NULL);
+ g_free (message);
- notification = notify_notification_new (message,
- NULL, NULL);
- g_free (message);
+ if (desktop_file) {
notify_notification_add_action (notification, "launch", _("Launch"),
(NotifyActionCallback)notify_launch_cb,
g_path_get_basename (desktop_file),
NULL);
notify_notification_set_icon_from_pixbuf (notification, gtk_image_get_pixbuf (GTK_IMAGE (data->image)));
- notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT);
- notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
- notify_notification_set_hint (notification, "transient", g_variant_new_boolean (TRUE));
- notify_notification_show (notification, NULL);
-
g_free (desktop_file);
}
+
+ notify_notification_set_timeout (notification, NOTIFY_EXPIRES_DEFAULT);
+ notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
+ notify_notification_set_hint (notification, "transient", g_variant_new_boolean (TRUE));
+ notify_notification_show (notification, NULL);
}
ephy_application_dialog_data_free (data);