aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-04-15 11:11:34 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-04-15 11:11:34 -0500
commit61af48e621e774b774f9c7f61e8a972ab8201f15 (patch)
treeafa8e8a614b8d42afa5fe0f2b51ce34ab72e5292 /src
parentdd8adf4fd9ad60b0fc615a4cea7e57602b5afddf (diff)
downloadayatana-indicator-datetime-61af48e621e774b774f9c7f61e8a972ab8201f15.tar.gz
ayatana-indicator-datetime-61af48e621e774b774f9c7f61e8a972ab8201f15.tar.bz2
ayatana-indicator-datetime-61af48e621e774b774f9c7f61e8a972ab8201f15.zip
copyediting: fix indentation/formatting
Diffstat (limited to 'src')
-rw-r--r--src/engine-eds.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp
index 8a105a6..da93206 100644
--- a/src/engine-eds.cpp
+++ b/src/engine-eds.cpp
@@ -412,64 +412,64 @@ private:
if ((vtype == E_CAL_COMPONENT_EVENT) || (vtype == E_CAL_COMPONENT_TODO))
{
- const gchar* uid = nullptr;
- e_cal_component_get_uid(component, &uid);
-
- auto status = ICAL_STATUS_NONE;
- e_cal_component_get_status(component, &status);
-
- if ((uid != nullptr) &&
- (status != ICAL_STATUS_COMPLETED) &&
- (status != ICAL_STATUS_CANCELLED))
- {
- Appointment appointment;
-
- ECalComponentText text;
- text.value = nullptr;
- e_cal_component_get_summary(component, &text);
- if (text.value)
- appointment.summary = text.value;
-
- appointment.begin = DateTime(begin);
- appointment.end = DateTime(end);
- appointment.color = subtask->color;
- appointment.uid = uid;
-
- // if the component has display alarms that have a url,
- // snag it for our Appointment.url
- auto alarm_uids = e_cal_component_get_alarm_uids(component);
- appointment.has_alarms = alarm_uids != nullptr;
- for(auto walk=alarm_uids; appointment.url.empty() && walk!=nullptr; walk=walk->next)
- {
- auto alarm = e_cal_component_get_alarm(component, static_cast<const char*>(walk->data));
-
- ECalComponentAlarmAction action;
- e_cal_component_alarm_get_action(alarm, &action);
- if (action == E_CAL_COMPONENT_ALARM_DISPLAY)
- {
- icalattach* attach = nullptr;
- e_cal_component_alarm_get_attach(alarm, &attach);
- if (attach != nullptr)
- {
- if (icalattach_get_is_url (attach))
- {
- const char* url = icalattach_get_url(attach);
- if (url != nullptr)
- appointment.url = url;
- }
-
- icalattach_unref(attach);
- }
- }
-
- e_cal_component_alarm_free(alarm);
- }
- cal_obj_uid_list_free(alarm_uids);
-
- g_debug("adding appointment '%s' '%s'", appointment.summary.c_str(), appointment.url.c_str());
- subtask->task->appointments.push_back(appointment);
- }
- }
+ const gchar* uid = nullptr;
+ e_cal_component_get_uid(component, &uid);
+
+ auto status = ICAL_STATUS_NONE;
+ e_cal_component_get_status(component, &status);
+
+ if ((uid != nullptr) &&
+ (status != ICAL_STATUS_COMPLETED) &&
+ (status != ICAL_STATUS_CANCELLED))
+ {
+ Appointment appointment;
+
+ ECalComponentText text;
+ text.value = nullptr;
+ e_cal_component_get_summary(component, &text);
+ if (text.value)
+ appointment.summary = text.value;
+
+ appointment.begin = DateTime(begin);
+ appointment.end = DateTime(end);
+ appointment.color = subtask->color;
+ appointment.uid = uid;
+
+ // if the component has display alarms that have a url,
+ // use the first one as our Appointment.url
+ auto alarm_uids = e_cal_component_get_alarm_uids(component);
+ appointment.has_alarms = alarm_uids != nullptr;
+ for(auto walk=alarm_uids; appointment.url.empty() && walk!=nullptr; walk=walk->next)
+ {
+ auto alarm = e_cal_component_get_alarm(component, static_cast<const char*>(walk->data));
+
+ ECalComponentAlarmAction action;
+ e_cal_component_alarm_get_action(alarm, &action);
+ if (action == E_CAL_COMPONENT_ALARM_DISPLAY)
+ {
+ icalattach* attach = nullptr;
+ e_cal_component_alarm_get_attach(alarm, &attach);
+ if (attach != nullptr)
+ {
+ if (icalattach_get_is_url (attach))
+ {
+ const char* url = icalattach_get_url(attach);
+ if (url != nullptr)
+ appointment.url = url;
+ }
+
+ icalattach_unref(attach);
+ }
+ }
+
+ e_cal_component_alarm_free(alarm);
+ }
+ cal_obj_uid_list_free(alarm_uids);
+
+ g_debug("adding appointment '%s' '%s'", appointment.summary.c_str(), appointment.url.c_str());
+ subtask->task->appointments.push_back(appointment);
+ }
+ }
return G_SOURCE_CONTINUE;
}