aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c14
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c18
2 files changed, 20 insertions, 12 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index a6259d69ab..aa42987caa 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -232,6 +232,7 @@ dialog_destroyed_cb (GtkWidget *dialog, gpointer user_data)
AlarmNotificationsDialog *
notified_alarms_dialog_new (void)
{
+ GtkWidget *container;
GtkWidget *edit_btn;
GtkWidget *snooze_btn;
GtkWidget *image;
@@ -298,8 +299,13 @@ notified_alarms_dialog_new (void)
G_CALLBACK (tree_selection_changed_cb), an);
gtk_widget_realize (an->dialog);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (an->dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (an->dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
+
image = e_builder_get_widget (an->builder, "alarm-image");
gtk_image_set_from_icon_name (
GTK_IMAGE (image), "stock_alarm", GTK_ICON_SIZE_DIALOG);
@@ -310,11 +316,7 @@ notified_alarms_dialog_new (void)
g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
-#if GTK_CHECK_VERSION(2,19,7)
if (!gtk_widget_get_realized (an->dialog))
-#else
- if (!GTK_WIDGET_REALIZED (an->dialog))
-#endif
gtk_widget_realize (an->dialog);
gtk_window_set_icon_name (GTK_WINDOW (an->dialog), "stock_alarm");
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 40853aa51b..afba3e4602 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -1654,6 +1654,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
static void
mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
{
+ GtkWidget *container;
GtkWidget *dialog;
GtkWidget *label;
@@ -1674,7 +1675,9 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
"configured to send an email. Evolution will display\n"
"a normal reminder dialog box instead."));
gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, TRUE, TRUE, 4);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (GTK_BOX (container), label, TRUE, TRUE, 4);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1684,7 +1687,10 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
static gboolean
procedure_notification_dialog (const gchar *cmd, const gchar *url)
{
- GtkWidget *dialog, *label, *checkbox;
+ GtkWidget *container;
+ GtkWidget *dialog;
+ GtkWidget *label;
+ GtkWidget *checkbox;
gchar *str;
gint btn;
@@ -1708,15 +1714,15 @@ procedure_notification_dialog (const gchar *cmd, const gchar *url)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- label, TRUE, TRUE, 4);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (GTK_BOX (container), label, TRUE, TRUE, 4);
g_free (str);
checkbox = gtk_check_button_new_with_label
(_("Do not ask me about this program again."));
gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- checkbox, TRUE, TRUE, 4);
+ gtk_box_pack_start (GTK_BOX (container), checkbox, TRUE, TRUE, 4);
/* Run the dialog */
btn = gtk_dialog_run (GTK_DIALOG (dialog));