[gnome-photos/gnome-3-16] delete-notification: Improve the message
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-16] delete-notification: Improve the message
- Date: Thu, 12 Mar 2015 14:37:18 +0000 (UTC)
commit ea31a8133ffa7de266ba5eaccda5cce9edcd78e0
Author: Siddha Ganju <siddhaganju gmail com>
Date: Tue Mar 10 18:26:03 2015 -0400
delete-notification: Improve the message
https://bugzilla.gnome.org/show_bug.cgi?id=745756
src/photos-delete-notification.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-delete-notification.c b/src/photos-delete-notification.c
index 17dba63..13ccd96 100644
--- a/src/photos-delete-notification.c
+++ b/src/photos-delete-notification.c
@@ -123,6 +123,7 @@ photos_delete_notification_constructed (GObject *object)
{
PhotosDeleteNotification *self = PHOTOS_DELETE_NOTIFICATION (object);
PhotosDeleteNotificationPrivate *priv = self->priv;
+ gchar *msg;
GtkWidget *close;
GtkWidget *image;
GtkWidget *label;
@@ -132,11 +133,20 @@ photos_delete_notification_constructed (GObject *object)
G_OBJECT_CLASS (photos_delete_notification_parent_class)->constructed (object);
length = g_list_length (priv->items);
- label = gtk_label_new (ngettext ("Selected item has been deleted",
- "Selected items have been deleted",
- length));
+ if (length == 1)
+ {
+ const gchar *name;
+
+ name = photos_base_item_get_name_with_fallback (PHOTOS_BASE_ITEM (priv->items->data));
+ msg = g_strdup_printf ("ā%sā deleted", name);
+ }
+ else
+ msg = g_strdup_printf (ngettext ("%d item deleted", "%d items deleted", length), length);
+
+ label = gtk_label_new (msg);
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (self), label);
+ g_free (msg);
undo = gtk_button_new_with_label (_("Undo"));
gtk_widget_set_valign (undo, GTK_ALIGN_CENTER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]