diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-07-04 15:28:59 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-07-04 15:28:59 +0800 |
commit | d0d4630a002e37e92d8c0fe3afe63db6fc7effe3 (patch) | |
tree | 7774db3db3705a5bd0565504868914a605d7555b | |
parent | bf9a3cc4fdb5f4c52901e74725c67888e26d272b (diff) | |
download | gsoc2013-evolution-d0d4630a002e37e92d8c0fe3afe63db6fc7effe3.tar.gz gsoc2013-evolution-d0d4630a002e37e92d8c0fe3afe63db6fc7effe3.tar.zst gsoc2013-evolution-d0d4630a002e37e92d8c0fe3afe63db6fc7effe3.zip |
Fix for bug #445526
svn path=/trunk/; revision=33753
-rw-r--r-- | calendar/ChangeLog | 12 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-list-dialog.c | 14 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-list-dialog.h | 1 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 18 |
4 files changed, 40 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ba7fdfcc0e..89ac0448f6 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,15 @@ +2007-07-02 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #445526 + + * gui/dialogs/alarm-list-dialog.h: (alarm_list_dialog_set_client): + * gui/dialogs/alarm-list-dialog.c: (alarm_list_dialog_set_client) + New function, need to be called when page source changed. + * gui/dialogs/event-page.c: (struct _EventPagePrivate), (init_widgets), + (event_page_init), (event_page_finalize), (source_changed_cb): + New private property alarm_list_dlg_widget points on dialog's box and + calling new callback in source_changed_cb. + 2007-06-18 Srinivasa Ragavan <sragavan@novell.com> ** Fix for bug #448223 from Gilles Dartiguelongue diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 803324b949..95850a089b 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -220,6 +220,20 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer data) sensitize_buttons (dialog); } +void +alarm_list_dialog_set_client (GtkWidget *dlg_box, ECal *client) +{ + Dialog *dialog; + + if (!dlg_box) return; + + dialog = g_object_get_data (G_OBJECT (dlg_box), "dialog"); + if (dialog) { + dialog->ecal = client; + sensitize_buttons (dialog); + } +} + /* Hooks the widget signals */ static void init_widgets (Dialog *dialog) diff --git a/calendar/gui/dialogs/alarm-list-dialog.h b/calendar/gui/dialogs/alarm-list-dialog.h index e59f5e46be..048b94f596 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.h +++ b/calendar/gui/dialogs/alarm-list-dialog.h @@ -33,6 +33,7 @@ G_BEGIN_DECLS gboolean alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store); GtkWidget *alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store); +void alarm_list_dialog_set_client (GtkWidget *dlg_box, ECal *client); G_END_DECLS diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 5ce9c90cb5..12b95739aa 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -154,6 +154,8 @@ struct _EventPagePrivate { same value, since 99% of events start and end in one timezone. */ gboolean sync_timezones; gboolean is_meeting; + + GtkWidget *alarm_list_dlg_widget; }; @@ -255,6 +257,8 @@ event_page_init (EventPage *epage) priv->sync_timezones = FALSE; priv->default_address = NULL; + + priv->alarm_list_dlg_widget = NULL; } static void @@ -303,7 +307,9 @@ event_page_finalize (GObject *object) priv->sod = NULL; } g_free (priv->old_summary); - + + priv->alarm_list_dlg_widget = NULL; + g_free (priv); epage->priv = NULL; @@ -2641,6 +2647,8 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) event_page_hide_options (epage); sensitize_widgets (epage); + + alarm_list_dialog_set_client (priv->alarm_list_dlg_widget, client); } } } @@ -2807,7 +2815,7 @@ init_widgets (EventPage *epage) icaltimezone *zone; char *menu_label = NULL; GtkTreeSelection *selection; - GtkWidget *w, *cus_item, *menu; + GtkWidget *cus_item, *menu; priv = epage->priv; @@ -2893,9 +2901,9 @@ init_widgets (EventPage *epage) /* Alarm dialog */ g_signal_connect (GTK_DIALOG (priv->alarm_dialog), "response", G_CALLBACK (gtk_widget_hide), priv->alarm_dialog); g_signal_connect (GTK_DIALOG (priv->alarm_dialog), "delete-event", G_CALLBACK (gtk_widget_hide), priv->alarm_dialog); - w = alarm_list_dialog_peek (priv->client, priv->alarm_list_store); - gtk_widget_reparent (w, priv->alarm_box); - gtk_widget_show_all (w); + priv->alarm_list_dlg_widget = alarm_list_dialog_peek (priv->client, priv->alarm_list_store); + gtk_widget_reparent (priv->alarm_list_dlg_widget, priv->alarm_box); + gtk_widget_show_all (priv->alarm_list_dlg_widget); gtk_widget_hide (priv->alarm_dialog); gtk_window_set_modal (GTK_WINDOW (priv->alarm_dialog), TRUE); |