aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-31 03:03:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-08 23:05:26 +0800
commit72797decc12602b181f69dba7c54df7a0d1b9326 (patch)
treeecd1314c92bc26b59647b351b2d47e446f4ed21d /calendar/gui/dialogs
parent3ba0b61f9f447b01c3a83bfb78ee33a45d413700 (diff)
downloadgsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.gz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.bz2
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.lz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.xz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.zst
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.zip
Giant leap towards GSEAL compliance.
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c9
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c14
-rw-r--r--calendar/gui/dialogs/delete-comp.c8
-rw-r--r--calendar/gui/dialogs/event-editor.c12
-rw-r--r--calendar/gui/dialogs/event-page.c8
-rw-r--r--calendar/gui/dialogs/memo-page.c4
-rw-r--r--calendar/gui/dialogs/recur-comp.c7
-rw-r--r--calendar/gui/dialogs/recurrence-page.c42
-rw-r--r--calendar/gui/dialogs/schedule-page.c4
-rw-r--r--calendar/gui/dialogs/send-comp.c6
-rw-r--r--calendar/gui/dialogs/task-details-page.c19
-rw-r--r--calendar/gui/dialogs/task-editor.c5
-rw-r--r--calendar/gui/dialogs/task-page.c4
13 files changed, 92 insertions, 50 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index f7d5443da0..9fe23fe525 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -1209,6 +1209,7 @@ gboolean
alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
{
Dialog dialog;
+ GtkWidget *container;
gint response_id;
g_return_val_if_fail (alarm != NULL, FALSE);
@@ -1234,8 +1235,12 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
alarm_to_dialog (&dialog);
gtk_widget_ensure_style (dialog.toplevel);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->action_area), 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (dialog.toplevel));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog.toplevel));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
gtk_window_set_icon_name (
GTK_WINDOW (dialog.toplevel), "x-office-calendar");
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index c350b4774d..b8588d666d 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -261,6 +261,7 @@ gboolean
alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
{
Dialog dialog;
+ GtkWidget *container;
gint response_id;
dialog.ecal = ecal;
@@ -279,14 +280,19 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
sensitize_buttons (&dialog);
gtk_widget_ensure_style (dialog.toplevel);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->action_area), 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (dialog.toplevel));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog.toplevel));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
gtk_window_set_icon_name (
GTK_WINDOW (dialog.toplevel), "x-office-calendar");
- gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
- GTK_WINDOW (parent));
+ gtk_window_set_transient_for (
+ GTK_WINDOW (dialog.toplevel),
+ GTK_WINDOW (parent));
response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
gtk_widget_hide (dialog.toplevel);
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index be531314ee..ecdaf58762 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -166,12 +166,12 @@ delete_component_dialog (ECalComponent *comp,
}
static void
-cb_toggled_cb (GtkWidget *toggle, gpointer data)
+cb_toggled_cb (GtkToggleButton *toggle, gpointer data)
{
gboolean active = FALSE;
GtkWidget *entry = (GtkWidget *) data;
- active = GTK_TOGGLE_BUTTON (toggle)->active;
+ active = gtk_toggle_button_get_active (toggle);
gtk_widget_set_sensitive (entry, active);
}
@@ -208,8 +208,8 @@ prompt_retract_dialog (ECalComponent *comp, gchar **retract_text, GtkWidget *par
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
- gtk_box_set_spacing ((GtkBox *) (GTK_DIALOG (dialog)->vbox), 12);
- vbox = GTK_WIDGET (GTK_DIALOG (dialog)->vbox);
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_set_spacing (GTK_BOX (vbox), 12);
cb = gtk_check_button_new_with_mnemonic (_("_Delete this item from all other recipient's mailboxes?"));
gtk_container_add (GTK_CONTAINER (vbox), cb);
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 1a5f6d67fd..dd292eff99 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -108,6 +108,7 @@ create_schedule_page (CompEditor *editor)
EventEditorPrivate *priv;
ENameSelector *name_selector;
CompEditorPage *page;
+ GtkWidget *content_area;
priv = EVENT_EDITOR_GET_PRIVATE (editor);
@@ -115,6 +116,9 @@ create_schedule_page (CompEditor *editor)
_("Free/Busy"), GTK_WINDOW (editor), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
+ content_area =
+ gtk_dialog_get_content_area (GTK_DIALOG (priv->sched_window));
+
g_signal_connect (
priv->sched_window, "response",
G_CALLBACK (gtk_widget_hide), NULL);
@@ -125,7 +129,7 @@ create_schedule_page (CompEditor *editor)
priv->sched_page = schedule_page_new (priv->model, editor);
page = COMP_EDITOR_PAGE (priv->sched_page);
gtk_container_add (
- GTK_CONTAINER (GTK_DIALOG (priv->sched_window)->vbox),
+ GTK_CONTAINER (content_area),
comp_editor_page_get_widget (page));
name_selector = event_page_get_name_selector (priv->event_page);
@@ -267,6 +271,7 @@ event_editor_constructor (GType type,
CompEditorPage *page;
EventEditorPrivate *priv;
GtkActionGroup *action_group;
+ GtkWidget *content_area;
ECal *client;
gboolean is_meeting;
@@ -300,10 +305,13 @@ event_editor_constructor (GType type,
priv->recur_window, "delete-event",
G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+ content_area =
+ gtk_dialog_get_content_area (GTK_DIALOG (priv->recur_window));
+
priv->recur_page = recurrence_page_new (editor);
page = COMP_EDITOR_PAGE (priv->recur_page);
gtk_container_add (
- GTK_CONTAINER ((GTK_DIALOG (priv->recur_window)->vbox)),
+ GTK_CONTAINER (content_area),
comp_editor_page_get_widget (page));
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window)));
comp_editor_append_page (editor, page, NULL, FALSE);
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index a74cb64991..f3ae17db1e 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2133,6 +2133,7 @@ get_widgets (EventPage *epage)
EventPagePrivate *priv;
GSList *accel_groups;
GtkAction *action;
+ GtkWidget *parent;
GtkWidget *toplevel;
GtkWidget *sw;
@@ -2174,7 +2175,8 @@ get_widgets (EventPage *epage)
priv->attendees_label = GW ("attendees-label");
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
priv->categories = GW ("categories");
priv->categories_btn = GW ("categories-button");
@@ -2455,11 +2457,7 @@ safe_to_process_date_changed_signal (GtkWidget *dedit_widget)
entry = e_date_edit_get_entry (dedit);
-#if GTK_CHECK_VERSION(2,19,7)
return !entry || !gtk_widget_has_focus (entry);
-#else
- return !entry || !GTK_WIDGET_HAS_FOCUS (entry);
-#endif
}
/* Callback used when the start date widget change. We check that the
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 269caba5d6..b8567a615a 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -765,6 +765,7 @@ get_widgets (MemoPage *mpage)
MemoPagePrivate *priv;
GSList *accel_groups;
GtkWidget *toplevel;
+ GtkWidget *parent;
priv = mpage->priv;
@@ -784,7 +785,8 @@ get_widgets (MemoPage *mpage)
page->accel_group = g_object_ref (accel_groups->data);
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
priv->info_hbox = GW ("generic-info");
priv->info_icon = GW ("generic-info-image");
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index 0d9197546b..7793647723 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -40,6 +40,7 @@ recur_component_dialog (ECal *client,
gchar *str;
GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox;
GtkWidget *placeholder, *vbox;
+ GtkWidget *content_area;
ECalComponentVType vtype;
gboolean ret;
@@ -72,8 +73,10 @@ recur_component_dialog (ECal *client,
g_free (str);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
hbox = gtk_hbox_new (FALSE, 12);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (content_area), hbox);
placeholder = gtk_label_new ("");
gtk_widget_set_size_request (placeholder, 48, 48);
@@ -105,7 +108,7 @@ recur_component_dialog (ECal *client,
gtk_widget_show_all (hbox);
placeholder = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), placeholder, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), placeholder, FALSE, FALSE, 0);
gtk_widget_show (placeholder);
ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 578f98929c..bd2eea61e9 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -532,6 +532,7 @@ sensitize_recur_widgets (RecurrencePage *rpage)
CompEditor *editor;
CompEditorFlags flags;
gboolean recurs, sens = TRUE;
+ GtkWidget *child;
GtkWidget *label;
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage));
@@ -548,8 +549,9 @@ sensitize_recur_widgets (RecurrencePage *rpage)
else
gtk_widget_set_sensitive (priv->preview_calendar, TRUE && sens);
- if (GTK_BIN (priv->custom_warning_bin)->child)
- gtk_widget_destroy (GTK_BIN (priv->custom_warning_bin)->child);
+ child = gtk_bin_get_child (GTK_BIN (priv->custom_warning_bin));
+ if (child != NULL)
+ gtk_widget_destroy (child);
if (recurs && priv->custom) {
gtk_widget_set_sensitive (priv->params, FALSE);
@@ -681,7 +683,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
guint8 day_mask;
gint i;
- g_return_if_fail (GTK_BIN (priv->special)->child != NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->special)) != NULL);
g_return_if_fail (priv->weekday_picker != NULL);
g_return_if_fail (IS_WEEKDAY_PICKER (priv->weekday_picker));
@@ -717,7 +719,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
enum month_num_options month_num;
enum month_day_options month_day;
- g_return_if_fail (GTK_BIN (priv->special)->child != NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->special)) != NULL);
g_return_if_fail (priv->month_day_combo != NULL);
g_return_if_fail (GTK_IS_COMBO_BOX (priv->month_day_combo));
g_return_if_fail (priv->month_num_combo != NULL);
@@ -901,11 +903,7 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp)
e_cal_component_set_exdate_list (comp, list);
e_cal_component_free_exdate_list (list);
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_visible (priv->ending_combo) && gtk_widget_get_sensitive (priv->ending_combo) &&
-#else
- if (GTK_WIDGET_VISIBLE (priv->ending_combo) && GTK_WIDGET_IS_SENSITIVE (priv->ending_combo) &&
-#endif
e_dialog_combo_box_get (priv->ending_combo, ending_types_map) == ENDING_UNTIL) {
/* check whether the "until" date is in the future */
struct icaltimetype tt;
@@ -950,7 +948,7 @@ make_weekly_special (RecurrencePage *rpage)
priv = rpage->priv;
- g_return_if_fail (GTK_BIN (priv->special)->child == NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->special)) == NULL);
g_return_if_fail (priv->weekday_picker == NULL);
/* Create the widgets */
@@ -1228,7 +1226,7 @@ make_monthly_special (RecurrencePage *rpage)
priv = rpage->priv;
- g_return_if_fail (GTK_BIN (priv->special)->child == NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->special)) == NULL);
g_return_if_fail (priv->month_day_combo == NULL);
/* Create the widgets */
@@ -1282,6 +1280,7 @@ make_recurrence_special (RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
icalrecurrencetype_frequency frequency;
+ GtkWidget *child;
priv = rpage->priv;
@@ -1289,8 +1288,10 @@ make_recurrence_special (RecurrencePage *rpage)
gtk_widget_destroy (priv->month_num_combo);
priv->month_num_combo = NULL;
}
- if (GTK_BIN (priv->special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->special)->child);
+
+ child = gtk_bin_get_child (GTK_BIN (priv->special));
+ if (child != NULL) {
+ gtk_widget_destroy (child);
priv->weekday_picker = NULL;
priv->month_day_combo = NULL;
@@ -1345,7 +1346,7 @@ make_ending_until_special (RecurrencePage *rpage)
EDateEdit *de;
ECalComponentDateTime dt_start;
- g_return_if_fail (GTK_BIN (priv->ending_special)->child == NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->ending_special)) == NULL);
g_return_if_fail (priv->ending_date_edit == NULL);
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage));
@@ -1394,7 +1395,7 @@ make_ending_count_special (RecurrencePage *rpage)
priv = rpage->priv;
- g_return_if_fail (GTK_BIN (priv->ending_special)->child == NULL);
+ g_return_if_fail (gtk_bin_get_child (GTK_BIN (priv->ending_special)) == NULL);
g_return_if_fail (priv->ending_count_spin == NULL);
/* Create the widgets */
@@ -1435,11 +1436,13 @@ make_ending_special (RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
enum ending_type ending_type;
+ GtkWidget *child;
priv = rpage->priv;
- if (GTK_BIN (priv->ending_special)->child != NULL) {
- gtk_widget_destroy (GTK_BIN (priv->ending_special)->child);
+ child = gtk_bin_get_child (GTK_BIN (priv->ending_special));
+ if (child != NULL) {
+ gtk_widget_destroy (child);
priv->ending_date_edit = NULL;
priv->ending_count_spin = NULL;
@@ -1985,6 +1988,7 @@ get_widgets (RecurrencePage *rpage)
RecurrencePagePrivate *priv;
GSList *accel_groups;
GtkWidget *toplevel;
+ GtkWidget *parent;
priv = rpage->priv;
@@ -2002,7 +2006,8 @@ get_widgets (RecurrencePage *rpage)
page->accel_group = g_object_ref (accel_groups->data);
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
priv->recurs = GW ("recurs");
priv->params = GW ("params");
@@ -2096,7 +2101,8 @@ create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget **
*date_edit = comp_editor_new_date_edit (TRUE, FALSE, TRUE);
gtk_widget_show (*date_edit);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), *date_edit, FALSE, TRUE, 6);
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (GTK_BOX (container), *date_edit, FALSE, TRUE, 6);
return dialog;
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 2e13cba1b9..7cd177e410 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -307,6 +307,7 @@ get_widgets (SchedulePage *spage)
SchedulePagePrivate *priv;
GSList *accel_groups;
GtkWidget *toplevel;
+ GtkWidget *parent;
priv = spage->priv;
@@ -324,7 +325,8 @@ get_widgets (SchedulePage *spage)
page->accel_group = g_object_ref (accel_groups->data);
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
#undef GW
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index a42501c9d6..d69fd0bdc9 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -108,6 +108,7 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo
ECalComponentVType vtype;
const gchar *id;
GtkWidget *dialog, *sa_checkbox = NULL, *ona_checkbox = NULL;
+ GtkWidget *content_area;
gboolean res;
if (strip_alarms)
@@ -155,11 +156,12 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo
}
dialog = e_alert_dialog_new_for_args (parent, id, NULL);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
if (strip_alarms)
- sa_checkbox = add_checkbox (GTK_BOX (GTK_DIALOG (dialog)->vbox), _("Send my alarms with this event"));
+ sa_checkbox = add_checkbox (GTK_BOX (content_area), _("Send my alarms with this event"));
if (only_new_attendees)
- ona_checkbox = add_checkbox (GTK_BOX (GTK_DIALOG (dialog)->vbox), _("Notify new attendees _only"));
+ ona_checkbox = add_checkbox (GTK_BOX (content_area), _("Notify new attendees _only"));
res = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES;
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index c549633eb5..f84b07ecd3 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -448,6 +448,7 @@ get_widgets (TaskDetailsPage *tdpage)
TaskDetailsPagePrivate *priv;
GSList *accel_groups;
GtkWidget *toplevel;
+ GtkWidget *parent;
priv = tdpage->priv;
@@ -465,7 +466,8 @@ get_widgets (TaskDetailsPage *tdpage)
page->accel_group = g_object_ref (accel_groups->data);
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
priv->status_combo = GW ("status-combobox");
priv->priority_combo = GW ("priority-combobox");
@@ -661,6 +663,7 @@ static void
init_widgets (TaskDetailsPage *tdpage)
{
TaskDetailsPagePrivate *priv;
+ GtkAdjustment *adjustment;
priv = tdpage->priv;
@@ -677,13 +680,15 @@ init_widgets (TaskDetailsPage *tdpage)
/* Connect signals. The Status, Percent Complete & Date Completed
properties are closely related so whenever one changes we may need
to update the other 2. */
- g_signal_connect (GTK_COMBO_BOX (priv->status_combo),
- "changed",
- G_CALLBACK (status_changed), tdpage);
+ g_signal_connect (
+ GTK_COMBO_BOX (priv->status_combo), "changed",
+ G_CALLBACK (status_changed), tdpage);
- g_signal_connect((GTK_SPIN_BUTTON (priv->percent_complete)->adjustment),
- "value_changed",
- G_CALLBACK (percent_complete_changed), tdpage);
+ adjustment = gtk_spin_button_get_adjustment (
+ GTK_SPIN_BUTTON (priv->percent_complete));
+ g_signal_connect (
+ adjustment, "value_changed",
+ G_CALLBACK (percent_complete_changed), tdpage);
/* Priority */
g_signal_connect_swapped (
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 7aaa3c5afe..dcb7b86a2b 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -307,6 +307,7 @@ task_editor_init (TaskEditor *te)
CompEditor *editor = COMP_EDITOR (te);
GtkUIManager *ui_manager;
GtkActionGroup *action_group;
+ GtkWidget *content_area;
const gchar *id;
GError *error = NULL;
@@ -331,8 +332,10 @@ task_editor_init (TaskEditor *te)
G_CALLBACK(gtk_widget_hide), NULL);
te->priv->task_details_page = task_details_page_new (editor);
+ content_area = gtk_dialog_get_content_area (
+ GTK_DIALOG (te->priv->task_details_page));
gtk_container_add (
- GTK_CONTAINER (GTK_DIALOG (te->priv->task_details_window)->vbox),
+ GTK_CONTAINER (content_area),
comp_editor_page_get_widget ((CompEditorPage *) te->priv->task_details_page));
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (te->priv->task_details_window)));
comp_editor_append_page (
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 623260cf46..8ac3860fac 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1332,6 +1332,7 @@ get_widgets (TaskPage *tpage)
TaskPagePrivate *priv;
GSList *accel_groups;
GtkWidget *toplevel;
+ GtkWidget *parent;
GtkWidget *sw;
GtkTreeSelection *selection;
@@ -1349,7 +1350,8 @@ get_widgets (TaskPage *tpage)
page->accel_group = g_object_ref (accel_groups->data);
g_object_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+ parent = gtk_widget_get_parent (priv->main);
+ gtk_container_remove (GTK_CONTAINER (parent), priv->main);
priv->info_hbox = e_builder_get_widget (priv->builder, "generic-info");
priv->info_icon = e_builder_get_widget (priv->builder, "generic-info-image");