Skip to content

Commit

Permalink
update for 2020.05.09 release
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-bibb committed May 9, 2020
1 parent 037466b commit 5333761
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 52 deletions.
28 changes: 15 additions & 13 deletions apps/cmstapp/code/control_box/controlbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,17 @@ void ControlBox::enableMoveButtons(int row, int col)

// inspect the service, can only move if service is favorite, ready or online
// vpn services can be moved (I was wrong thinking they could not), see https://01.org/jira/browse/CM-620
// 2020.05.08 - on further consideration moving vpn services is not a good idea, disable the ability to do so
if (services_list.at(i).objmap.value("Favorite").toBool() &&
(services_list.at(i).objmap.value("Type").toString() != "vpn") &&
(services_list.at(i).objmap.value("State").toString() == "online" || services_list.at(i).objmap.value("State").toString() == "ready") ) {
if (i == row) {
act->setDisabled(true); // can't move onto itself
b_validsource = true;
act->setDisabled(true); // can't move onto itself
b_validsource = true;
}
else {
act->setEnabled(true);
b_validtarget = true;
act->setEnabled(true);
b_validtarget = true;
} // else
} // if

Expand Down Expand Up @@ -3008,17 +3010,17 @@ QString ControlBox::getNickName(const QDBusObjectPath& objpath)
if (services_list.at(i).objpath == objpath) {
QMap<QString,QVariant> submap;
if (services_list.at(i).objmap.value("Type").toString() == "ethernet") {
shared::extractMapData(submap, services_list.at(i).objmap.value("Ethernet") );
if (submap.value("Interface").toString().isEmpty() )
return services_list.at(i).objmap.value("Name").toString();
else
return QString(TranslateStrings::cmtr(services_list.at(i).objmap.value("Name").toString()) + " [%1]").arg(submap.value("Interface").toString() );
shared::extractMapData(submap, services_list.at(i).objmap.value("Ethernet") );
if (submap.value("Interface").toString().isEmpty() )
return services_list.at(i).objmap.value("Name").toString();
else
return QString(TranslateStrings::cmtr(services_list.at(i).objmap.value("Name").toString()) + " [%1]").arg(submap.value("Interface").toString() );
} // if type ethernet

else if ( services_list.at(i).objmap.value("Type").toString() == "wifi" && services_list.at(i).objmap.value("Name").toString().isEmpty() )
return tr("[Hidden Wifi]");
else
return services_list.at(i).objmap.value("Name").toString();
else if ( services_list.at(i).objmap.value("Type").toString() == "wifi" && services_list.at(i).objmap.value("Name").toString().isEmpty() )
return tr("[Hidden Wifi]");
else
return services_list.at(i).objmap.value("Name").toString();
} // if objpath matches
} // for

Expand Down
60 changes: 30 additions & 30 deletions apps/cmstapp/code/notify/notify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ NotifyClient::NotifyClient(QObject* parent)
if (! QDBusConnection::sessionBus().isConnected() )
qCritical("CMST - Cannot connect to the session bus.");

// Signals and slots
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()));
// Signals and slots
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(cleanUp()));

return;
}
Expand All @@ -82,7 +82,7 @@ void NotifyClient::connectToServer()
getCapabilities();
QDBusConnection::sessionBus().connect(DBUS_NOTIFY_SERVICE, DBUS_NOTIFY_PATH, DBUS_NOTIFY_INTERFACE, "NotificationClosed", this, SLOT(notificationClosed(quint32, quint32)));
QDBusConnection::sessionBus().connect(DBUS_NOTIFY_SERVICE, DBUS_NOTIFY_PATH, DBUS_NOTIFY_INTERFACE, "ActionInvoked", this, SLOT(actionInvoked(quint32, QString)));
} // if connection is valid
} // if connection is valid
else {
notifyclient->deleteLater();
b_validconnection = false;
Expand Down Expand Up @@ -174,46 +174,46 @@ void NotifyClient::sendNotification ()
QTemporaryFile* tempfileicon = NULL;
if (! s_icon.isEmpty() ) {
if (QFile::exists(s_icon) ) {
tempfileicon = new QTemporaryFile(this);
tempfileicon->setAutoRemove(false);
if (tempfileicon->open() ) {
QPixmap px = QPixmap(s_icon);
px.save(tempfileicon->fileName(),"PNG");
app_icon = tempfileicon->fileName().prepend("file://");
} // if tempfileicon could be opened
tempfileicon = new QTemporaryFile(this);
tempfileicon->setAutoRemove(false);
if (tempfileicon->open() ) {
QPixmap px = QPixmap(s_icon);
px.save(tempfileicon->fileName(),"PNG");
app_icon = tempfileicon->fileName().prepend("file://");
} // if tempfileicon could be opened
} // if s_icon exists as a disk file

// assume s_icon exists as a theme icon, don't check it here. That
// check needs to be done in the calling program.
else app_icon = s_icon;
} // if s_icon is not empty

QDBusReply<quint32> reply = notifyclient->call(QLatin1String("Notify"), app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout);

QDBusReply<quint32> reply = notifyclient->call(QLatin1String("Notify"), app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout);
if (reply.isValid() ) {
current_id = reply.value();
current_id = reply.value();
if (file_map.contains(current_id) && tempfileicon != NULL) {
if (b_overwrite) {
file_map.value(current_id)->remove();
delete file_map.value(current_id);
file_map.remove(current_id);
} // if
else {
tempfileicon->remove();
delete tempfileicon;
tempfileicon = NULL;
} // else
} // if contains current_id and not NULL
if (tempfileicon != NULL) file_map[current_id] = tempfileicon;
} // if reply is valid
if (b_overwrite) {
file_map.value(current_id)->remove();
delete file_map.value(current_id);
file_map.remove(current_id);
} // if
else {
tempfileicon->remove();
delete tempfileicon;
tempfileicon = NULL;
} // else
} // if contains current_id and not NULL
if (tempfileicon != NULL) file_map[current_id] = tempfileicon;
} // if reply is valid

else
#if QT_VERSION >= 0x050400
qCritical("CMST - Error reply received to the Notify method: %s", qUtf8Printable(reply.error().message()) );
else {
#if QT_VERSION >= 0x050400
qCritical("CMST - Error reply received to the Notify method: %s", qUtf8Printable(reply.error().message()) );
#else
qCritical("CMST - Error reply received to the Notify method: %s", qPrintable(reply.error().message()) );
#endif

}

return;
}

Expand Down
4 changes: 2 additions & 2 deletions apps/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ DEALINGS IN THE SOFTWARE.
///////////////////////////////// Program Values ///////////////////////
//
// Program Info (may be visible, but don't mark for tranalation)
#define VERSION "2020.05.08-1"
#define VERSION "2020.05.09-1"

#define RELEASE_DATE "12 April 2020"
#define RELEASE_DATE "9 May 2020"
#define COPYRIGHT_DATE "2013-2020"

// Program Values:
Expand Down
15 changes: 8 additions & 7 deletions text/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<b><center>Connman System Tray (CMST)</center></b>
<b><center>Change Log</center></b>
<b> In Progress</b>
<b> 2020.05.09</b>
<ul>
<li>No longer extract key files from OpenVPN .opvn configurations. Not needed.</li>
<li>Fixed UI where Advanced options were in Start Options group box.</li>
<li>Work on Prefereneces tab to make start options clearer (issue #210).</li>
<li>Added VPN internet kill switch.</li>
<li>Take VPN services out of move before/after menu.</li>
</ul>
b> 2020.04.12</b>
<b> 2020.04.12</b>
<ul>
<li>Fixed wrong validator on fields that accept either IPV4 or IPv6 addresses.</li>
<li>Expanded IPv6 validator to accept most abbreviated addresses.</li>
Expand All @@ -22,7 +23,7 @@ b> 2020.04.12</b>
<li>Move offline checkbox in tab 1 (issue # 201)</li>
<li>Translation to Dutch by Heimen Stoffels.</li>
<li>Cleaned up the IPv4 and IPv6 entries in the provisioning editor.</li>
<li>Fixed retain state not working for window size and position.<li>
<li>Fixed retain state not working for window size and position.</li>
<li>Additions for Connman 1.38</li>
<ul>
<li>Add mDNS status to the details tab.</li>
Expand All @@ -33,9 +34,9 @@ b> 2020.04.12</b>
<li>Added OpenVPN.DeviceType to VPN provisioning editor.</li>
<li>Added eight new OpenConnect items to VPN provisioning editor.</li>
<li>Added mDNS setting to the provisioning editor.</li>
<li>Added DeviceName field to the provisioning editor.<li>
<li>Added AnonymousIdentity field to the wifi section of the provisioning editor.<li>
<li>Added SubjectMatch and AltSubjectMatch fields to the wifi section of the provisioning editor. <li>
<li>Added DeviceName field to the provisioning editor.</li>
<li>Added AnonymousIdentity field to the wifi section of the provisioning editor.</li>
<li>Added SubjectMatch and AltSubjectMatch fields to the wifi section of the provisioning editor. </li>
<li>Added DomainMatch and DomainSuffixMatch fields to the wifi section of the provisioning editor. </li>
</ul>
</ul>
Expand Down Expand Up @@ -64,7 +65,7 @@ b> 2020.04.12</b>
<ul>
<li>Removed padding hack (issue #166) from id buttons.</li>
<li>Allow configuration of VPN services from the Details tab.</li>
<li>Allow CMST to close from window decoration if not running in system tray (issue #169).<li>
<li>Allow CMST to close from window decoration if not running in system tray (issue #169).</li>
<li>Fix appdata.xml install location (issue #176).</li>
<li>Fixed No Reply popup starting VPN from system tray menu (issue #175).</li>
<li>Technologies and Services splitter state retained (issue #173).</li>
Expand Down

0 comments on commit 5333761

Please sign in to comment.