aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-05 09:18:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-05 09:18:15 +0800
commite9fe87ee9923aaa3bcb29e162d823267337ab274 (patch)
tree0d6c8e8c0a652c4f355a5ea7f203da52beb8747f /calendar
parent54b282cf4fbac0d4dfbbe90caa2a206eb088f76d (diff)
downloadgsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar.gz
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar.bz2
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar.lz
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar.xz
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.tar.zst
gsoc2013-evolution-e9fe87ee9923aaa3bcb29e162d823267337ab274.zip
Remove some obsolete utility functions.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c72
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c30
-rw-r--r--calendar/gui/dialogs/recurrence-page.c28
-rw-r--r--calendar/gui/dialogs/task-details-page.c30
4 files changed, 108 insertions, 52 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 5ac97f7a13..d72ad46759 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -175,7 +175,8 @@ clear_widgets (Dialog *dialog)
{
/* Sane defaults */
e_dialog_combo_box_set (dialog->action_combo, E_CAL_COMPONENT_ALARM_DISPLAY, action_map);
- e_dialog_spin_set (dialog->interval_value, 15);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->interval_value), 15);
e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map);
e_dialog_combo_box_set (dialog->relative_combo, BEFORE, relative_map);
e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
@@ -253,24 +254,33 @@ alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
e_cal_component_alarm_get_repeat (dialog->alarm, &repeat);
if ( repeat.repetitions ) {
- e_dialog_toggle_set (dialog->repeat_toggle, TRUE);
- e_dialog_spin_set (dialog->repeat_quantity, repeat.repetitions);
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (dialog->repeat_toggle), TRUE);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->repeat_quantity),
+ repeat.repetitions);
} else
return;
if ( repeat.duration.minutes ) {
e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_MINUTES, duration_units_map);
- e_dialog_spin_set (dialog->repeat_value, repeat.duration.minutes);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->repeat_value),
+ repeat.duration.minutes);
}
if ( repeat.duration.hours ) {
e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_HOURS, duration_units_map);
- e_dialog_spin_set (dialog->repeat_value, repeat.duration.hours);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->repeat_value),
+ repeat.duration.hours);
}
if ( repeat.duration.days ) {
e_dialog_combo_box_set (dialog->repeat_unit_combo, DUR_DAYS, duration_units_map);
- e_dialog_spin_set (dialog->repeat_value, repeat.duration.days);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->repeat_value),
+ repeat.duration.days);
}
}
@@ -279,27 +289,31 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
{
ECalComponentAlarmRepeat repeat;
- if (!e_dialog_toggle_get (dialog->repeat_toggle)) {
+ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->repeat_toggle))) {
repeat.repetitions = 0;
e_cal_component_alarm_set_repeat (alarm, repeat);
return;
}
- repeat.repetitions = e_dialog_spin_get_int (dialog->repeat_quantity);
+ repeat.repetitions = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->repeat_quantity));
memset (&repeat.duration, 0, sizeof (repeat.duration));
switch (e_dialog_combo_box_get (dialog->repeat_unit_combo, duration_units_map)) {
case DUR_MINUTES:
- repeat.duration.minutes = e_dialog_spin_get_int (dialog->repeat_value);
+ repeat.duration.minutes = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->repeat_value));
break;
case DUR_HOURS:
- repeat.duration.hours = e_dialog_spin_get_int (dialog->repeat_value);
+ repeat.duration.hours = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->repeat_value));
break;
case DUR_DAYS:
- repeat.duration.days = e_dialog_spin_get_int (dialog->repeat_value);
+ repeat.duration.days = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->repeat_value));
break;
default:
@@ -343,7 +357,8 @@ alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
if ( !(url && *url) )
return;
- e_dialog_toggle_set (dialog->aalarm_sound, TRUE);
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (dialog->aalarm_sound), TRUE);
gtk_file_chooser_set_uri (
GTK_FILE_CHOOSER (dialog->aalarm_file_chooser), url);
}
@@ -358,7 +373,8 @@ alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
e_cal_component_alarm_get_description (alarm, &description);
if (description.value) {
- e_dialog_toggle_set (dialog->dalarm_message, TRUE);
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (dialog->dalarm_message), TRUE);
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
gtk_text_buffer_set_text (text_buffer, description.value, -1);
}
@@ -635,16 +651,23 @@ populate_widgets_from_alarm (Dialog *dialog)
if ( trigger->u.rel_duration.days ) {
e_dialog_combo_box_set (dialog->value_units_combo, DAYS, value_map);
- e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.days);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->interval_value),
+ trigger->u.rel_duration.days);
} else if ( trigger->u.rel_duration.hours ) {
e_dialog_combo_box_set (dialog->value_units_combo, HOURS, value_map);
- e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.hours);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->interval_value),
+ trigger->u.rel_duration.hours);
} else if ( trigger->u.rel_duration.minutes ) {
e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map);
- e_dialog_spin_set (dialog->interval_value, trigger->u.rel_duration.minutes);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->interval_value),
+ trigger->u.rel_duration.minutes);
} else {
e_dialog_combo_box_set (dialog->value_units_combo, MINUTES, value_map);
- e_dialog_spin_set (dialog->interval_value, 0);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (dialog->interval_value), 0);
}
/* Repeat options */
@@ -693,17 +716,20 @@ dialog_to_alarm (Dialog *dialog)
switch (e_dialog_combo_box_get (dialog->value_units_combo, value_map)) {
case MINUTES:
trigger.u.rel_duration.minutes =
- e_dialog_spin_get_int (dialog->interval_value);
+ gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->interval_value));
break;
case HOURS:
trigger.u.rel_duration.hours =
- e_dialog_spin_get_int (dialog->interval_value);
+ gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->interval_value));
break;
case DAYS:
trigger.u.rel_duration.days =
- e_dialog_spin_get_int (dialog->interval_value);
+ gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (dialog->interval_value));
break;
default:
@@ -956,7 +982,7 @@ check_custom_sound (Dialog *dialog)
}
}
- sens = e_dialog_toggle_get (dialog->aalarm_sound) ? str && *str : TRUE;
+ sens = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->aalarm_sound)) ? str && *str : TRUE;
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens);
g_free (str);
@@ -995,7 +1021,7 @@ check_custom_message (Dialog *dialog)
gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
- sens = e_dialog_toggle_get (dialog->dalarm_message) ? str && *str : TRUE;
+ sens = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->dalarm_message)) ? str && *str : TRUE;
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens);
g_free (str);
@@ -1061,7 +1087,7 @@ check_custom_email (Dialog *dialog)
gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
- sens = (destinations != NULL) && (e_dialog_toggle_get (dialog->malarm_message) ? str && *str : TRUE);
+ sens = (destinations != NULL) && (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->malarm_message)) ? str && *str : TRUE);
gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens);
g_list_free (destinations);
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index d9bf73d5bf..e6023f94ed 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -271,7 +271,9 @@ hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *pref
static void
hide_completed_tasks_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
{
- calendar_config_set_hide_completed_tasks_value (e_dialog_spin_get_int (prefs->tasks_hide_completed_interval));
+ calendar_config_set_hide_completed_tasks_value (
+ gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (prefs->tasks_hide_completed_interval)));
}
static void
@@ -450,14 +452,18 @@ show_task_list_config (CalendarPrefsDialog *prefs)
/* Hide Completed Tasks. */
hide_completed_tasks = calendar_config_get_hide_completed_tasks ();
- e_dialog_toggle_set (prefs->tasks_hide_completed, hide_completed_tasks);
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (prefs->tasks_hide_completed),
+ hide_completed_tasks);
/* Hide Completed Tasks Units. */
units = calendar_config_get_hide_completed_tasks_units ();
e_dialog_combo_box_set (prefs->tasks_hide_completed_units, units, hide_completed_units_map);
/* Hide Completed Tasks Value. */
- e_dialog_spin_set (prefs->tasks_hide_completed_interval, calendar_config_get_hide_completed_tasks_value ());
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (prefs->tasks_hide_completed_interval),
+ calendar_config_get_hide_completed_tasks_value ());
gtk_widget_set_sensitive (prefs->tasks_hide_completed_interval, hide_completed_tasks);
gtk_widget_set_sensitive (prefs->tasks_hide_completed_units, hide_completed_tasks);
@@ -527,7 +533,9 @@ show_config (CalendarPrefsDialog *prefs)
e_dialog_combo_box_set (prefs->time_divisions, time_divisions, time_division_map);
/* Month View - Scroll by a week */
- e_dialog_toggle_set (prefs->month_scroll_by_week, calendar_config_get_month_scroll_by_week ());
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (prefs->month_scroll_by_week),
+ calendar_config_get_month_scroll_by_week ());
/* Task list */
show_task_list_config (prefs);
@@ -536,15 +544,21 @@ show_config (CalendarPrefsDialog *prefs)
show_alarms_config (prefs);
/* Other page */
- e_dialog_toggle_set (prefs->default_reminder, calendar_config_get_use_default_reminder ());
- e_dialog_spin_set (prefs->default_reminder_interval, calendar_config_get_default_reminder_interval ());
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (prefs->default_reminder),
+ calendar_config_get_use_default_reminder ());
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (prefs->default_reminder_interval),
+ calendar_config_get_default_reminder_interval ());
e_dialog_combo_box_set (prefs->default_reminder_units, calendar_config_get_default_reminder_units (), default_reminder_units_map);
/* Birthdays & Anniversaries reminder */
set = calendar_config_get_ba_reminder (&interval, &units);
- e_dialog_toggle_set (prefs->ba_reminder, set);
- e_dialog_spin_set (prefs->ba_reminder_interval, interval);
+ gtk_toggle_button_set_active (
+ GTK_TOGGLE_BUTTON (prefs->ba_reminder), set);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (prefs->ba_reminder_interval), interval);
e_dialog_combo_box_set (prefs->ba_reminder_units, units, default_reminder_units_map);
}
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 933924ba96..b2c5cf3e21 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -418,12 +418,13 @@ clear_widgets (RecurrencePage *rpage)
priv->month_day = MONTH_DAY_NTH;
g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_toggle_set (priv->recurs, FALSE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), FALSE);
g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_spin_set (priv->interval_value, 1);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->interval_value), 1);
g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
@@ -539,7 +540,7 @@ sensitize_recur_widgets (RecurrencePage *rpage)
if (flags & COMP_EDITOR_MEETING)
sens = flags & COMP_EDITOR_USER_ORG;
- recurs = e_dialog_toggle_get (priv->recurs);
+ recurs = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs));
/* We can't preview that well for instances right now */
if (e_cal_component_is_instance (priv->comp))
@@ -664,7 +665,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
/* Frequency, interval, week start */
r.freq = e_dialog_combo_box_get (priv->interval_unit_combo, freq_map);
- r.interval = e_dialog_spin_get_int (priv->interval_value);
+ r.interval = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (priv->interval_value));
r.week_start = ICAL_SUNDAY_WEEKDAY
+ calendar_config_get_week_start_day ();
@@ -801,7 +803,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
g_return_if_fail (priv->ending_count_spin != NULL);
g_return_if_fail (GTK_IS_SPIN_BUTTON (priv->ending_count_spin));
- r.count = e_dialog_spin_get_int (priv->ending_count_spin);
+ r.count = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (priv->ending_count_spin));
break;
case ENDING_UNTIL:
@@ -852,7 +855,7 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp)
priv = rpage->priv;
model = GTK_TREE_MODEL (priv->exception_list_store);
- recurs = e_dialog_toggle_get (priv->recurs);
+ recurs = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs));
if (recurs && priv->custom) {
/* We just keep whatever the component has currently */
@@ -1413,7 +1416,9 @@ make_ending_count_special (RecurrencePage *rpage)
/* Set the values */
- e_dialog_spin_set (priv->ending_count_spin, priv->ending_count);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->ending_count_spin),
+ priv->ending_count);
g_signal_connect_swapped (
adj, "value-changed",
@@ -1598,7 +1603,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
&& !e_cal_component_has_rrules (comp)
&& !e_cal_component_has_exrules (comp)) {
g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_toggle_set (priv->recurs, FALSE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), FALSE);
g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
sensitize_buttons (rpage);
@@ -1856,7 +1861,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* If we got here it means it is a simple recurrence */
g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_toggle_set (priv->recurs, TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), TRUE);
g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
sensitize_buttons (rpage);
@@ -1864,7 +1869,8 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_spin_set (priv->interval_value, r->interval);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->interval_value), r->interval);
g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
fill_ending_date (rpage, r);
@@ -1875,7 +1881,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
priv->custom = TRUE;
- e_dialog_toggle_set (priv->recurs, TRUE);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->recurs), TRUE);
g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
/* FIXME Desensitize recurrence page */
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 38faa99c0b..37a4b50627 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -269,10 +269,12 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Percent Complete. */
e_cal_component_get_percent (comp, &percent);
if (percent) {
- e_dialog_spin_set (priv->percent_complete, *percent);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), *percent);
} else {
/* FIXME: Could check if task is completed and set 100%. */
- e_dialog_spin_set (priv->percent_complete, 0);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 0);
}
/* Status. */
@@ -353,7 +355,8 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
priv = tdpage->priv;
/* Percent Complete. */
- percent = e_dialog_spin_get_int (priv->percent_complete);
+ percent = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (priv->percent_complete));
e_cal_component_set_percent (comp, &percent);
/* Status. */
@@ -547,7 +550,8 @@ date_changed_cb (EDateEdit *dedit,
e_dialog_combo_box_set (priv->status_combo,
ICAL_STATUS_NONE,
status_map);
- e_dialog_spin_set (priv->percent_complete, 0);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 0);
}
} else {
if (status != ICAL_STATUS_COMPLETED) {
@@ -555,7 +559,8 @@ date_changed_cb (EDateEdit *dedit,
ICAL_STATUS_COMPLETED,
status_map);
}
- e_dialog_spin_set (priv->percent_complete, 100);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 100);
}
comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), FALSE);
@@ -584,18 +589,22 @@ status_changed (GtkWidget *combo, TaskDetailsPage *tdpage)
status = e_dialog_combo_box_get (priv->status_combo, status_map);
if (status == ICAL_STATUS_NONE) {
- e_dialog_spin_set (priv->percent_complete, 0);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 0);
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
complete_date_changed (tdpage, 0, FALSE);
} else if (status == ICAL_STATUS_INPROCESS) {
- gint percent_complete = e_dialog_spin_get_int (priv->percent_complete);
+ gint percent_complete = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (priv->percent_complete));
if (percent_complete <= 0 || percent_complete >= 100)
- e_dialog_spin_set (priv->percent_complete, 50);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 50);
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
complete_date_changed (tdpage, 0, FALSE);
} else if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_spin_set (priv->percent_complete, 100);
+ gtk_spin_button_set_value (
+ GTK_SPIN_BUTTON (priv->percent_complete), 100);
ctime = time (NULL);
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
complete_date_changed (tdpage, ctime, TRUE);
@@ -625,7 +634,8 @@ percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage)
comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), TRUE);
- percent = e_dialog_spin_get_int (priv->percent_complete);
+ percent = gtk_spin_button_get_value_as_int (
+ GTK_SPIN_BUTTON (priv->percent_complete));
if (percent == 100) {
complete = TRUE;
ctime = time (NULL);