Commit 968d3eb4 authored by Andrea Scarpino's avatar Andrea Scarpino

Show last status in item's context menu

Also, use a better date formatting
parent 621db2c4
......@@ -56,6 +56,22 @@ ListItem {
ContextMenu {
id: itemMenu
Label {
width: parent.width
color: Theme.highlightColor;
font.pixelSize: Theme.fontSizeTiny
horizontalAlignment: Text.AlignHCenter
text: {
switch (status) {
case 0: return qsTr("It was UP");
case 2: return qsTr("It was DOWN");
case 1:
default: return qsTr("It was UNKNOWN");
}
}
}
MenuItem {
text: qsTr("Forget")
onClicked: forget(host)
......@@ -80,6 +96,6 @@ ListItem {
var toLocalTime = new Date(date.getTime() + (date.getTimezoneOffset() * 60000));
toLocalTime.setHours(date.getHours() - (date.getTimezoneOffset() / 60));
return Qt.formatDateTime(toLocalTime, "hh:mm, dd/MM/yyyy");
return Qt.formatDateTime(toLocalTime, "hh:mm, dd MMM yyyy");
}
}
......@@ -13,7 +13,7 @@ Name: harbour-hostisdown
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Check if the desired host is up or not
Version: 0.4
Version: 0.5
Release: 1
Group: Qt/Qt
License: MIT
......
Name: harbour-hostisdown
Summary: Check if the desired host is up or not
Version: 0.4
Version: 0.5
Release: 1
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
......
......@@ -27,12 +27,27 @@
<context>
<name>HostDelegate</name>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="60"/>
<location filename="../qml/pages/HostDelegate.qml" line="67"/>
<source>It was UP</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="68"/>
<source>It was DOWN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="70"/>
<source>It was UNKNOWN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="76"/>
<source>Forget</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="71"/>
<location filename="../qml/pages/HostDelegate.qml" line="87"/>
<source>Deleting</source>
<translation type="unfinished"></translation>
</message>
......
......@@ -27,12 +27,27 @@
<context>
<name>HostDelegate</name>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="60"/>
<location filename="../qml/pages/HostDelegate.qml" line="67"/>
<source>It was UP</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="68"/>
<source>It was DOWN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="70"/>
<source>It was UNKNOWN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="76"/>
<source>Forget</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/HostDelegate.qml" line="71"/>
<location filename="../qml/pages/HostDelegate.qml" line="87"/>
<source>Deleting</source>
<translation type="unfinished"></translation>
</message>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment