on xenial help sign in
more review comments
commit20589afefcb580d48fc629a3b3763ed6e2f7a0f5 authorNick Dedekind <nick.dedekind@canonical.com> dateFri 19 Sep 2014, 15:46 (12 years ago) parentb7cdc97
5 files changed+10−10
plugins/Utils/relativetimeformatter.cpp+6−6 plugins/Utils/relativetimeformatter.h+1 plugins/Utils/timeformatter.cpp−1 qml/Panel/Indicators/MenuItemFactory.qml+1−3 qml/Panel/MenuContent.qml+2
plugins/Utils/relativetimeformatter.cpp+6−6
@@ -39,11 +39,11 @@ gboolean
3939is_locale_12h(void)
4040{
4141 int i;
42− static const char *formats_24h[] = {"%H", "%R", "%T", "%OH", "%k", NULL};
42+ static const char *formats_24h[] = {"%H", "%R", "%T", "%OH", "%k", nullptr};
4343 const char* t_fmt = nl_langinfo(T_FMT);
4444
45− for (i=0; formats_24h[i]!=NULL; i++)
46− if (strstr(t_fmt, formats_24h[i]) != NULL)
45+ for (i=0; formats_24h[i]!=nullptr; i++)
46+ if (strstr(t_fmt, formats_24h[i]) != nullptr)
4747 return FALSE;
4848
4949 return TRUE;
@@ -129,7 +129,7 @@ getDateProximity(GDateTime* now, GDateTime* time)
129129const char*
130130dgettext_datetime(const char *text)
131131{
132− return dgettext("indicator-datetime", text);
132+ return dgettext("indicator-datetime", text);
133133}
134134
135135/**
@@ -150,9 +150,9 @@ dgettext_datetime(const char *text)
150150char* generate_full_format_string_at_time (GDateTime* now,
151151 GDateTime* then)
152152{
153− GString* ret = g_string_new (NULL);
153+ GString* ret = g_string_new (nullptr);
154154
155− if (then != NULL) {
155+ if (then != nullptr) {
156156 const date_proximity_t prox = getDateProximity(now, then);
157157
158158 if (is_locale_12h()) {
plugins/Utils/relativetimeformatter.h+1
@@ -21,6 +21,7 @@
2121#include "timeformatter.h"
2222
2323// TODO - move this to the sdk
24+// https://blueprints.launchpad.net/ubuntu-ui-toolkit/+spec/time-formatter
2425class RelativeTimeFormatter : public GDateTimeFormatter
2526{
2627 Q_OBJECT
plugins/Utils/timeformatter.cpp−1
@@ -126,7 +126,6 @@ TimeFormatter::TimeFormatter(const QString &initialFormat, QObject *parent): Tim
126126 priv->format = initialFormat;
127127}
128128
129−
130129TimeFormatter::~TimeFormatter()
131130{
132131 if (priv->system_bus) {
qml/Panel/Indicators/MenuItemFactory.qml+1−3
@@ -65,7 +65,6 @@ Item {
6565 }
6666 }
6767
68−
6968 function getExtendedProperty(object, propertyName, defaultValue) {
7069 if (object && object.hasOwnProperty(propertyName)) {
7170 return object[propertyName];
@@ -134,7 +133,6 @@ Item {
134133 }
135134 }
136135
137−
138136 Component {
139137 id: buttonMenu;
140138
@@ -268,7 +266,7 @@ Item {
268266 component: menuData.icon ? icon : undefined
269267 Component {
270268 id: icon
271− Icon{
269+ Icon {
272270 source: menuData.icon
273271 height: units.gu(3)
274272 width: height
qml/Panel/MenuContent.qml+2
@@ -58,6 +58,7 @@ Rectangle {
5858 snapMode: ListView.SnapOneItem
5959 highlightRangeMode: ListView.StrictlyEnforceRange
6060 boundsBehavior: Flickable.StopAtBounds
61+ // Load all the indicator menus (a big number)
6162 cacheBuffer: 1073741823
6263
6364 delegate: Header {
@@ -95,6 +96,7 @@ Rectangle {
9596 interactive: false
9697 highlightMoveDuration: 0
9798 orientation: ListView.Horizontal
99+ // Load all the indicator menus (a big number)
98100 cacheBuffer: 1073741823
99101
100102 delegate: Loader {