Skip to content

Commit 5333761

Browse files
committed
update for 2020.05.09 release
1 parent 037466b commit 5333761

File tree

4 files changed

+55
-52
lines changed

4 files changed

+55
-52
lines changed

apps/cmstapp/code/control_box/controlbox.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -662,15 +662,17 @@ void ControlBox::enableMoveButtons(int row, int col)
662662

663663
// inspect the service, can only move if service is favorite, ready or online
664664
// vpn services can be moved (I was wrong thinking they could not), see https://01.org/jira/browse/CM-620
665+
// 2020.05.08 - on further consideration moving vpn services is not a good idea, disable the ability to do so
665666
if (services_list.at(i).objmap.value("Favorite").toBool() &&
667+
(services_list.at(i).objmap.value("Type").toString() != "vpn") &&
666668
(services_list.at(i).objmap.value("State").toString() == "online" || services_list.at(i).objmap.value("State").toString() == "ready") ) {
667669
if (i == row) {
668-
act->setDisabled(true); // can't move onto itself
669-
b_validsource = true;
670+
act->setDisabled(true); // can't move onto itself
671+
b_validsource = true;
670672
}
671673
else {
672-
act->setEnabled(true);
673-
b_validtarget = true;
674+
act->setEnabled(true);
675+
b_validtarget = true;
674676
} // else
675677
} // if
676678

@@ -3008,17 +3010,17 @@ QString ControlBox::getNickName(const QDBusObjectPath& objpath)
30083010
if (services_list.at(i).objpath == objpath) {
30093011
QMap<QString,QVariant> submap;
30103012
if (services_list.at(i).objmap.value("Type").toString() == "ethernet") {
3011-
shared::extractMapData(submap, services_list.at(i).objmap.value("Ethernet") );
3012-
if (submap.value("Interface").toString().isEmpty() )
3013-
return services_list.at(i).objmap.value("Name").toString();
3014-
else
3015-
return QString(TranslateStrings::cmtr(services_list.at(i).objmap.value("Name").toString()) + " [%1]").arg(submap.value("Interface").toString() );
3013+
shared::extractMapData(submap, services_list.at(i).objmap.value("Ethernet") );
3014+
if (submap.value("Interface").toString().isEmpty() )
3015+
return services_list.at(i).objmap.value("Name").toString();
3016+
else
3017+
return QString(TranslateStrings::cmtr(services_list.at(i).objmap.value("Name").toString()) + " [%1]").arg(submap.value("Interface").toString() );
30163018
} // if type ethernet
30173019

3018-
else if ( services_list.at(i).objmap.value("Type").toString() == "wifi" && services_list.at(i).objmap.value("Name").toString().isEmpty() )
3019-
return tr("[Hidden Wifi]");
3020-
else
3021-
return services_list.at(i).objmap.value("Name").toString();
3020+
else if ( services_list.at(i).objmap.value("Type").toString() == "wifi" && services_list.at(i).objmap.value("Name").toString().isEmpty() )
3021+
return tr("[Hidden Wifi]");
3022+
else
3023+
return services_list.at(i).objmap.value("Name").toString();
30223024
} // if objpath matches
30233025
} // for
30243026

apps/cmstapp/code/notify/notify.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ NotifyClient::NotifyClient(QObject* parent)
6060
if (! QDBusConnection::sessionBus().isConnected() )
6161
qCritical("CMST - Cannot connect to the session bus.");
6262

63-
// Signals and slots
64-
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()));
63+
// Signals and slots
64+
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()));
6565

6666
return;
6767
}
@@ -82,7 +82,7 @@ void NotifyClient::connectToServer()
8282
getCapabilities();
8383
QDBusConnection::sessionBus().connect(DBUS_NOTIFY_SERVICE, DBUS_NOTIFY_PATH, DBUS_NOTIFY_INTERFACE, "NotificationClosed", this, SLOT(notificationClosed(quint32, quint32)));
8484
QDBusConnection::sessionBus().connect(DBUS_NOTIFY_SERVICE, DBUS_NOTIFY_PATH, DBUS_NOTIFY_INTERFACE, "ActionInvoked", this, SLOT(actionInvoked(quint32, QString)));
85-
} // if connection is valid
85+
} // if connection is valid
8686
else {
8787
notifyclient->deleteLater();
8888
b_validconnection = false;
@@ -174,46 +174,46 @@ void NotifyClient::sendNotification ()
174174
QTemporaryFile* tempfileicon = NULL;
175175
if (! s_icon.isEmpty() ) {
176176
if (QFile::exists(s_icon) ) {
177-
tempfileicon = new QTemporaryFile(this);
178-
tempfileicon->setAutoRemove(false);
179-
if (tempfileicon->open() ) {
180-
QPixmap px = QPixmap(s_icon);
181-
px.save(tempfileicon->fileName(),"PNG");
182-
app_icon = tempfileicon->fileName().prepend("file://");
183-
} // if tempfileicon could be opened
177+
tempfileicon = new QTemporaryFile(this);
178+
tempfileicon->setAutoRemove(false);
179+
if (tempfileicon->open() ) {
180+
QPixmap px = QPixmap(s_icon);
181+
px.save(tempfileicon->fileName(),"PNG");
182+
app_icon = tempfileicon->fileName().prepend("file://");
183+
} // if tempfileicon could be opened
184184
} // if s_icon exists as a disk file
185185

186186
// assume s_icon exists as a theme icon, don't check it here. That
187187
// check needs to be done in the calling program.
188188
else app_icon = s_icon;
189189
} // if s_icon is not empty
190-
191-
QDBusReply<quint32> reply = notifyclient->call(QLatin1String("Notify"), app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout);
192190

191+
QDBusReply<quint32> reply = notifyclient->call(QLatin1String("Notify"), app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout);
193192
if (reply.isValid() ) {
194-
current_id = reply.value();
193+
current_id = reply.value();
195194
if (file_map.contains(current_id) && tempfileicon != NULL) {
196-
if (b_overwrite) {
197-
file_map.value(current_id)->remove();
198-
delete file_map.value(current_id);
199-
file_map.remove(current_id);
200-
} // if
201-
else {
202-
tempfileicon->remove();
203-
delete tempfileicon;
204-
tempfileicon = NULL;
205-
} // else
206-
} // if contains current_id and not NULL
207-
if (tempfileicon != NULL) file_map[current_id] = tempfileicon;
208-
} // if reply is valid
195+
if (b_overwrite) {
196+
file_map.value(current_id)->remove();
197+
delete file_map.value(current_id);
198+
file_map.remove(current_id);
199+
} // if
200+
else {
201+
tempfileicon->remove();
202+
delete tempfileicon;
203+
tempfileicon = NULL;
204+
} // else
205+
} // if contains current_id and not NULL
206+
if (tempfileicon != NULL) file_map[current_id] = tempfileicon;
207+
} // if reply is valid
209208

210-
else
211-
#if QT_VERSION >= 0x050400
212-
qCritical("CMST - Error reply received to the Notify method: %s", qUtf8Printable(reply.error().message()) );
209+
else {
210+
#if QT_VERSION >= 0x050400
211+
qCritical("CMST - Error reply received to the Notify method: %s", qUtf8Printable(reply.error().message()) );
213212
#else
214213
qCritical("CMST - Error reply received to the Notify method: %s", qPrintable(reply.error().message()) );
215214
#endif
216-
215+
}
216+
217217
return;
218218
}
219219

apps/resource.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ DEALINGS IN THE SOFTWARE.
3535
///////////////////////////////// Program Values ///////////////////////
3636
//
3737
// Program Info (may be visible, but don't mark for tranalation)
38-
#define VERSION "2020.05.08-1"
38+
#define VERSION "2020.05.09-1"
3939

40-
#define RELEASE_DATE "12 April 2020"
40+
#define RELEASE_DATE "9 May 2020"
4141
#define COPYRIGHT_DATE "2013-2020"
4242

4343
// Program Values:

text/changelog.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<b><center>Connman System Tray (CMST)</center></b>
22
<b><center>Change Log</center></b>
3-
<b> In Progress</b>
3+
<b> 2020.05.09</b>
44
<ul>
55
<li>No longer extract key files from OpenVPN .opvn configurations. Not needed.</li>
66
<li>Fixed UI where Advanced options were in Start Options group box.</li>
77
<li>Work on Prefereneces tab to make start options clearer (issue #210).</li>
88
<li>Added VPN internet kill switch.</li>
9+
<li>Take VPN services out of move before/after menu.</li>
910
</ul>
10-
b> 2020.04.12</b>
11+
<b> 2020.04.12</b>
1112
<ul>
1213
<li>Fixed wrong validator on fields that accept either IPV4 or IPv6 addresses.</li>
1314
<li>Expanded IPv6 validator to accept most abbreviated addresses.</li>
@@ -22,7 +23,7 @@ b> 2020.04.12</b>
2223
<li>Move offline checkbox in tab 1 (issue # 201)</li>
2324
<li>Translation to Dutch by Heimen Stoffels.</li>
2425
<li>Cleaned up the IPv4 and IPv6 entries in the provisioning editor.</li>
25-
<li>Fixed retain state not working for window size and position.<li>
26+
<li>Fixed retain state not working for window size and position.</li>
2627
<li>Additions for Connman 1.38</li>
2728
<ul>
2829
<li>Add mDNS status to the details tab.</li>
@@ -33,9 +34,9 @@ b> 2020.04.12</b>
3334
<li>Added OpenVPN.DeviceType to VPN provisioning editor.</li>
3435
<li>Added eight new OpenConnect items to VPN provisioning editor.</li>
3536
<li>Added mDNS setting to the provisioning editor.</li>
36-
<li>Added DeviceName field to the provisioning editor.<li>
37-
<li>Added AnonymousIdentity field to the wifi section of the provisioning editor.<li>
38-
<li>Added SubjectMatch and AltSubjectMatch fields to the wifi section of the provisioning editor. <li>
37+
<li>Added DeviceName field to the provisioning editor.</li>
38+
<li>Added AnonymousIdentity field to the wifi section of the provisioning editor.</li>
39+
<li>Added SubjectMatch and AltSubjectMatch fields to the wifi section of the provisioning editor. </li>
3940
<li>Added DomainMatch and DomainSuffixMatch fields to the wifi section of the provisioning editor. </li>
4041
</ul>
4142
</ul>
@@ -64,7 +65,7 @@ b> 2020.04.12</b>
6465
<ul>
6566
<li>Removed padding hack (issue #166) from id buttons.</li>
6667
<li>Allow configuration of VPN services from the Details tab.</li>
67-
<li>Allow CMST to close from window decoration if not running in system tray (issue #169).<li>
68+
<li>Allow CMST to close from window decoration if not running in system tray (issue #169).</li>
6869
<li>Fix appdata.xml install location (issue #176).</li>
6970
<li>Fixed No Reply popup starting VPN from system tray menu (issue #175).</li>
7071
<li>Technologies and Services splitter state retained (issue #173).</li>

0 commit comments

Comments
 (0)