Merge branch '0425-up' into 'dbus-interface'
0425 up See merge request kylin-desktop/kylin-nm!580
This commit is contained in:
commit
a3a567276e
|
@ -23,8 +23,9 @@ Build-Depends: debhelper (>=9),
|
|||
libgtk-3-dev,
|
||||
libukcc-dev (>= 3.1.1+1217),
|
||||
libukui-log4qt-dev,
|
||||
libkysdk-applications,
|
||||
libkysdk-qtwidgets-dev,
|
||||
libukui-common-dev,
|
||||
libkysec-dev,
|
||||
Standards-Version: 4.5.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/ukui/kylin-nm
|
||||
|
@ -35,7 +36,7 @@ Package: kylin-nm
|
|||
Architecture: any
|
||||
Depends: network-manager (>=1.2.6),
|
||||
ukui-control-center (>= 3.1.1+1217),
|
||||
libkysdk-applications,
|
||||
libkysdk-qtwidgets,
|
||||
${shlibs:Depends},
|
||||
${misc:Depends}
|
||||
Description: Gui Applet tool for display and edit network simply
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "kylinnetworkdeviceresource.h"
|
||||
#include "../backend/dbus-interface/kylinagentinterface.h"
|
||||
|
||||
|
||||
#define MAINWINDOW_WIDTH 420
|
||||
#define MAINWINDOW_HEIGHT 476
|
||||
#define LAYOUT_MARGINS 0,0,0,0
|
||||
|
@ -53,6 +54,24 @@ void MainWindow::showMainwindow()
|
|||
this->raise();
|
||||
this->activateWindow();
|
||||
emit this->mainWindowVisibleChanged(true);
|
||||
#ifdef WITHKYSEC
|
||||
if (!kysec_is_disabled() && kysec_get_3adm_status() && (getuid() || geteuid())){
|
||||
if (nullptr != m_wlanWidget) {
|
||||
m_wlanWidget->hideSetting();
|
||||
}
|
||||
if (nullptr != m_lanWidget) {
|
||||
m_lanWidget->hideSetting();
|
||||
}
|
||||
} else {
|
||||
if (nullptr != m_wlanWidget) {
|
||||
m_wlanWidget->showSetting();
|
||||
}
|
||||
if (nullptr != m_lanWidget) {
|
||||
m_lanWidget->showSetting();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
#include "netdetails/netdetail.h"
|
||||
#include <ukuisdk/kylin-com4cxx.h>
|
||||
|
||||
#ifdef WITHKYSEC
|
||||
#include <kysec/libkysec.h>
|
||||
#include <kysec/status.h>
|
||||
#endif
|
||||
|
||||
enum IconActiveType {
|
||||
NOT_CONNECTED = 0,
|
||||
LAN_CONNECTED,
|
||||
|
|
|
@ -64,6 +64,21 @@ public:
|
|||
// QString getDefaultDevice();
|
||||
static void showDesktopNotify(const QString &message);
|
||||
|
||||
void hideSetting() {
|
||||
if (nullptr != m_settingsFrame) {
|
||||
m_settingsFrame->hide();
|
||||
m_inactivatedNetDivider->hide();
|
||||
m_inactivatedNetFrame->setMinimumHeight(INACTIVE_AREA_MIN_HEIGHT + 100);
|
||||
}
|
||||
}
|
||||
void showSetting() {
|
||||
if (nullptr != m_settingsFrame) {
|
||||
m_inactivatedNetFrame->setMinimumHeight(INACTIVE_AREA_MIN_HEIGHT);
|
||||
m_settingsFrame->show();
|
||||
m_inactivatedNetDivider->show();
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void deviceStatusChanged();
|
||||
void deviceNameChanged(QString oldName, QString newName, int type);
|
||||
|
@ -105,6 +120,8 @@ protected:
|
|||
QComboBox * m_deviceComboBox = nullptr;
|
||||
QLabel * m_tipsLabel = nullptr;
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void onDeviceComboxIndexChanged(int currentIndex) = 0;
|
||||
void onPaletteChanged();
|
||||
|
|
|
@ -18,7 +18,7 @@ PKGCONFIG +=gio-2.0 glib-2.0 gio-unix-2.0 libnm libnma libsecret-1 gtk+-3.0 gset
|
|||
|
||||
INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
|
||||
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt -lukui-com4c -lukui-com4cxx
|
||||
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt -lukui-com4c -lukui-com4cxx -lkysec
|
||||
#LIBS += -lkysec
|
||||
target.path = /usr/bin
|
||||
target.source += $$TARGET
|
||||
|
@ -35,7 +35,7 @@ INSTALLS += target \
|
|||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
DEFINES += QT_DEPRECATED_WARNINGS WITHKYSEC
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
|
|
Loading…
Reference in New Issue