[gnome-calendar] edit-dialog: hide Delete button when creating a new event
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] edit-dialog: hide Delete button when creating a new event
- Date: Fri, 5 Dec 2014 02:42:02 +0000 (UTC)
commit 8f4d6be1bf1b108f6e7233075a3bbfe88628aa38
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 5 00:41:34 2014 -0200
edit-dialog: hide Delete button when creating a new event
Because we don't want to delete an event that is not created
src/gcal-edit-dialog.c | 1 +
src/gcal-window.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index e437632..f7d0ab0 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -646,6 +646,7 @@ gcal_edit_dialog_set_event_is_new (GcalEditDialog *dialog,
priv = gcal_edit_dialog_get_instance_private (dialog);
priv->event_is_new = event_is_new;
+ gtk_widget_set_visible (GTK_WIDGET (priv->delete_button), !event_is_new);
}
void
diff --git a/src/gcal-window.c b/src/gcal-window.c
index b253766..f79bee3 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -713,6 +713,9 @@ event_activated (GcalView *view,
init_edit_dialog (GCAL_WINDOW (user_data));
data = gcal_event_widget_get_data (event_widget);
+ gcal_edit_dialog_set_event_is_new (
+ GCAL_EDIT_DIALOG (priv->edit_dialog),
+ FALSE);
gcal_edit_dialog_set_event_data (
GCAL_EDIT_DIALOG (priv->edit_dialog),
data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]