diff options
Diffstat (limited to 'krfb/kcm_krfb')
-rw-r--r-- | krfb/kcm_krfb/Makefile.am | 20 | ||||
-rw-r--r-- | krfb/kcm_krfb/configurationwidget.ui | 503 | ||||
-rw-r--r-- | krfb/kcm_krfb/kcm_krfb.cpp | 180 | ||||
-rw-r--r-- | krfb/kcm_krfb/kcm_krfb.h | 47 | ||||
-rw-r--r-- | krfb/kcm_krfb/kcmkrfb.desktop | 192 |
5 files changed, 942 insertions, 0 deletions
diff --git a/krfb/kcm_krfb/Makefile.am b/krfb/kcm_krfb/Makefile.am new file mode 100644 index 00000000..18dede23 --- /dev/null +++ b/krfb/kcm_krfb/Makefile.am @@ -0,0 +1,20 @@ +METASOURCES = AUTO + +# Code +kde_module_LTLIBRARIES = kcm_krfb.la + +kcm_krfb_la_SOURCES = configurationwidget.ui kcm_krfb.cpp +kcm_krfb_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module +kcm_krfb_la_LIBADD = ../krfb/libkrfbconfig.la $(LIB_KDEUI) -lkio + +# Services +xdg_apps_DATA = kcmkrfb.desktop + +EXTRA_DIST = $(kcm_krfb_la_SOURCES)\ + $(xdg_apps_DATA) + +# set the include path for X, qt and KDE +INCLUDES= -I../krfb $(all_includes) + +messages: rc.cpp + $(XGETTEXT) *.cpp *.h -o $(podir)/kcm_krfb.pot diff --git a/krfb/kcm_krfb/configurationwidget.ui b/krfb/kcm_krfb/configurationwidget.ui new file mode 100644 index 00000000..66198269 --- /dev/null +++ b/krfb/kcm_krfb/configurationwidget.ui @@ -0,0 +1,503 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>ConfigurationWidget</class> +<widget class="QWidget"> + <property name="name"> + <cstring>ConfigurationWidget</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>421</width> + <height>445</height> + </rect> + </property> + <property name="icon"> + <pixmap>image0</pixmap> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QTabWidget"> + <property name="name"> + <cstring>TabWidget2</cstring> + </property> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>Acc&ess</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox1</cstring> + </property> + <property name="title"> + <string>Invitations</string> + </property> + <property name="alignment"> + <set>AlignAuto</set> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>invitationNumLabel</cstring> + </property> + <property name="text"> + <string>You have no open invitations.</string> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>manageInvitations</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Create && &Manage Invitations...</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Click to view or delete the open invitations.</string> + </property> + </widget> + </vbox> + </widget> + <widget class="QButtonGroup"> + <property name="name"> + <cstring>ButtonGroup7</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Uninvited Connections</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>allowUninvitedCB</cstring> + </property> + <property name="text"> + <string>Allow &uninvited connections</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>Select this option to allow connecting without inviting. This is useful if you want to access your desktop remotely.</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>enableSLPCB</cstring> + </property> + <property name="text"> + <string>Announce service &on the network</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>If you allow uninvited connections and enable this option, Desktop Sharing will announce the service and your identity on the local network, so people can find you and your computer.</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>confirmConnectionsCB</cstring> + </property> + <property name="text"> + <string>Confirm uninvited connections &before accepting</string> + </property> + <property name="whatsThis" stdset="0"> + <string>If enabled, a dialog will appear when somebody attempts to connect, asking you whether you want to accept the connection.</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>allowDesktopControlCB</cstring> + </property> + <property name="text"> + <string>A&llow uninvited connections to control the desktop</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Enable this option to allow uninvited user to control your desktop (using mouse and keyboard).</string> + </property> + </widget> + <widget class="QFrame"> + <property name="name"> + <cstring>Frame4</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Plain</enum> + </property> + <property name="layoutMargin" stdset="0"> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>6</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Pass&word:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>passwordInput</cstring> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>passwordInput</cstring> + </property> + <property name="maxLength"> + <number>9</number> + </property> + <property name="echoMode"> + <enum>Password</enum> + </property> + <property name="whatsThis" stdset="0"> + <string>If you allow uninvited connections, it is highly recommended to set a password in order to protect your computer from unauthorized access.</string> + </property> + </widget> + </vbox> + </widget> + </vbox> + </widget> + <spacer> + <property name="name"> + <cstring>Spacer3</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>0</width> + <height>50</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>&Session</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox4</cstring> + </property> + <property name="title"> + <string>Session Preferences</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>disableBackgroundCB</cstring> + </property> + <property name="text"> + <string>Always disable &background image</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>Check this option to always disable the background image during a remote session. Otherwise the client decides whether the background will be enabled or disabled.</string> + </property> + </widget> + </vbox> + </widget> + <spacer> + <property name="name"> + <cstring>Spacer4</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>0</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>&Network</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox3</cstring> + </property> + <property name="title"> + <string>Network Port</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>autoPortCB</cstring> + </property> + <property name="text"> + <string>Assi&gn port automatically</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>Check this option to assign the network port automatically. This is recommended unless your network setup requires you to use a fixed port, for example because of a firewall.</string> + </property> + </widget> + <widget class="QFrame"> + <property name="name"> + <cstring>portInputFrame</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Plain</enum> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>11</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1_2</cstring> + </property> + <property name="text"> + <string>P&ort:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>portInput</cstring> + </property> + </widget> + <widget class="KIntNumInput"> + <property name="name"> + <cstring>portInput</cstring> + </property> + <property name="value"> + <number>5900</number> + </property> + <property name="minValue"> + <number>1024</number> + </property> + <property name="maxValue"> + <number>65535</number> + </property> + <property name="toolTip" stdset="0"> + <string>Enter the TCP port number here</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Use this field to set a static port number for the desktop sharing service. Note that if the port is already in use the Desktop Sharing service will not be accessible until you free it. It is recommended to assign the port automatically unless you know what you are doing. +Most VNC clients use a display number instead of the actual port. This display number is the offset to port 5900, so port 5901 has the display number 1.</string> + </property> + </widget> + </hbox> + </widget> + </vbox> + </widget> + <spacer> + <property name="name"> + <cstring>Spacer4</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>0</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> + </widget> + </widget> + </vbox> +</widget> +<images> + <image name="image0"> + <data format="XPM.GZ" length="8078">789cdd98c7721cc91186ef7c0a04f3c650d4b637a1d001de5b8200880d1db2da604038c29b0dbdbb32ffeceec582b30448015a85fa2726e69b32592633ab9abf7c98d8db589df8f0cbbbcb2bbe3aac26aa115f4c7ca8af4f4eee7ffde73f7e7bf73e2926e45f144413d1fbbfbd7bbf7935514dac9d9d360a540a50204f91827707f6e09d9ecb045c0c8c726e7be600e579cfde787960eb7f69e01cbc38b08d67a6e7cadaef0d8cc15336b0f5b73270095e1898c1d33dd7d65f3a30ca997b6eac7c75e00a3cdf738bf9f36dc789f5cfdd78c3a8e3bb9ebbfa67c651d0b4e059e3b4ecca0fc06110e636ff29701224b5958fc07990e7982f1f838ba0c863d4bfeb990bf06dcfb65eecc0555065980faff45cdafc6e94c57c5085e0497012266cfd7f06a761da98fd7be3346d6d3e042ec222857d5eee39afc14b3d97369e4d30879cc31e1f82abb04a8dbf2847611426d6df09b8888a18fdd145cf564ee7039bbd4fe0322a131baf0773c4dd78578de3dcfc81bf1a6741577e04aea22a36ffb4f2366a538cdf61be71a002c37f623c688f7889b3986d3c740dce55ca1efb19972a947f04b30a7c05ae5460ac775cabd0ff3eb851c13ee697a8c398ff263d77fe760ad60db5f5c57e26910aed2b70ac42f95ec789ad1f617f123c28dfedd8a7660ff3497215cae14f89ec4e6bf383ff279cb0ad1f617f13af427dc46bd2a850bedf73b71f5bc659d2f9f38331e7564e985faa0e6af35b372eb8b6f961fc69a44239e22b8d55e035e33ca96dbf108f291e30fc2fcd5560c45f5aa49dbfd343cfa5cd7f71602b877fa4a50ae3413e49598572f853ea5528477e936013a11cf34f5b1518fb95052ad4477916aac073e04805463ece6215da07e04485f20d70aa02637db24285f94c0f0cfb0ef3cd4a15fac3fa659c716bf9cfec3377f1e642709575f9c7213eb24605b6f1b42af477a98c70c1781dfc01ee65feb7615c8a03a17c1b8c0d427bc4439ea9c0c87f391eb4afc1850aede17f79a902233fe75e0546fce5950a6ced1b1518f92c6f5560c46fa109d8e263aee7ce5fd1bed08465fb83f82f621518fe05f7b2fd803f633b301f1781310130fcadc083fe91bfc4f94428473e90c34104463e2abc0aeb61e5f5b01e8db10a8cfd281a15ea6f1bcbf6dbfa20df16ad0a8c7c50062a30e2bfd4846cf385bf20fd59fc7d34f67965ed11cf65a2c27c62b0844fe74fc83f703fac8747fc9479ef1fd41aabd03fe683e5b0f9e1bc2ef18011dfa55781719e9655d99d8f0ef9a0ac55b067fd377dff0ee74fd9aac028e780bbfb9047bc72d8f7478db10af5b15fac0794e527c4030febe30f3aeec7931aab501ff1cdc9b0bf38df905ecc7f70bf630d50ac175bfba2efdf4d1b73777f7038afb954c13efc957def8fdec65f0dfe3569ac42ff8877ae5311eab3f130be0b631518e7918f5460ecb78f55609cbf382e2cfe71fff4591cc6b67e386fe0ce367e9c5fd84e1b1fee239e55606b5fa9c0b82ff95a85fe111fbef56d63fb8178ab8234b0f3cee1fe54e985c5ce1b8cb78afaf3c0e17cc3f16dfb83f8a9121518f9bd2afaf561ac078663f1087fa9e5f6d79d7fe71db71d633feb34f4a1ddcf118f75a502aff7dcd59f346eea8e919f6a3cd81fe4c7bad11b0f18f9b389faf5a559631518ebd170d3e577c27e3778c0c8cf4807666fbe63dfd547be40b8d8f981fcd9e251debc7a5bfd3fd970f4b6ea6cb0f3ae7a1379c79d0def6ad7bc896ae73b1b9550fb266a5cf5071b076ef48a3318497fdfda18b9c357dc8943e9ef5b1bc2afe84f439fdfda18efe3eecb78fd594cfc6fd9403f47eed89db85377e6beba737c5ec86f47ee12ba72d7eee65b7b2fb1d18df356dadfc1c6bd7b7093d2df949b76336e56becdb979b720658b6ec92dbb15b7ea7ecec68d5b73eb9d8d0de97bd36db98f6e5b2cad49ff7332ab4f52b2e376dd9eb4fe211bd2fb9e8cebb3accb2c32c0a6db7781f4baef42c8beebe7ba8bc4eeb1cc65512c0d6bf6021bb72e76898c3b95fe16e4db9cacd4becb9e7c6ebb5c4a75fd1624166a996d2163bb79a18d52685dfa08c9c96865e5895c46fce433971a819b222f9f3955549346f7f5f33630df496aa5fd9cf4f3209f0734a2c331fa227bd4d721cc6ec10574841ebe6fe356b4a4eb43c774e20ee994cee82b9dd3c5139dcbaf67526a3aa64bf7402c6b78891ebe6fa3141d637d8ec5c2155d4b5f37744b774f742bbf7e9552d3bd58913594b98cd0c3f76d8c44fbb63e92d7127aa0499aa2699a79a269f975524a5b95ccbb5fbd7df1e6fbefdba04b99f59c3b84029aa5399aa705e973919668b9d392d00cadd02aadd13a6dd026cdcabea38dcc678bb69eb1712ffa28b557685b2c7c1a6c2cd10eed76da119aa13db1f299f6c5caa6d49ba56d8976b1213bbff0cc5a8928704b144acb88624a28a58c722aa864c7e2b4eca814ca75c5e4a5de7325354da15be25a6672fcbc0d6eac8dbc257866f4d5f2018ff810a587f2ed80db3136b44df3fcf9f1a73646fc858f507a24df466f62e3984ffa338e4f84feaa79c8ce4b0efa791b2fd90ff1603e7d990dc955f0abdf6d8cf5ab8c523ee3af7cde8de8c2ad0f169ecfbb44a77cc9577ccd3712012b120963e2836ff98eeff98127bb55bab4de5f98dbe517b132c5d37c2d91bc2a56c6c439cff02ccff124cf77abb4f023365047577ec15df2222ff132af3ccd57bcca6bbcce1bac2f5f8dd45b787cdff8817bc97023e3cda77997b7f823eb4938d4f9c9bbcfef363e3d3d3f788777794f6efcffa18d71d69eeaf5ee893faabfdec6ab69bc0dbc7ff067de7f95b7c3f1ef1f788fa223b9535db9377a8fe280438e38e6c48d38e54cbe871cd87b1d37b84b8ce49e7b80d1ac0ddf1f973eae33f67d90732eb8f4ce935bf3ec3d97c27957774dee43aa44eef1adfc25c3f7c7a58feb8cb5e12bce7ded1b2fe3f40762a516aebaba07729b55ddc93b482b7f77c3f7c7a58feb3cb1e147725b997a0bd1961ffd17ff2fe36d6dfcebefeffe0dd22dc353</data> + </image> +</images> +<connections> + <connection> + <sender>autoPortCB</sender> + <signal>toggled(bool)</signal> + <receiver>portInputFrame</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>allowUninvitedCB</sender> + <signal>toggled(bool)</signal> + <receiver>confirmConnectionsCB</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>allowUninvitedCB</sender> + <signal>toggled(bool)</signal> + <receiver>allowDesktopControlCB</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>allowUninvitedCB</sender> + <signal>toggled(bool)</signal> + <receiver>Frame4</receiver> + <slot>setEnabled(bool)</slot> + </connection> +</connections> +<tabstops> + <tabstop>autoPortCB</tabstop> + <tabstop>TabWidget2</tabstop> + <tabstop>manageInvitations</tabstop> + <tabstop>allowUninvitedCB</tabstop> + <tabstop>confirmConnectionsCB</tabstop> + <tabstop>allowDesktopControlCB</tabstop> + <tabstop>passwordInput</tabstop> + <tabstop>portInput</tabstop> +</tabstops> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>knuminput.h</includehint> + <includehint>knuminput.h</includehint> +</includehints> +</UI> diff --git a/krfb/kcm_krfb/kcm_krfb.cpp b/krfb/kcm_krfb/kcm_krfb.cpp new file mode 100644 index 00000000..5647d557 --- /dev/null +++ b/krfb/kcm_krfb/kcm_krfb.cpp @@ -0,0 +1,180 @@ + +/*************************************************************************** + kcm_krfb.cpp + -------------- + begin : Sat Mar 02 2002 + copyright : (C) 2002 by Tim Jansen + email : tim@tjansen.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "kcm_krfb.h" +#include "kcm_krfb.moc" + +#include <qlayout.h> +#include <qcheckbox.h> +#include <qlabel.h> +#include <qradiobutton.h> +#include <qlineedit.h> +#include <qbuttongroup.h> +#include <qcstring.h> +#include <qdatastream.h> +#include <kapplication.h> +#include <kdialog.h> +#include <knuminput.h> +#include <klocale.h> +#include <kaboutdata.h> +#include <kconfig.h> +#include <kgenericfactory.h> +#include <kdatastream.h> +#include <kdebug.h> +#include <dcopclient.h> + +#undef VERSION +#define VERSION "0.7" + + +typedef KGenericFactory<KcmKRfb, QWidget> KcmKRfbFactory; + +// Can't use K_EXPORT_COMPONENT_FACTORY, since insertCatalogue necessary +extern "C" { + KDE_EXPORT void *init_kcm_krfb() { + KGlobal::locale()->insertCatalogue("krfb"); // For invitation translations + return new KcmKRfbFactory("kcm_krfb"); + } +} + + +KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) : + KCModule(KcmKRfbFactory::instance(), p, name), + m_configuration(KRFB_CONFIGURATION_MODE) { + + m_confWidget = new ConfigurationWidget(this); + + QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint()); + l->add(m_confWidget); + + setButtons(Default|Apply|Reset); + + KAboutData* about = new KAboutData( "kcm_krfb", I18N_NOOP("Desktop Sharing Control Module"), + VERSION, + I18N_NOOP("Configure desktop sharing"), KAboutData::License_GPL, + "(c) 2002, Tim Jansen\n", + 0, "http://www.tjansen.de/krfb", "tim@tjansen.de"); + about->addAuthor("Tim Jansen", 0, "tim@tjansen.de"); + setAboutData( about ); + + load(); + + connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) ); + connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) ); + connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()), + &m_configuration, SLOT(showManageInvitationsDialog()) ); + connect(&m_configuration, SIGNAL(invitationNumChanged(int)), + this, SLOT(setInvitationNum(int))); + setInvitationNum(m_configuration.invitations().size()); + connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) ); +} + +void KcmKRfb::configChanged() { + emit changed(true); +} + +void KcmKRfb::setInvitationNum(int num) { + if (num == 0) + m_confWidget->invitationNumLabel->setText(i18n("You have no open invitation.")); + else + m_confWidget->invitationNumLabel->setText(i18n("Open invitations: %1").arg(num)); +} + +void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) { + kinetdAvailable = false; + krfbAvailable = false; + + DCOPClient *d = KApplication::dcopClient(); + + QByteArray sdata, rdata; + QCString replyType; + QDataStream arg(sdata, IO_WriteOnly); + arg << QString("krfb"); + if (!d->call ("kded", "kinetd", "isInstalled(QString)", sdata, replyType, rdata)) + return; + + if (replyType != "bool") + return; + + QDataStream answer(rdata, IO_ReadOnly); + answer >> krfbAvailable; + kinetdAvailable = true; +} + +void KcmKRfb::load() { + bool kinetdAvailable, krfbAvailable; + checkKInetd(kinetdAvailable, krfbAvailable); + + m_confWidget->allowUninvitedCB->setChecked(m_configuration.allowUninvitedConnections()); + m_confWidget->enableSLPCB->setChecked(m_configuration.enableSLP()); + m_confWidget->confirmConnectionsCB->setChecked(m_configuration.askOnConnect()); + m_confWidget->allowDesktopControlCB->setChecked(m_configuration.allowDesktopControl()); + m_confWidget->passwordInput->setText(m_configuration.password()); + m_confWidget->autoPortCB->setChecked(m_configuration.preferredPort()<0); + m_confWidget->portInput->setValue(m_configuration.preferredPort()> 0 ? + m_configuration.preferredPort() : 5900); + m_confWidget->disableBackgroundCB->setChecked(m_configuration.disableBackground()); + emit changed(false); +} + +void KcmKRfb::save() { + + m_configuration.update(); + bool allowUninvited = m_confWidget->allowUninvitedCB->isChecked(); + m_configuration.setAllowUninvited(allowUninvited); + m_configuration.setEnableSLP(m_confWidget->enableSLPCB->isChecked()); + m_configuration.setAskOnConnect(m_confWidget->confirmConnectionsCB->isChecked()); + m_configuration.setAllowDesktopControl(m_confWidget->allowDesktopControlCB->isChecked()); + m_configuration.setPassword(m_confWidget->passwordInput->text()); + if (m_confWidget->autoPortCB->isChecked()) + m_configuration.setPreferredPort(-1); + else + m_configuration.setPreferredPort(m_confWidget->portInput->value()); + m_configuration.setDisableBackground(m_confWidget->disableBackgroundCB->isChecked()); + m_configuration.save(); + kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", QByteArray()); + emit changed(false); +} + +void KcmKRfb::defaults() { + bool kinetdAvailable, krfbAvailable; + checkKInetd(kinetdAvailable, krfbAvailable); + + m_confWidget->allowUninvitedCB->setChecked(false); + m_confWidget->enableSLPCB->setChecked(true); + m_confWidget->confirmConnectionsCB->setChecked(false); + m_confWidget->allowDesktopControlCB->setChecked(false); + m_confWidget->passwordInput->setText(""); + m_confWidget->autoPortCB->setChecked(true); + m_confWidget->portInput->setValue(5900); + m_confWidget->disableBackgroundCB->setChecked(false); + emit changed(true); +} + +QString KcmKRfb::quickHelp() const +{ + return i18n("<h1>Desktop Sharing</h1> This module allows you to configure" + " the KDE desktop sharing."); +} + + diff --git a/krfb/kcm_krfb/kcm_krfb.h b/krfb/kcm_krfb/kcm_krfb.h new file mode 100644 index 00000000..e9271289 --- /dev/null +++ b/krfb/kcm_krfb/kcm_krfb.h @@ -0,0 +1,47 @@ + +/*************************************************************************** + kcm_krfb.h + ------------ + begin : Sat Mar 02 2002 + copyright : (C) 2002 by Tim Jansen + email : tim@tjansen.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _KCM_KRFB_H_ +#define _KCM_KRFB_H_ + +#include <qobject.h> +#include <qdatetime.h> +#include <kcmodule.h> +#include "configurationwidget.h" +#include "../krfb/configuration.h" + +class KcmKRfb : public KCModule { + Q_OBJECT +private: + Configuration m_configuration; + ConfigurationWidget *m_confWidget; + void checkKInetd(bool&, bool&); +public: + KcmKRfb(QWidget *p, const char *name, const QStringList &); + + void load(); + void save(); + void defaults(); + QString quickHelp() const; +private slots: + void setInvitationNum(int num); + void configChanged(); +}; + + +#endif diff --git a/krfb/kcm_krfb/kcmkrfb.desktop b/krfb/kcm_krfb/kcmkrfb.desktop new file mode 100644 index 00000000..3b95e734 --- /dev/null +++ b/krfb/kcm_krfb/kcmkrfb.desktop @@ -0,0 +1,192 @@ +[Desktop Entry] +Icon=krfb +Type=Application +Exec=kcmshell kcmkrfb +DocPath=krfb/krfb-configuration.html + +X-KDE-ModuleType=Library +X-KDE-Library=krfb +X-KDE-ParentApp=kcontrol + +Name=Desktop Sharing +Name[af]=Werkskerm Deeling +Name[ar]=مشاركة سطح المكتب +Name[be]=Агульнае выкарыстанне стальніцы +Name[bg]=Споделяне на работното място +Name[bn]=ডেস্কটপ ভাগাভাগি +Name[br]=Rannañ ar vurev +Name[bs]=Dijeljenje desktopa +Name[ca]=Compartició de l'escriptori +Name[cs]=Sdílení pracovní plochy +Name[cy]=Rhannu Penbwrdd +Name[da]=Desktopdeling +Name[de]=Arbeitsfläche freigeben +Name[el]=Κοινή χρήση επιφάνειας εργασίας +Name[eo]=Tabuloj komunaj +Name[es]=Escritorio compartido +Name[et]=Töölaua jagamine +Name[eu]=Mahaigain partekatzea +Name[fa]=اشتراک رومیزی +Name[fi]=Työpöydän jakaminen +Name[fr]=Partage de bureau +Name[ga]=Roinnt Deisce +Name[gl]=Compartición do escritorio +Name[he]=שיתוף שולחנות עבודה +Name[hi]=डेस्कटॉप साझेदारी +Name[hr]=Dijeljenje radne površine +Name[hu]=Munkaasztal-megosztás +Name[is]=Skjáborðamiðlun +Name[it]=Condivisione Desktop +Name[ja]=デスクトップ共有 +Name[ka]=სამუშაო მაგიდის გაზიარება +Name[kk]=Үстелді ортақтастыру +Name[km]=ការចែករំលែកផ្ទៃតុ +Name[lt]=Dalinimasis darbastaliu +Name[mk]=Делење на работната површина +Name[mn]=Ажлын байрыг хамтран эзэмших +Name[ms]=Perkongsian Ruang Kerja +Name[mt]=Qsim tad-desktop +Name[nb]=Delte skrivebord +Name[nds]=Schriefdisch-Freegaav +Name[ne]=डेस्कटप साझेदारी +Name[nl]=Bureaublad delen +Name[nn]=Skrivebordsdeling +Name[nso]=Kabagano ya Desktop +Name[pa]=ਡੈਸਕਟਾਪ ਸਾਂਝ +Name[pl]=Współdzielenie pulpitu +Name[pt]=Partilha do Ambiente de Trabalho +Name[pt_BR]=Compartilhamento do Desktop +Name[ro]=Partajare ecran +Name[ru]=Общий рабочий стол +Name[se]=Čállinbeavdejuohkkin +Name[sk]=Zdieľanie pracovnej plochy +Name[sl]=Deljenje namizja +Name[sr]=Дељење радне површине +Name[sr@Latn]=Deljenje radne površine +Name[sv]=Dela ut skrivbordet +Name[ta]=பணிமேடை பகிர்வு +Name[tg]=Истифодабарии муштараки Мизи корӣ +Name[th]=ใช้งานพื้นที่ทำงานร่วมกัน +Name[tr]=Masaüstü Paylaşımı +Name[uk]=Спільні стільниці +Name[ven]=U kovhekana ha Desikithopo +Name[xh]=Ukwehlulelana kwe Desktop +Name[zh_CN]=桌面共享 +Name[zh_HK]=桌面分享 +Name[zh_TW]=桌面分享 +Name[zu]=Ukwahlulelana kwe-Desktop + +Comment=Configure Desktop Sharing +Comment[af]=Konfigureer Werkskerm Deeling +Comment[ar]=تعديل مشاركة سطح المكتب +Comment[be]=Настаўленне агульнага выкарыстання стальніцы +Comment[bg]=Настройване споделянето на работното място +Comment[bn]=ডেস্কটপ ভাগাভাগি কনফিগার করুন +Comment[br]=Kefluniañ rannañ ar vurev +Comment[bs]=Podesite dijeljenje desktopa +Comment[ca]=Lupa de l'escriptori +Comment[cs]=Nastavit sdílení pracovní plochy +Comment[cy]=Ffurfweddu Rhannu Penbwrdd +Comment[da]=Indstil desktopdeling +Comment[de]=Freigabe der Arbeitsfläche einrichten +Comment[el]=Ρύθμιση της κοινής χρήσης της επιφάνειας εργασίας +Comment[eo]=Agordu fordonadon de viaj tabuloj +Comment[es]=Configure su escritorio compartido +Comment[et]=Töölaua jagamise seadistamine +Comment[eu]=Konfiguratu mahaigain partekatzea +Comment[fa]=پیکربندی اشتراک رومیزی +Comment[fi]=Aseta työpöydän jakaminen +Comment[fr]=Configuration du partage du bureau +Comment[ga]=Cumraigh Roinnt Deisce +Comment[gl]=Configura-la compartición do escritorio +Comment[he]=שינוי הגדרות שיתוף שולחנות העבודה +Comment[hi]=कॉन्फ़िगर डेस्कटॉप साझेदारी +Comment[hr]=Podešavanje dijeljenja radne površine +Comment[hu]=A munkaasztal-megosztás beállításai +Comment[is]=Stilla skjáborðsmiðlun +Comment[it]=Configura condivisione desktop +Comment[ja]=デスクトップ共有の設定 +Comment[ka]=სამუშაო მაგიდის კონფიგურაცია +Comment[kk]=Үстелді ортақтастыруды баптау +Comment[km]=កំណត់រចនាសម្ព័ន្ធការចែករំលែកផ្ទៃតុ +Comment[lt]=Derinti dalinimąsi darbastaliu +Comment[mk]=Конфигурирајте делење на површината +Comment[mn]=Ажлын байрны хамтран эзэмших тохируулга +Comment[ms]= Selaraskan Perkongsian Desktop +Comment[nb]=Tilpass delte skrivebord +Comment[nds]=Schriefdisch-Freegaav instellen +Comment[ne]=डेस्कटप साझेदारी कन्फिगर गर्नुहोस् +Comment[nl]=Bureaublad delen instellen +Comment[nn]=Set opp skrivebordsdeling +Comment[nso]=Beakanya Kabagano ya Desktop +Comment[pa]=ਡੈਸਕਟਾਪ ਸਾਂਝ ਸੰਰਚਨਾ +Comment[pl]=Konfiguracja współdzielenia pulpitu +Comment[pt]=Configura a Partilha do Ecrã +Comment[pt_BR]=Configurar Compartilhamento do Desktop +Comment[ru]=Параметры общего рабочего стола +Comment[se]=Heivet čállinbeavdejuohkkima +Comment[sk]=Nastavenie zdieľania pracovnej plochy +Comment[sl]=Nastavi deljenje namizja +Comment[sr]=Подешавање дељења радне површине +Comment[sr@Latn]=Podešavanje deljenja radne površine +Comment[sv]=Anpassa utdelning av skrivbord +Comment[ta]=பணிமேடை பகிர்வை உள்ளமை +Comment[tg]=Батанзимдарории Истифодабарии муштараки Мизи корӣ +Comment[tr]=Masaüstü Paylaşımını Yapılandır +Comment[uk]=Налаштувати спільні стільниці +Comment[ven]=Dzudzanyani u kovhekana ha desikithopo +Comment[xh]=Qwalasela Ukusebenzisa ngokuhlangeneyo kwe Desktop +Comment[zh_CN]=配置桌面共享 +Comment[zh_HK]=設定桌面分享 +Comment[zh_TW]=設定桌面分享 +Comment[zu]=Hlela kahle Ukwahlulelana kwe-Desktop +Keywords=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited +Keywords[ar]=مشاركة سطح المكتب,krfb,vnc,مشاركة,krdc,اتصال سطح مكتب بعيد,دعوة,منفذ,slp,غير مدعو +Keywords[be]=агульнае выкарыстанне стальніцы,злучэнне,аддалены кампутар,запрашэнне,порт,desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited +Keywords[bg]=споделяне, работно, място, десктоп, покана, връзка, desktop sharing, krfb, vnc, sharing, krdc, remote desktop connection, invitation, port, slp, uninvited +Keywords[bs]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,dijeljenje desktopa,dijeljenje,udaljeni dekstop,poziv,nepozvan +Keywords[ca]=compartició de l'escriptori,krfb,vnc,compartir,krdc,connexió a l'escriptori remot,invitació,port,slp,no invitat +Keywords[cs]=sdílení plochy,krfb,vnc,sdílení,rdp,krdc,připojení vzdálené plochy,pozvánka,port,slp +Keywords[cy]=rhannu penbwrdd,krfb,vnc,rhannu,rdp,krdc,cysylltiad penbwrdd pell,gwahoddiad,porth,slp,heb wahoddiad +Keywords[da]=desktopdeling,krfb,vnc,deling,krdc,ekstern desktopforbindelse,invitation,port,slp,ikke inviteret +Keywords[de]=Arbeitsfläche freigeben,krfb,VNC,freigeben,krdc,Entfernte Arbeitsfläche,Einladung,Port,slp,uneingeladen +Keywords[el]=κοινή χρήση επιφάνειας εργασίας,krfb,vnc,κοινή χρήση,krdc,σύνδεση σε απομακρυσμένη επιφάνεια εργασίας,πρόσκληση,θύρα,slp,απρόσκλητο +Keywords[eo]=tabulo,tabulokomunigado,foraj tabuloj +Keywords[es]=escritorio compartido,krfb,vnc,compartir,rdp,krdc, conexión escritorio remoto,invitación,puerto,slp,no invitado +Keywords[et]=töölaua jagamine,krfb,vnc,jagamine,rdp,krdc,kaugtöölaua ühendus,rdp,kutse,port,slp,kutsumata +Keywords[eu]=mahaigain partekatzea,krfb,vnc,partekatzea,krdc,urruneko mahaigain konexioa,gonbidapena,ataka,slp,gonbidapen gabea +Keywords[fa]=اشتراک رومیزی، krfb، vnc، اتصال رومیزی راه دور، دعوت، درگاه، slp، دعوتنشده +Keywords[fi]=työpöydän jakaminen,krfb,vnc,jakaminen,krdc,etätyöpöytäyhteys, kutsu,portti,slp,kutsumaton, työpöytä +Keywords[fr]=partage de bureau,krfb,vnc,partage,rdp,krdc,connexion à un bureau distant,invitation,port,slp,non invité +Keywords[gl]=compartición de escritorio, vnc, compartir, krdc, conexión escritorio remoto, invitación, porto, slt +Keywords[he]=שיתוף שולחן עבודה,שיתוף,חיבור לשולחן עבודה מרוחק,desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection, invitation, port, slp, uninvited +Keywords[hi]=डेस्कटॉप साझेदारी, केआरएफबी,वीएनसी,साझेदारी,केआरडीसी,रिमोट डेस्कटॉप कनेक्शन,निमंत्रण,पोर्ट,एसएलपी,बिन बुलाए +Keywords[hu]=munkaasztal-megosztás,krfb,vnc,megosztás,krdc,csatlakozás távoli munkaasztalhoz,meghívás,port,slp,meghívás nélkül +Keywords[is]=skjáborðsmiðlun,miðlun,krfb,vnc,rdp,krdc,fjarvinnsla,remote desktop connection,rdp +Keywords[it]=condivisione desktop,krfb,vnc,condivisione,krdc,connessione desktop remoto,invito,porta,slp,non invitato +Keywords[ja]=デスクトップ共有,krfb,vnc,共有,rdp,krdc,リモートデスクトップ接続,招待,ポート,slp,uninvited +Keywords[km]=ការចែករំលែកផ្ទៃតុ,krfb,vnc,ការចែករំលែក,krdc,ការតភ្ជាប់ផ្ទៃតុពីចម្ងាយ,អញ្ជើញ,ច្រក,slp,មិនបានអញ្ជើញ +Keywords[lt]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,dalinimasis darbastaliu,nutolusio darbastalio prijungimas,kvietimas,ryšys,nekviestas,jungtis,prievadas,dalintis,pasidalinti,jungimasis,prisijungti,kviesti +Keywords[mk]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,делење на површината,krfb,vnc,делење,krdc,поврзување со оддалечена површина,покана,порта,slp,непоканет +Keywords[ms]= perkongsian ruang kerja, sambungan, liang, desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited +Keywords[nb]=skrivebordsdeling,krfb,vnc,deling,krdc,tilkobling til fjernt skrivebord,invitasjon,port,slp,ikke invitert +Keywords[nds]=schriefdisch,freegeven,freegaav,krfb,vnc,delen,krdc,feern Schriefdisch,verbinnen,inladen,port,slp,nich inlaadt +Keywords[ne]=डेस्कटप साझेदारी,krfb,vnc,साझेदारी,krdc, टाढाको डेस्कटप जडान,निमन्त्रणा,पोर्ट,slp,निमन्त्रणा नगरिएको +Keywords[nl]=desktop sharing,krfb,vnc,sharing,rdp,krdc,remote desktop connection,uitnodiging,slp,rdp,verbinding, bureaublad delen,bureaublad op afstand +Keywords[nn]=skrivebordsdeling,krfb,vnc,deling,krdc,nettverksskrivebord,invitasjon,port,slp,ikkje invitert +Keywords[pl]=współdzielenie pulpitu,krfb,vnc,współdzielenie,rdp,krdc,zdalne połączenie, zdalne biurko, zdalny pulpit, zaproszenie,port,slp +Keywords[pt]=partilha do ecrã,krfb,vnc,partilha,krdc,ligação a um ecrã remoto,convite,porto,slp,sem convite +Keywords[pt_BR]=compartilhamento de desktop,krfb,vnc,compartilhamento,krdc,conexão a desktop remoto,convite,porta,slp,não convidado +Keywords[ru]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,совместные ресурсы,рабочий стол,удалённая работа +Keywords[sk]=zdieľanie plochy,krfb,vnc,zdieľanie,rdp,krdc,pripojenie vzdialenej pracovnej plochy,rdp +Keywords[sl]=namizje,souporaba,krfb,vnc,krdc,povezava oddaljenega namizja, povabilo,port,slp,nepovabljen +Keywords[sr]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,радна површина,дељење,позив,порт,непозван,удаљено +Keywords[sr@Latn]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,radna površina,deljenje,poziv,port,nepozvan,udaljeno +Keywords[sv]=dela skrivbord,krfb,vnc,dela,krdc,fjärrskrivbordsanslutning,inbjudan,port,slp +Keywords[ta]=பணிமேடை பகிர்வு,krfb,vnc,பகிர்வு,krdc,தொலை பணிமேடை இணைப்பு,அழைப்பிதழ், துறை, slp, uninvited +Keywords[tr]=masaüstü paylaşımı,krfb,vnc,paylaşım,krdc,uzak masaüstü bağlantısı,davet,port,slp +Keywords[uk]=спільні стільниці,krfb,vnc,спільний,rdp,krdc,з'єднання віддаленої стільниці,запрошення,rdp,slp,без запрошення +Keywords[zh_CN]=desktop sharing,krfb,vnc,sharing,krdc,remote desktop connection,invitation,port,slp,uninvited,桌面共享,共享,远程桌面连接,邀请,端口,未邀请 +Keywords[zh_TW]=desktop sharing,krfb,vnc,sharing,rdp,krdc,remote desktop connection,rdp,桌面分享,分享,遠端桌面連線,invitation,port,slp,uninvited + +Categories=Qt;KDE;X-KDE-settings-network;Settings; |