#4323 Refactored ElevateMode into its own header
This commit is contained in:
parent
fa9f30ff81
commit
d42ea08a1d
|
@ -111,7 +111,8 @@ HEADERS += src/MainWindow.h \
|
|||
src/WebClient.h \
|
||||
../lib/common/PluginVersion.h \
|
||||
src/SubscriptionManager.h \
|
||||
src/ActivationNotifier.h
|
||||
src/ActivationNotifier.h \
|
||||
src/ElevateMode.h
|
||||
RESOURCES += res/Synergy.qrc
|
||||
RC_FILE = res/win/Synergy.rc
|
||||
macx {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
const char AppConfig::m_SynergysName[] = "synergys.exe";
|
||||
const char AppConfig::m_SynergycName[] = "synergyc.exe";
|
||||
const char AppConfig::m_SynergyLogDir[] = "log/";
|
||||
const ElevateMode defaultElevateMode = ElevateAsNeeded;
|
||||
#define DEFAULT_PROCESS_MODE Service
|
||||
#else
|
||||
const char AppConfig::m_SynergysName[] = "synergys";
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define APPCONFIG_H
|
||||
|
||||
#include <QString>
|
||||
#include "ElevateMode.h"
|
||||
|
||||
// this should be incremented each time a new page is added. this is
|
||||
// saved to settings when the user finishes running the wizard. if
|
||||
|
@ -46,29 +47,6 @@ enum ProcessMode {
|
|||
Desktop
|
||||
};
|
||||
|
||||
// The elevate mode tristate determines two behaviours on Windows.
|
||||
// The first, switch-on-desk-switch (SodS), passed through synergyd as a
|
||||
// command line argument to synergy core, determines if the server restarts
|
||||
// when switching Windows desktops (e.g. when Windows UAC dialog pops up).
|
||||
// The second, passed as a boolean flag to Synergyd over the IPC inside
|
||||
// kIpcCommandMessage, determines whether Synergy should be started with
|
||||
// elevated privileges.
|
||||
//
|
||||
// The matrix for these two behaviours is as follows:
|
||||
// SodS Elevate
|
||||
// ___________________________
|
||||
// ElevateAsNeeded | true | false
|
||||
// ElevateAlways | false | true
|
||||
// ElevateNever | false | false
|
||||
//
|
||||
enum ElevateMode {
|
||||
ElevateAsNeeded = 0,
|
||||
ElevateAlways = 1,
|
||||
ElevateNever = 2
|
||||
};
|
||||
|
||||
static const ElevateMode defaultElevateMode = ElevateAsNeeded;
|
||||
|
||||
class AppConfig
|
||||
{
|
||||
friend class SettingsDialog;
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2016 Symless
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file LICENSE that should have accompanied this file.
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// The elevate mode tristate determines two behaviours on Windows.
|
||||
// The first, switch-on-desk-switch (SodS), passed through synergyd as a
|
||||
// command line argument to synergy core, determines if the server restarts
|
||||
// when switching Windows desktops (e.g. when Windows UAC dialog pops up).
|
||||
// The second, passed as a boolean flag to Synergyd over the IPC inside
|
||||
// kIpcCommandMessage, determines whether Synergy should be started with
|
||||
// elevated privileges.
|
||||
//
|
||||
// The matrix for these two behaviours is as follows:
|
||||
// SodS Elevate
|
||||
// ___________________________
|
||||
// ElevateAsNeeded | true | false
|
||||
// ElevateAlways | false | true
|
||||
// ElevateNever | false | false
|
||||
//
|
||||
enum ElevateMode {
|
||||
ElevateAsNeeded = 0,
|
||||
ElevateAlways = 1,
|
||||
ElevateNever = 2
|
||||
};
|
||||
|
||||
extern const ElevateMode defaultElevateMode;
|
|
@ -21,7 +21,7 @@
|
|||
#include <QObject>
|
||||
#include <QAbstractSocket>
|
||||
|
||||
#include "AppConfig.h"
|
||||
#include "ElevateMode.h"
|
||||
|
||||
class QTcpSocket;
|
||||
class IpcReader;
|
||||
|
|
Loading…
Reference in New Issue