[gnome-calendar] edit-dialog: don't open with summary entry empty



commit 0749520a3574d8f6c658b8295e5df03d25cedd0b
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Sat Dec 20 23:55:21 2014 -0500

    edit-dialog: don't open with summary entry empty

 src/gcal-edit-dialog.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 443d890..10077aa 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -892,8 +892,10 @@ gcal_edit_dialog_set_event_data (GcalEditDialog *dialog,
   /* Load new event data */
   /* summary */
   e_cal_component_get_summary (priv->component, &e_summary);
-  gtk_entry_set_text (GTK_ENTRY (priv->summary_entry),
-                      e_summary.value != NULL ? e_summary.value : "");
+  if (e_summary.value == NULL || g_strcmp0 (e_summary.value, "") == 0)
+    gtk_entry_set_text (GTK_ENTRY (priv->summary_entry), _("Unnamed event"));
+  else
+    gtk_entry_set_text (GTK_ENTRY (priv->summary_entry), e_summary.value);
 
   /* dialog titlebar's title & subtitle */
   extension = E_SOURCE_SELECTABLE (e_source_get_extension (data->source, E_SOURCE_EXTENSION_CALENDAR));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]