[gnome-calendar/date-selector] edit-dialog: requires date format for construct
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/date-selector] edit-dialog: requires date format for construct
- Date: Mon, 22 Dec 2014 15:02:44 +0000 (UTC)
commit 50fc5a16376236577b9ab805d9d7e27520767b8b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Dec 22 13:02:34 2014 -0200
edit-dialog: requires date format for construct
Neccessary to pass it to GcalDateSelector & GcalTimeSelector without having to search the value again.
src/gcal-edit-dialog.c | 7 ++++++-
src/gcal-edit-dialog.h | 2 +-
src/gcal-window.c | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 2eb59e4..25bdd33 100644
--- a/src/gcal-edit-dialog.c
+++ b/src/gcal-edit-dialog.c
@@ -65,6 +65,7 @@ typedef struct
ECalComponent *component;
/* flags */
+ gboolean format_24h;
gboolean event_is_new;
gboolean setting_event;
} GcalEditDialogPrivate;
@@ -809,14 +810,18 @@ gcal_edit_dialog_all_day_changed (GtkWidget *widget,
/* Public API */
GtkWidget*
-gcal_edit_dialog_new (void)
+gcal_edit_dialog_new (gboolean format_24h)
{
GtkWidget *dialog;
+ GcalEditDialogPrivate *priv;
dialog = g_object_new (GCAL_TYPE_EDIT_DIALOG, NULL);
+ priv = gcal_edit_dialog_get_instance_private (GCAL_EDIT_DIALOG (dialog));
+
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+ priv->format_24h = format_24h;
return dialog;
}
diff --git a/src/gcal-edit-dialog.h b/src/gcal-edit-dialog.h
index 4e43274..9b4524e 100644
--- a/src/gcal-edit-dialog.h
+++ b/src/gcal-edit-dialog.h
@@ -54,7 +54,7 @@ struct _GcalEditDialogClass
GType gcal_edit_dialog_get_type (void);
-GtkWidget* gcal_edit_dialog_new (void);
+GtkWidget* gcal_edit_dialog_new (gboolean format_24h);
void gcal_edit_dialog_set_event_is_new (GcalEditDialog *dialog,
gboolean event_is_new);
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 33864b2..adb440f 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -1237,7 +1237,7 @@ gcal_window_constructed (GObject *object)
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (priv->calendars_button), G_MENU_MODEL
(priv->calendar_menu));
/* edit dialog initialization */
- priv->edit_dialog = gcal_edit_dialog_new ();
+ priv->edit_dialog = gcal_edit_dialog_new (use_24h_format);
gtk_window_set_transient_for (GTK_WINDOW (priv->edit_dialog), GTK_WINDOW (object));
gcal_edit_dialog_set_manager (GCAL_EDIT_DIALOG (priv->edit_dialog), priv->manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]