ALT Linux Bugzilla
– Attachment 6843 Details for
Bug 32648
krfb не сохраняет в krbfrc состояние Enable Desktop Sharing
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч
krfb.patch (text/plain), 3.74 KB, created by
Артём
on 2016-10-22 13:02:25 MSK
(
hide
)
Description:
Патч
Filename:
MIME Type:
Creator:
Артём
Created:
2016-10-22 13:02:25 MSK
Size:
3.74 KB
patch
obsolete
>diff -ur 2/invitationsrfbserver.cpp 1/invitationsrfbserver.cpp >--- 2/invitationsrfbserver.cpp 2016-01-19 12:32:36.000000000 +0300 >+++ 1/invitationsrfbserver.cpp 2016-10-20 04:29:35.000000000 +0300 >@@ -80,6 +80,11 @@ > m_unattendedPassword = password; > } > >+bool InvitationsRfbServer::enableSharing() const >+{ >+ return m_enableSharing; >+} >+ > bool InvitationsRfbServer::allowUnattendedAccess() const > { > return m_allowUnattendedAccess; >@@ -102,6 +107,11 @@ > RfbServer::stop(disconnectClients); > } > >+void InvitationsRfbServer::toggleSharing(bool allow) >+{ >+ m_enableSharing = allow; >+} >+ > void InvitationsRfbServer::toggleUnattendedAccess(bool allow) > { > m_allowUnattendedAccess = allow; >@@ -113,6 +123,8 @@ > m_unattendedPassword = readableRandomString(4)+"-"+readableRandomString(3); > KSharedConfigPtr config = KGlobal::config(); > KConfigGroup krfbConfig(config,"Security"); >+ m_enableSharing = krfbConfig.readEntry( >+ "enableSharing", QVariant(false)).toBool(); > m_allowUnattendedAccess = krfbConfig.readEntry( > "allowUnattendedAccess", QVariant(false)).toBool(); > } >@@ -122,6 +134,7 @@ > stop(); > KSharedConfigPtr config = KGlobal::config(); > KConfigGroup krfbConfig(config,"Security"); >+ krfbConfig.writeEntry("enableSharing",m_enableSharing); > krfbConfig.writeEntry("allowUnattendedAccess",m_allowUnattendedAccess); > if(m_wallet && m_wallet->isOpen()) { > >@@ -138,6 +151,8 @@ > KStringHandler::obscure(m_desktopPassword)); > krfbConfig.writeEntry("unattendedPassword", > KStringHandler::obscure(m_unattendedPassword)); >+ krfbConfig.writeEntry("enableSharing", >+ m_enableSharing); > krfbConfig.writeEntry("allowUnattendedAccess", > m_allowUnattendedAccess); > } >diff -ur 2/invitationsrfbserver.h 1/invitationsrfbserver.h >--- 2/invitationsrfbserver.h 2016-01-19 12:32:36.000000000 +0300 >+++ 1/invitationsrfbserver.h 2016-10-20 04:30:11.000000000 +0300 >@@ -42,6 +42,7 @@ > const QString& unattendedPassword() const; > void setUnattendedPassword(const QString&); > bool allowUnattendedAccess() const; >+ bool enableSharing() const; > > Q_SIGNALS: > void passwordChanged(const QString&); >@@ -50,6 +51,7 @@ > bool start(); > void stop(bool disconnectClients=true); > void toggleUnattendedAccess(bool allow=true); >+ void toggleSharing(bool allow=true); > > protected: > InvitationsRfbServer(); >@@ -62,6 +64,7 @@ > private: > DNSSD::PublicService *m_publicService; > bool m_allowUnattendedAccess; >+ bool m_enableSharing; > QString m_desktopPassword; > QString m_unattendedPassword; > KWallet::Wallet *m_wallet; >diff -ur 2/krfb.kcfg 1/krfb.kcfg >--- 2/krfb.kcfg 2016-01-19 12:32:36.000000000 +0300 >+++ 1/krfb.kcfg 2016-10-20 04:47:01.000000000 +0300 >@@ -18,6 +18,10 @@ > </entry> > </group> > <group name="Security"> >+ <entry name="enableSharing" type="Bool"> >+ <label>Enable sharing.</label> >+ <default>false</default> >+ </entry> > <entry name="allowDesktopControl" type="Bool"> > <label>Allow remote connections to manage the desktop.</label> > <default>true</default> >diff -ur 2/mainwindow.cpp 1/mainwindow.cpp >--- 2/mainwindow.cpp 2016-01-19 12:32:36.000000000 +0300 >+++ 1/mainwindow.cpp 2016-10-20 06:24:24.000000000 +0300 >@@ -70,6 +70,9 @@ > QWidget *mainWidget = new QWidget; > m_ui.setupUi(mainWidget); > m_ui.krfbIconLabel->setPixmap(KIcon("krfb").pixmap(128)); >+ m_ui.enableSharingCheckBox->setChecked( >+ InvitationsRfbServer::instance->enableSharing()); >+ toggleDesktopSharing(InvitationsRfbServer::instance->enableSharing()); > m_ui.enableUnattendedCheckBox->setChecked( > InvitationsRfbServer::instance->allowUnattendedAccess()); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32648
:
6842
| 6843 |
6844