aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-30 18:33:14 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-30 18:33:14 -0600
commita7a09a5ca5012fb1c48f259d2587542316e7349b (patch)
treee6ac38cfefcbb049e4f77c1d546abc806e0389c9 /src
parent8564861a5026561d94310cd60ed77e3986f64246 (diff)
downloadayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.tar.gz
ayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.tar.bz2
ayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.zip
copyediting: as per review, use name_of_thing() instead of get_name_of_thing() or getNameOfThing()
Diffstat (limited to 'src')
-rw-r--r--src/actions.cpp4
-rw-r--r--src/clock-live.cpp6
-rw-r--r--src/clock.cpp22
-rw-r--r--src/formatter-desktop.cpp4
-rw-r--r--src/formatter.cpp12
-rw-r--r--src/menu.cpp14
-rw-r--r--src/planner-eds.cpp2
7 files changed, 32 insertions, 32 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index cdeb77f..d6fa698 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -146,7 +146,7 @@ GVariant* create_default_header_state()
GVariant* create_calendar_state(const std::shared_ptr<State>& state)
{
gboolean days[32] = { 0 };
- for (const auto& appt : state->planner->thisMonth.get())
+ for (const auto& appt : state->planner->this_month.get())
days[appt.begin.day_of_month()] = true;
GVariantBuilder day_builder;
@@ -222,7 +222,7 @@ Actions::Actions(const std::shared_ptr<State>& state):
m_state->planner->time.changed().connect([this](const DateTime&){
update_calendar_state();
});
- m_state->planner->thisMonth.changed().connect([this](const std::vector<Appointment>&){
+ m_state->planner->this_month.changed().connect([this](const std::vector<Appointment>&){
update_calendar_state();
});
m_state->settings->show_week_numbers.changed().connect([this](bool){
diff --git a/src/clock-live.cpp b/src/clock-live.cpp
index 7c9db40..21a18a3 100644
--- a/src/clock-live.cpp
+++ b/src/clock-live.cpp
@@ -95,7 +95,7 @@ private:
{
g_clear_pointer(&m_timezone, g_time_zone_unref);
m_timezone = g_time_zone_new(str.c_str());
- m_owner.minuteChanged();
+ m_owner.minute_changed();
}
/***
@@ -109,9 +109,9 @@ private:
// maybe emit change signals
const auto now = localtime();
if (!DateTime::is_same_minute(m_prev_datetime, now))
- m_owner.minuteChanged();
+ m_owner.minute_changed();
if (!DateTime::is_same_day(m_prev_datetime, now))
- m_owner.dateChanged();
+ m_owner.date_changed();
// queue up a timer to fire at the next minute
m_prev_datetime = now;
diff --git a/src/clock.cpp b/src/clock.cpp
index d5293cc..f41a0cc 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -33,7 +33,7 @@ namespace datetime {
Clock::Clock():
m_cancellable(g_cancellable_new())
{
- g_bus_get(G_BUS_TYPE_SYSTEM, m_cancellable, onSystemBusReady, this);
+ g_bus_get(G_BUS_TYPE_SYSTEM, m_cancellable, on_system_bus_ready, this);
}
Clock::~Clock()
@@ -48,7 +48,7 @@ Clock::~Clock()
}
void
-Clock::onSystemBusReady(GObject*, GAsyncResult * res, gpointer gself)
+Clock::on_system_bus_ready(GObject*, GAsyncResult * res, gpointer gself)
{
GDBusConnection * system_bus;
@@ -66,22 +66,22 @@ Clock::onSystemBusReady(GObject*, GAsyncResult * res, gpointer gself)
"/org/freedesktop/login1", // object path
nullptr, // arg0
G_DBUS_SIGNAL_FLAGS_NONE,
- onPrepareForSleep,
+ on_prepare_for_sleep,
self,
nullptr);
}
}
void
-Clock::onPrepareForSleep(GDBusConnection* /*connection*/,
- const gchar* /*sender_name*/,
- const gchar* /*object_path*/,
- const gchar* /*interface_name*/,
- const gchar* /*signal_name*/,
- GVariant* /*parameters*/,
- gpointer gself)
+Clock::on_prepare_for_sleep(GDBusConnection* /*connection*/,
+ const gchar* /*sender_name*/,
+ const gchar* /*object_path*/,
+ const gchar* /*interface_name*/,
+ const gchar* /*signal_name*/,
+ GVariant* /*parameters*/,
+ gpointer gself)
{
- static_cast<Clock*>(gself)->minuteChanged();
+ static_cast<Clock*>(gself)->minute_changed();
}
/***
diff --git a/src/formatter-desktop.cpp b/src/formatter-desktop.cpp
index 9a098c6..336d2d3 100644
--- a/src/formatter-desktop.cpp
+++ b/src/formatter-desktop.cpp
@@ -81,7 +81,7 @@ DesktopFormatter::DesktopFormatter(const std::shared_ptr<const Clock>& clock_
void DesktopFormatter::rebuildHeaderFormat()
{
- headerFormat.set(getHeaderLabelFormatString());
+ header_format.set(getHeaderLabelFormatString());
}
std::string DesktopFormatter::getHeaderLabelFormatString() const
@@ -126,7 +126,7 @@ const gchar* DesktopFormatter::getFullTimeFormatString() const
break;
}
- return getDefaultHeaderTimeFormat(twelvehour, show_seconds);
+ return default_header_time_format(twelvehour, show_seconds);
}
const gchar* DesktopFormatter::getDateFormat(bool show_day, bool show_date, bool show_year) const
diff --git a/src/formatter.cpp b/src/formatter.cpp
index 638eac4..9aa9bbb 100644
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -122,8 +122,8 @@ public:
m_owner(owner),
m_clock(clock)
{
- m_owner->headerFormat.changed().connect([this](const std::string& /*fmt*/){update_header();});
- m_clock->minuteChanged.connect([this](){update_header();});
+ m_owner->header_format.changed().connect([this](const std::string& /*fmt*/){update_header();});
+ m_clock->minute_changed.connect([this](){update_header();});
update_header();
restartRelativeTimer();
@@ -149,7 +149,7 @@ private:
void update_header()
{
// update the header property
- const auto fmt = m_owner->headerFormat.get();
+ const auto fmt = m_owner->header_format.get();
const auto str = m_clock->localtime().format(fmt);
m_owner->header.set(str);
@@ -197,7 +197,7 @@ private:
static gboolean onRelativeTimer(gpointer gself)
{
auto self = static_cast<Formatter::Impl*>(gself);
- self->m_owner->relativeFormatChanged();
+ self->m_owner->relative_format_changed();
self->restartRelativeTimer();
return G_SOURCE_REMOVE;
}
@@ -225,7 +225,7 @@ Formatter::~Formatter()
}
const char*
-Formatter::getDefaultHeaderTimeFormat(bool twelvehour, bool show_seconds)
+Formatter::default_header_time_format(bool twelvehour, bool show_seconds)
{
const char* fmt;
@@ -250,7 +250,7 @@ Formatter::getDefaultHeaderTimeFormat(bool twelvehour, bool show_seconds)
***/
std::string
-Formatter::getRelativeFormat(GDateTime* then_begin, GDateTime* then_end) const
+Formatter::relative_format(GDateTime* then_begin, GDateTime* then_end) const
{
auto cstr = generate_full_format_string_at_time (p->m_clock->localtime().get(), then_begin, then_end);
const std::string ret = cstr;
diff --git a/src/menu.cpp b/src/menu.cpp
index e92d398..91f7dd2 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -90,12 +90,12 @@ protected:
m_formatter->header.changed().connect([this](const std::string&){
update_header();
});
- m_formatter->headerFormat.changed().connect([this](const std::string&){
+ m_formatter->header_format.changed().connect([this](const std::string&){
update_section(Locations); // need to update x-canonical-time-format
});
- m_formatter->relativeFormatChanged.connect([this](){
- update_section(Appointments); // uses formatter.getRelativeFormat()
- update_section(Locations); // uses formatter.getRelativeFormat()
+ m_formatter->relative_format_changed.connect([this](){
+ update_section(Appointments); // uses formatter.relative_format()
+ update_section(Locations); // uses formatter.relative_format()
});
m_state->settings->show_clock.changed().connect([this](bool){
update_header(); // update header's label
@@ -110,7 +110,7 @@ protected:
m_state->planner->upcoming.changed().connect([this](const std::vector<Appointment>&){
update_section(Appointments); // "upcoming" is the list of Appointments we show
});
- m_state->clock->dateChanged.connect([this](){
+ m_state->clock->date_changed.connect([this](){
update_section(Calendar); // need to update the Date menuitem
update_section(Locations); // locations' relative time may have changed
});
@@ -305,7 +305,7 @@ private:
GDateTime* begin = appt.begin();
GDateTime* end = appt.end();
- auto fmt = m_formatter->getRelativeFormat(begin, end);
+ auto fmt = m_formatter->relative_format(begin, end);
auto unix_time = g_date_time_to_unix(begin);
auto menu_item = g_menu_item_new (appt.summary.c_str(), nullptr);
@@ -380,7 +380,7 @@ private:
const auto& zone = location.zone();
const auto& name = location.name();
const auto zone_now = now.to_timezone(zone);
- const auto fmt = m_formatter->getRelativeFormat(zone_now.get());
+ const auto fmt = m_formatter->relative_format(zone_now.get());
auto detailed_action = g_strdup_printf("indicator.set-location::%s %s", zone.c_str(), name.c_str());
auto i = g_menu_item_new (name.c_str(), detailed_action);
g_menu_item_set_attribute(i, "x-canonical-type", "s", "com.canonical.indicator.location");
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp
index 98cfe0a..cb42d6e 100644
--- a/src/planner-eds.cpp
+++ b/src/planner-eds.cpp
@@ -227,7 +227,7 @@ private:
{
getAppointments(begin, end, [this](const std::vector<Appointment>& appointments) {
g_debug("got %d appointments in this calendar month", (int)appointments.size());
- m_owner.thisMonth.set(appointments);
+ m_owner.this_month.set(appointments);
});
}
g_clear_pointer(&begin, g_date_time_unref);