diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/msn/ui | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/msn/ui')
-rw-r--r-- | kopete/protocols/msn/ui/Makefile.am | 12 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msnadd.ui | 97 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msndebugrawcommand_base.ui | 107 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msneditaccountui.ui | 1421 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msneditaccountwidget.cpp | 369 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msneditaccountwidget.h | 59 | ||||
-rw-r--r-- | kopete/protocols/msn/ui/msninfo.ui | 221 |
7 files changed, 2286 insertions, 0 deletions
diff --git a/kopete/protocols/msn/ui/Makefile.am b/kopete/protocols/msn/ui/Makefile.am new file mode 100644 index 00000000..08a7cbac --- /dev/null +++ b/kopete/protocols/msn/ui/Makefile.am @@ -0,0 +1,12 @@ +METASOURCES = AUTO +AM_CPPFLAGS = $(KOPETE_INCLUDES) \ + -I$(srcdir)/.. \ + $(all_includes) + +noinst_LTLIBRARIES = libkopetemsnui.la + +libkopetemsnui_la_SOURCES = msnadd.ui msndebugrawcommand_base.ui msninfo.ui \ + msneditaccountui.ui msneditaccountwidget.cpp + +EXTRA_DIST = msnadd.ui msninfo.ui + diff --git a/kopete/protocols/msn/ui/msnadd.ui b/kopete/protocols/msn/ui/msnadd.ui new file mode 100644 index 00000000..ff99bb92 --- /dev/null +++ b/kopete/protocols/msn/ui/msnadd.ui @@ -0,0 +1,97 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>msnAddUI</class> +<widget class="QWidget"> + <property name="name"> + <cstring>msnAddUI</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>397</width> + <height>347</height> + </rect> + </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="QLayoutWidget"> + <property name="name"> + <cstring>layout21</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1</cstring> + </property> + <property name="text"> + <string>&MSN Passport ID:</string> + </property> + <property name="alignment"> + <set>AlignTop</set> + </property> + <property name="buddy" stdset="0"> + <cstring>addID</cstring> + </property> + <property name="toolTip" stdset="0"> + <string>The user ID of the MSN contact you would like to add.</string> + </property> + <property name="whatsThis" stdset="0"> + <string>The user ID of the MSN contact you would like to add. This should be in the form of a valid E-mail address.</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>addID</cstring> + </property> + <property name="toolTip" stdset="0"> + <string>The user ID of the MSN contact you would like to add.</string> + </property> + <property name="whatsThis" stdset="0"> + <string>The user ID of the MSN contact you would like to add. This should be in the form of a valid E-mail address.</string> + </property> + </widget> + </hbox> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string><i>(for example: [email protected])</i></string> + </property> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer13</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>160</height> + </size> + </property> + </spacer> + </vbox> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/kopete/protocols/msn/ui/msndebugrawcommand_base.ui b/kopete/protocols/msn/ui/msndebugrawcommand_base.ui new file mode 100644 index 00000000..3b98ce0d --- /dev/null +++ b/kopete/protocols/msn/ui/msndebugrawcommand_base.ui @@ -0,0 +1,107 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>MSNDebugRawCommand_base</class> +<widget class="QWidget"> + <property name="name"> + <cstring>MSNDebugRawCommand_base</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>320</width> + <height>201</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>TextLabel2</cstring> + </property> + <property name="text"> + <string>&Parameters:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_params</cstring> + </property> + </widget> + <widget class="QLineEdit" row="0" column="1"> + <property name="name"> + <cstring>m_command</cstring> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>TextLabel1</cstring> + </property> + <property name="text"> + <string>Co&mmand:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_command</cstring> + </property> + </widget> + <widget class="QLineEdit" row="1" column="1"> + <property name="name"> + <cstring>m_params</cstring> + </property> + </widget> + <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>m_addId</cstring> + </property> + <property name="text"> + <string>Add &ID</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>m_addNewline</cstring> + </property> + <property name="text"> + <string>Add &new line</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <widget class="KTextEdit" row="5" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>m_msg</cstring> + </property> + <property name="textFormat"> + <enum>PlainText</enum> + </property> + </widget> + <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>TextLabel3</cstring> + </property> + <property name="text"> + <string>Message:</string> + </property> + </widget> + </grid> +</widget> +<tabstops> + <tabstop>m_command</tabstop> + <tabstop>m_params</tabstop> + <tabstop>m_addId</tabstop> + <tabstop>m_addNewline</tabstop> +</tabstops> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>ktextedit.h</includehint> +</includehints> +</UI> diff --git a/kopete/protocols/msn/ui/msneditaccountui.ui b/kopete/protocols/msn/ui/msneditaccountui.ui new file mode 100644 index 00000000..5a3b8294 --- /dev/null +++ b/kopete/protocols/msn/ui/msneditaccountui.ui @@ -0,0 +1,1421 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>MSNEditAccountUI</class> +<author>Olivier Goffart</author> +<widget class="QWidget"> + <property name="name"> + <cstring>Form1</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>604</width> + <height>437</height> + </rect> + </property> + <property name="caption"> + <string>Account Preferences - MSN</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>0</number> + </property> + <widget class="QTabWidget"> + <property name="name"> + <cstring>tabWidget3</cstring> + </property> + <property name="tabShape"> + <enum>Rounded</enum> + </property> + <widget class="QWidget"> + <property name="name"> + <cstring>tab_connection</cstring> + </property> + <attribute name="title"> + <string>&Basic Setup</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer row="2" column="0"> + <property name="name"> + <cstring>spacer41</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>146</height> + </size> + </property> + </spacer> + <widget class="QGroupBox" row="1" column="0"> + <property name="name"> + <cstring>groupBox5</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Registration</string> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel6</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>1</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string>To connect to the Microsoft network, you will need a Microsoft Passport.<br><br>If you do not currently have a Passport, please click the button to create one.</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>buttonRegister</cstring> + </property> + <property name="text"> + <string>Re&gister New Account</string> + </property> + </widget> + </hbox> + </widget> + <widget class="QGroupBox" row="0" column="0"> + <property name="name"> + <cstring>m_accountInfo</cstring> + </property> + <property name="title"> + <string>Account Information</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget" row="0" column="0"> + <property name="name"> + <cstring>layout14</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1_3</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&MSN Passport ID:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_login</cstring> + </property> + <property name="toolTip" stdset="0"> + <string>The user ID of the MSN contact you would like to use.</string> + </property> + <property name="whatsThis" stdset="0"> + <string>The user ID of the MSN contact you would like to use. This should be in the form of a valid E-mail address.</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_login</cstring> + </property> + <property name="text"> + <string></string> + </property> + <property name="toolTip" stdset="0"> + <string>The user ID of the MSN contact you would like to use.</string> + </property> + <property name="whatsThis" stdset="0"> + <string>The user ID of the MSN contact you would like to use. This should be in the form of a valid E-mail address.</string> + </property> + </widget> + </hbox> + </widget> + <widget class="Kopete::UI::PasswordWidget" row="1" column="0"> + <property name="name"> + <cstring>m_password</cstring> + </property> + </widget> + <widget class="QCheckBox" row="2" column="0"> + <property name="name"> + <cstring>m_autologin</cstring> + </property> + <property name="text"> + <string>E&xclude from connect all</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>If you check this checkbox, the account will not be connected when you press the "Connect All" button, or at startup when automatic connection at startup is enabled.</string> + </property> + </widget> + <widget class="QCheckBox" row="3" column="0"> + <property name="name"> + <cstring>m_globalIdentity</cstring> + </property> + <property name="text"> + <string>Exclu&de from Global Identity</string> + </property> + </widget> + </grid> + </widget> + </grid> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>TabPage</cstring> + </property> + <attribute name="title"> + <string>MSN &Settings</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1_3</cstring> + </property> + <property name="font"> + <font> + <italic>1</italic> + </font> + </property> + <property name="text"> + <string><qt><b>Note:</b> These settings are applicable to all MSN accounts</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignCenter</set> + </property> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>global_settings_page</cstring> + </property> + <property name="title"> + <string>Global MSN Options</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>NotifyNewChat</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Au&tomatically open a chat window when someone starts a conversation</string> + </property> + <property name="whatsThis" stdset="0"> + <string>This option will notify you when a contact starts typing their message, before the message is sent or finished.</string> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout13_2</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1_4</cstring> + </property> + <property name="text"> + <string>Download the msn picture:</string> + </property> + <property name="whatsThis" stdset="0"> + <string><qt><p>Indicate when Kopete will download the display pictures of contacts</p> +<dl><dt>Only manually</dt><dd>The picture is not downloaded automatically. It is only downloaded when the user requests it</dd> +<dt>When a chat is open</dt><dd>The picture is downloaded when a conversation socket is opened, i.e. when you open a chat window</dd> +<dt>Automatically</dt><dd>Always try to download the picture if the contact has one. <b>Note:</b> this will open a socket, and let the user know you are downloading their picture.</dd></dl></string> + </property> + </widget> + <widget class="QComboBox"> + <item> + <property name="text"> + <string>Only Manually</string> + </property> + </item> + <item> + <property name="text"> + <string>When a Chat is Open</string> + </property> + </item> + <item> + <property name="text"> + <string>Automatically</string> + </property> + </item> + <property name="name"> + <cstring>DownloadPicture</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="currentItem"> + <number>2</number> + </property> + <property name="whatsThis" stdset="0"> + <string><qt><p>Indicate when Kopete will download the pictures of contacts</p> +<dl><dt>Only manually</dt><dd>The picture is not downloaded automatically. It is only downloaded when the user requests it</dd> +<dt>When a chat is open</dt><dd>The picture is downloaded when a conversation socket is opened, i.e. when you open a chat window</dd> +<dt>Automatically</dt><dd>Always try to download the picture if the contact has one. <b>Note:</b> this will open a socket, and let the user know you are downloading their picture.</dd></dl></string> + </property> + </widget> + </hbox> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>useCustomEmoticons</cstring> + </property> + <property name="text"> + <string>&Download and show custom emoticons</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>MSN Messenger allows users to download and use custom emoticons. If this option is enabled, Kopete will download these emoticons and show them.</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>exportEmoticons</cstring> + </property> + <property name="text"> + <string>E&xport the current emoticon theme to users</string> + </property> + <property name="toolTip" stdset="0"> + <string>Only work with emoticons in the PNG format</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Export all the emoticon themes as custom emoticons. +Only works for emoticons in the PNG format.</string> + </property> + </widget> + </vbox> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>privacy_page</cstring> + </property> + <property name="title"> + <string>Privacy</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>SendClientInfo</cstring> + </property> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Send client information</string> + </property> + <property name="accel"> + <string></string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="toolTip" stdset="0"> + <string><qt>Make it possible for your contacts to detect if you are using Kopete.<br>We recommend leaving this checked.</qt></string> + </property> + <property name="whatsThis" stdset="0"> + <string>Third party MSN clients, such as Kopete, give users the ability to let other third party clients guess which client they are using. We recommend leaving this checkbox checked.</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>SendTypingNotification</cstring> + </property> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Send &typing notifications</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>Check this box to send <b>Typing notifications</b> to your contacts. When you are composing a message, you might want your contact to know that you are typing so that he knows you are answering.</qt></string> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout28</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>SendJabber</cstring> + </property> + <property name="text"> + <string>Expose my Jabber account to Jabber users</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>If you have a Jabber account, you may let Jabber users on an MSN gateway know that you are also using Jabber.</string> + </property> + </widget> + <widget class="KComboBox"> + <property name="name"> + <cstring>JabberAccount</cstring> + </property> + <property name="editable"> + <bool>true</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>If you have a Jabber account, you may let Jabber users on an MSN gateway know that you are also using Jabber.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer26</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>61</width> + <height>21</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer25</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Minimum</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>21</height> + </size> + </property> + </spacer> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1_5</cstring> + </property> + <property name="text"> + <string>There are also privacy options in the "Contacts" tab</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignCenter</set> + </property> + </widget> + </vbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer20</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>31</width> + <height>40</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab_info</cstring> + </property> + <attribute name="title"> + <string>User &Info</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>Layout22_2</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel2_2_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>&Nickname:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_displayName</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>The alias you would like to use on MSN. You may change this at any time you wish.</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_displayName</cstring> + </property> + <property name="readOnly"> + <bool>false</bool> + </property> + <property name="whatsThis" stdset="0"> + <string>The alias you would like to use on MSN. You may change this at any time you wish.</string> + </property> + </widget> + </hbox> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>m_phones</cstring> + </property> + <property name="title"> + <string>Phone Numbers</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>TextLabel5</cstring> + </property> + <property name="text"> + <string>Hom&e:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_phh</cstring> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>TextLabel6</cstring> + </property> + <property name="text"> + <string>&Work:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_phw</cstring> + </property> + </widget> + <widget class="QLineEdit" row="0" column="1"> + <property name="name"> + <cstring>m_phw</cstring> + </property> + </widget> + <widget class="QLineEdit" row="1" column="1"> + <property name="name"> + <cstring>m_phh</cstring> + </property> + </widget> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>TextLabel7</cstring> + </property> + <property name="text"> + <string>&Mobile:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_phm</cstring> + </property> + </widget> + <widget class="QLineEdit" row="2" column="1"> + <property name="name"> + <cstring>m_phm</cstring> + </property> + </widget> + </grid> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>groupBox2</cstring> + </property> + <property name="title"> + <string>Display Picture</string> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout17</cstring> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>m_useDisplayPicture</cstring> + </property> + <property name="text"> + <string>E&xport a display picture</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1_2</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Please select a square image. The image will be scaled to 96x96.</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout13</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QPushButton"> + <property name="name"> + <cstring>m_selectImage</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Select Image...</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer5</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>61</width> + <height>21</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer7_2_2</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Minimum</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>1</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout16</cstring> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="spacing"> + <number>0</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>m_displayPicture</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>96</width> + <height>96</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>96</width> + <height>96</height> + </size> + </property> + <property name="frameShape"> + <enum>GroupBoxPanel</enum> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer7_2</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Minimum</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>1</height> + </size> + </property> + </spacer> + </vbox> + </widget> + </hbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer16</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>21</height> + </size> + </property> + </spacer> + <widget class="QLabel"> + <property name="name"> + <cstring>m_warning_1</cstring> + </property> + <property name="paletteForegroundColor"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + <property name="font"> + <font> + <bold>1</bold> + </font> + </property> + <property name="text"> + <string>WARNING: You need to be connected to modify this page.</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + </vbox> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab_contacts</cstring> + </property> + <attribute name="title"> + <string>Con&tacts</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>label_font</cstring> + </property> + <property name="text"> + <string><i>Italics</i> contacts are not on your contact list.<br> +<br> +<b>Bold</b> contacts are in your contact list but you are not in their contact list.</string> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout6</cstring> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="2"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string>Bloc&ked contacts:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_BL</cstring> + </property> + </widget> + <widget class="QListBox" row="1" column="0"> + <property name="name"> + <cstring>m_AL</cstring> + </property> + </widget> + <widget class="QLayoutWidget" row="1" column="1"> + <property name="name"> + <cstring>layout4</cstring> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QPushButton"> + <property name="name"> + <cstring>m_blockButton</cstring> + </property> + <property name="text"> + <string>&></string> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>m_allowButton</cstring> + </property> + <property name="text"> + <string>&<</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer13</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="text"> + <string>Allo&wed contacts:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_AL</cstring> + </property> + </widget> + <widget class="QListBox" row="1" column="2"> + <property name="name"> + <cstring>m_BL</cstring> + </property> + </widget> + </grid> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout58</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer> + <property name="name"> + <cstring>spacer47</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>41</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox"> + <property name="name"> + <cstring>m_blp</cstring> + </property> + <property name="text"> + <string>Block all users not in 'Allowed' &list</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Checking this box will block all users not explicitly shown in the allowed list here, including any contacts not on your contact list.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer50</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>41</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout59</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer> + <property name="name"> + <cstring>spacer48</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>81</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QPushButton"> + <property name="name"> + <cstring>m_RLButton</cstring> + </property> + <property name="maximumSize"> + <size> + <width>200</width> + <height>32767</height> + </size> + </property> + <property name="text"> + <string>View &Reverse List</string> + </property> + <property name="toolTip" stdset="0"> + <string>The reverse list is the list of contacts who added you to their own contact list.</string> + </property> + <property name="whatsThis" stdset="0"> + <string>The reverse list is the list of contacts who added you to their own contact list.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer49</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>111</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>m_warning_2</cstring> + </property> + <property name="paletteForegroundColor"> + <color> + <red>255</red> + <green>0</green> + <blue>0</blue> + </color> + </property> + <property name="font"> + <font> + <bold>1</bold> + </font> + </property> + <property name="text"> + <string>WARNING: You need to be connected to modify this page</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + </vbox> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>TabPage</cstring> + </property> + <attribute name="title"> + <string>Co&nnection</string> + </attribute> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>groupBox66</cstring> + </property> + <property name="title"> + <string>Connection Preferences (for advanced users)</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>optionOverrideServer</cstring> + </property> + <property name="text"> + <string>&Override default server information</string> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout20</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout19</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="spacing"> + <number>3</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>labelServer</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Ser&ver /</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_serverName</cstring> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>labelPort</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>po&rt:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>m_serverPort</cstring> + </property> + </widget> + </hbox> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_serverName</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>messenger.hotmail.com</string> + </property> + <property name="toolTip" stdset="0"> + <string>Only modify these values if you want to use a special IM proxy server, like SIMP</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Only modify these values if you want to use a special IM proxy server, like SIMP</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>m_serverPort</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="maxValue"> + <number>65535</number> + </property> + <property name="minValue"> + <number>1</number> + </property> + <property name="value"> + <number>1863</number> + </property> + <property name="toolTip" stdset="0"> + <string>Only modify these values if you want to use a special IM proxy server, like SIMP</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Only modify these values if you want to use a special IM proxy server, like SIMP</string> + </property> + </widget> + </hbox> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>optionUseHttpMethod</cstring> + </property> + <property name="text"> + <string>Use &HTTP method</string> + </property> + <property name="whatsThis" stdset="0"> + <string>Connect to MSN Messenger using an HTTP-like protocol on port 80. +This may be used to connect on a network with a restrictive firewall. +Only check this option if the normal connection doesn't work.</string> + </property> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout22</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>m_useWebcamPort</cstring> + </property> + <property name="text"> + <string>S&pecify a base port for incoming webcam connections:</string> + </property> + <property name="whatsThis" stdset="0"> + <string>If you are behind a firewall, you may specify a base port to use for the incoming connection, and configure your firewall to accept connections on a range of 10 ports, starting at this one. Incoming connections are used for the webcam. If you don't specify a port yourself, the operating system will choose an available port for you. It is recommended to leave the checkbox unchecked.</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>m_webcamPort</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="maxValue"> + <number>65535</number> + </property> + <property name="minValue"> + <number>1</number> + </property> + <property name="value"> + <number>6891</number> + </property> + <property name="whatsThis" stdset="0"> + <string>If you are behind a firewall, you may specify a base port to use for the incoming connection, and configure your firewall to accept connections on a range of 10 ports, starting at this one. Incoming connections are used for the webcam. If you don't specify a port yourself, the operating system will choose an available port for you. It is recommended to leave the checkbox unchecked.</string> + </property> + </widget> + </hbox> + </widget> + </vbox> + </widget> + <spacer> + <property name="name"> + <cstring>spacer7</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>21</width> + <height>70</height> + </size> + </property> + </spacer> + </vbox> + </widget> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>labelStatusMessage</cstring> + </property> + <property name="text"> + <string></string> + </property> + <property name="alignment"> + <set>AlignCenter</set> + </property> + </widget> + </vbox> +</widget> +<customwidgets> + <customwidget> + <class>Kopete::UI::PasswordWidget</class> + <header location="local">kopetepasswordwidget.h</header> + <sizehint> + <width>50</width> + <height>50</height> + </sizehint> + <container>0</container> + <sizepolicy> + <hordata>1</hordata> + <verdata>0</verdata> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + <pixmap>image0</pixmap> + <signal>changed()</signal> + </customwidget> +</customwidgets> +<images> + <image name="image0"> + <data format="PNG" length="868">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000032b49444154388db59531681b6714c77f32373c8186ef0305eea0050932f8201d944d493bc4d0a1a21e4427bb533a74299dbc25905288a7d0b9836932d58116eac1411932388ba421a5a7a17005174e83e00e2cb80f6ab83708d2e18bec8ada26d0f4c1c1ddbbf7fdeeff3efeefbbda70346419b76fdd7ecd3b88e16858ab2dc183c3c1ebee7a97a99b521515d969f65610e71cd971c6f8d7312ccef3c152e9b39f9e11351d36164acdb819d4a9b4c4362ce5a2c48a45162588253ff5cfe5a2c406862405d9138e5eea2a18609a4fb12d212d7ea42c334089ac92e6423113cab902826d4227568a002480a942780dead16a2767e0ca55949a81668023b2c2e8952139748c270e58aa115aebc2675b86b80b6143710aa1b9049ccd336e064a5979e8e039ec7f5f78544368af1b24807ca64cff50befba6a0b765d8be2b67f00bc1562c95e6441646afe40d54b9f36948af2fb4df078722440c0e2af6f70a064f0be2568beea6c5885b01af2d6f4a2db10dc8ff128e0edc19f4f32f8576dbe1707022fcf2b4647babce175f8780f0c31307a7e0162bdc55c5e52247e742fabbc31843af2f9886c32d40d4b0fb4849278ef20476ee59c62f7ced3831848d55f0aa62816ca6de11ad37ed2fa10f1ce9c4619ac2c647824a45dc1100f2a9e2542e067b9f82155f108adf539c61f781924efc0745c0be57273240b08409e62ac508d0f085c94c112c83e778a54608434331733cbc9f331a5bf2636f85a855bfda15f9694e27565ad785e99fcae0a062fb6e4479a2f43e16eacd3a0fef433175ec7e95a1aa98a6d0e95454f355f2bff65803e8f5bddbf7f70a0687393bf72ced2e74ba253bdfb631a1c139872e948d7e487c83ab15979a2301dcba033a373c7e52f0f851c1f885d0ed080ec88f7374ae672b7f3b72249b115143389fce7f4e5e91d11398cefd986e6c099816839fbd1bd2c9b91ad3147afd16a32387534580ac58957c0e3ece485230d77c5ba6a1f4fa42ef9398719253153e1f5f8f687f9013df80f16684c1e0161969b20aae0d47437fc007d0f950882210c19fad81bf24f04e399701a04820380769a2e485e28a0b14b380e4a5927059e85be67cac5dfae63fc61af87fd4ff027ed7f0e16858fb1ba5cd86c64770b2e90000000049454e44ae426082</data> + </image> +</images> +<connections> + <connection> + <sender>m_useDisplayPicture</sender> + <signal>toggled(bool)</signal> + <receiver>m_selectImage</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>m_useDisplayPicture</sender> + <signal>toggled(bool)</signal> + <receiver>m_selectImage</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>m_useDisplayPicture</sender> + <signal>toggled(bool)</signal> + <receiver>textLabel1_2</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>optionOverrideServer</sender> + <signal>toggled(bool)</signal> + <receiver>labelServer</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>optionOverrideServer</sender> + <signal>toggled(bool)</signal> + <receiver>m_serverName</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>optionOverrideServer</sender> + <signal>toggled(bool)</signal> + <receiver>labelPort</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>optionOverrideServer</sender> + <signal>toggled(bool)</signal> + <receiver>m_serverPort</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>m_useDisplayPicture</sender> + <signal>toggled(bool)</signal> + <receiver>m_displayPicture</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>m_useWebcamPort</sender> + <signal>toggled(bool)</signal> + <receiver>m_webcamPort</receiver> + <slot>setEnabled(bool)</slot> + </connection> +</connections> +<tabstops> + <tabstop>tabWidget3</tabstop> + <tabstop>optionOverrideServer</tabstop> + <tabstop>m_serverName</tabstop> + <tabstop>m_serverPort</tabstop> + <tabstop>optionUseHttpMethod</tabstop> + <tabstop>m_login</tabstop> + <tabstop>m_autologin</tabstop> + <tabstop>buttonRegister</tabstop> + <tabstop>m_displayName</tabstop> + <tabstop>m_phw</tabstop> + <tabstop>m_phh</tabstop> + <tabstop>m_phm</tabstop> + <tabstop>m_useDisplayPicture</tabstop> + <tabstop>m_selectImage</tabstop> + <tabstop>m_AL</tabstop> + <tabstop>m_blockButton</tabstop> + <tabstop>m_allowButton</tabstop> + <tabstop>m_BL</tabstop> + <tabstop>m_blp</tabstop> + <tabstop>m_RLButton</tabstop> +</tabstops> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>kopetepasswordwidget.h</includehint> + <includehint>kcombobox.h</includehint> + <includehint>klineedit.h</includehint> +</includehints> +</UI> diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.cpp b/kopete/protocols/msn/ui/msneditaccountwidget.cpp new file mode 100644 index 00000000..1829f41d --- /dev/null +++ b/kopete/protocols/msn/ui/msneditaccountwidget.cpp @@ -0,0 +1,369 @@ +/* + msneditaccountwidget.cpp - MSN Account Widget + + Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org> + Copyright (c) 2003 by Martijn Klingens <[email protected]> + + Kopete (c) 2002-2003 by the Kopete developers <[email protected]> + + ************************************************************************* + * * + * 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 "msneditaccountwidget.h" + +#include <qcheckbox.h> +#include <qgroupbox.h> +#include <qimage.h> +#include <qlabel.h> +#include <qlayout.h> +#include <qlineedit.h> +#include <qlistbox.h> +#include <qpushbutton.h> +#include <qregexp.h> +#include <qspinbox.h> +#include <kcombobox.h> + +#include <kautoconfig.h> +#include <kfiledialog.h> +#include <klocale.h> +#include <kmessagebox.h> +#include <kstandarddirs.h> +#include <kio/netaccess.h> +#include <kdebug.h> +#include <kpassdlg.h> +#include <krun.h> +#include <kconfig.h> +#include <kpixmapregionselectordialog.h> + +#include "kopeteuiglobal.h" +#include "kopeteglobal.h" + +#include "kopetepasswordwidget.h" +#include "kopeteaccountmanager.h" + +#include "msnaccount.h" +#include "msncontact.h" +#include "msneditaccountui.h" +#include "msnnotifysocket.h" +#include "msnprotocol.h" + +class MSNEditAccountWidgetPrivate +{ +public: + MSNProtocol *protocol; + KAutoConfig *autoConfig; + MSNEditAccountUI *ui; + + QString pictureUrl; + QImage pictureData; +}; + +MSNEditAccountWidget::MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent, const char * /* name */ ) +: QWidget( parent ), KopeteEditAccountWidget( account ) +{ + d = new MSNEditAccountWidgetPrivate; + + d->protocol=proto; + + ( new QVBoxLayout( this, 0, 0 ) )->setAutoAdd( true ); + + d->ui = new MSNEditAccountUI( this ); + + d->autoConfig = new KAutoConfig( d->ui ); + d->autoConfig->addWidget( d->ui->global_settings_page, "MSN" ); + d->autoConfig->addWidget( d->ui->privacy_page, "MSN" ); + //the JabberAccount need to be saved as text, and can't be handled by kautoconfig + d->autoConfig->ignoreSubWidget( d->ui->JabberAccount ); + d->autoConfig->retrieveSettings( true ); + + //Get a list of all jabber accounts + KGlobal::config()->setGroup("MSN"); + QString jab_account=KGlobal::config()->readEntry("JabberAccount"); + + QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts(); + for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) + { + if(a->protocol()->pluginId()=="JabberProtocol") + { + d->ui->JabberAccount->insertItem(a->accountId()); + if( jab_account.isEmpty() ) + jab_account=a->accountId(); + } + } + d->ui->JabberAccount->setCurrentText(jab_account); + + // FIXME: actually, I don't know how to set fonts for qlistboxitem - Olivier + d->ui->label_font->hide(); + + // default fields + if ( account ) + { + KConfigGroup * config=account->configGroup(); + + d->ui->m_login->setText( account->accountId() ); + d->ui->m_password->load( &static_cast<MSNAccount *>(account)->password() ); + + //remove me after we can change account ids (Matt) + d->ui->m_login->setDisabled( true ); + d->ui->m_autologin->setChecked( account->excludeConnect() ); + if ( ( static_cast<MSNAccount*>(account)->serverName() != "messenger.hotmail.com" ) || ( static_cast<MSNAccount*>(account)->serverPort() != 1863) ) { + d->ui->optionOverrideServer->setChecked( true ); + } + + d->ui->m_webcamPort->setDisabled(true); + uint port=config->readNumEntry("WebcamPort" ,0); + d->ui->m_useWebcamPort->setChecked( port != 0); + d->ui->m_webcamPort->setValue( port != 0 ? port : 6891 ); + + d->ui->optionUseHttpMethod->setChecked( static_cast<MSNAccount*>(account)->useHttpMethod() ); + + MSNContact *myself = static_cast<MSNContact *>( account->myself() ); + + d->ui->m_displayName->setText( myself->property( Kopete::Global::Properties::self()->nickName()).value().toString() ); + d->ui->m_phw->setText( config->readEntry("PHW") ); + d->ui->m_phm->setText( config->readEntry("PHM") ); + d->ui->m_phh->setText( config->readEntry("PHH") ); + + bool connected = account->isConnected(); + if ( connected ) + { + d->ui->m_warning_1->hide(); + d->ui->m_warning_2->hide(); + } + d->ui->m_phones->setEnabled( connected ); + d->ui->m_displayName->setEnabled( connected ); + d->ui->m_allowButton->setEnabled( connected ); + d->ui->m_blockButton->setEnabled( connected ); + + MSNAccount *m_account = static_cast<MSNAccount*>( account ); + d->ui->m_serverName->setText( m_account->serverName() ); + d->ui->m_serverPort->setValue( m_account->serverPort() ); + + QStringList blockList = config->readListEntry( "blockList" ); + QStringList allowList = config->readListEntry( "allowList" ); + //QStringList reverseList = config->readListEntry("reverseList" ); + + for ( QStringList::Iterator it = blockList.begin(); it != blockList.end(); ++it ) + d->ui->m_BL->insertItem( *it ); + + for ( QStringList::Iterator it = allowList.begin(); it != allowList.end(); ++it ) + d->ui->m_AL->insertItem( *it ); + + d->ui->m_blp->setChecked( config->readEntry( "BLP" ) == "BL" ); + + d->pictureUrl = locateLocal( "appdata", "msnpicture-" + + account->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" ); + d->ui->m_displayPicture->setPixmap( d->pictureUrl ); + + d->ui->m_useDisplayPicture->setChecked( config->readBoolEntry( "exportCustomPicture" )); + + // Global Identity + d->ui->m_globalIdentity->setChecked( config->readBoolEntry("ExcludeGlobalIdentity", false) ); + } + else + { + d->ui->tab_contacts->setDisabled( true ); + d->ui->m_displayName->setDisabled( true ); + d->ui->m_phones->setDisabled( true ); + } + + connect( d->ui->m_allowButton, SIGNAL( clicked() ), this, SLOT( slotAllow() ) ); + connect( d->ui->m_blockButton, SIGNAL( clicked() ), this, SLOT( slotBlock() ) ); + connect( d->ui->m_selectImage, SIGNAL( clicked() ), this, SLOT( slotSelectImage() ) ); + connect( d->ui->m_RLButton, SIGNAL( clicked() ), this, SLOT( slotShowReverseList() ) ); + connect( d->ui->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + QWidget::setTabOrder( d->ui->m_login, d->ui->m_password->mRemembered ); + QWidget::setTabOrder( d->ui->m_password->mRemembered, d->ui->m_password->mPassword ); + QWidget::setTabOrder( d->ui->m_password->mPassword, d->ui->m_autologin ); +} + +MSNEditAccountWidget::~MSNEditAccountWidget() +{ + delete d; +} + +Kopete::Account * MSNEditAccountWidget::apply() +{ + d->autoConfig->saveSettings(); + KGlobal::config()->setGroup("MSN"); + KGlobal::config()->writeEntry("JabberAccount", d->ui->JabberAccount->currentText()); + + if ( !account() ) + setAccount( new MSNAccount( d->protocol, d->ui->m_login->text() ) ); + + KConfigGroup *config=account()->configGroup(); + + account()->setExcludeConnect( d->ui->m_autologin->isChecked() ); + d->ui->m_password->save( &static_cast<MSNAccount *>(account())->password() ); + + config->writeEntry( "exportCustomPicture", d->ui->m_useDisplayPicture->isChecked() ); + if (d->ui->optionOverrideServer->isChecked() ) { + config->writeEntry( "serverName", d->ui->m_serverName->text() ); + config->writeEntry( "serverPort", d->ui->m_serverPort->value() ); + } + else { + config->writeEntry( "serverName", "messenger.hotmail.com" ); + config->writeEntry( "serverPort", "1863" ); + } + + config->writeEntry( "useHttpMethod", d->ui->optionUseHttpMethod->isChecked() ); + + if(d->ui->m_useWebcamPort->isChecked()) + config->writeEntry( "WebcamPort" , d->ui->m_webcamPort->value() ); + else + config->writeEntry( "WebcamPort" , 0 ); + + // Global Identity + config->writeEntry( "ExcludeGlobalIdentity", d->ui->m_globalIdentity->isChecked() ); + + // Save the avatar image + if( d->ui->m_useDisplayPicture->isChecked() && !d->pictureData.isNull() ) + { + d->pictureUrl = locateLocal( "appdata", "msnpicture-" + + account()->accountId().lower().replace( QRegExp("[./~]" ), "-" ) + ".png" ); + if ( d->pictureData.save( d->pictureUrl, "PNG" ) ) + { + static_cast<MSNAccount *>( account() )->setPictureUrl( d->pictureUrl ); + } + else + { + KMessageBox::sorry( this, i18n( "<qt>An error occurred when trying to change the display picture.<br>" + "Make sure that you have selected a correct image file</qt>" ), i18n( "MSN Plugin" ) ); + } + } + + static_cast<MSNAccount *>( account() )->resetPictureObject(); + + if ( account()->isConnected() ) + { + MSNContact *myself = static_cast<MSNContact *>( account()->myself() ); + MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket(); + if ( d->ui->m_displayName->text() != myself->property( Kopete::Global::Properties::self()->nickName()).value().toString() ) + static_cast<MSNAccount *>( account() )->setPublicName( d->ui->m_displayName->text() ); + + if ( notify ) + { + if ( d->ui->m_phw->text() != myself->phoneWork() && ( !d->ui->m_phw->text().isEmpty() || !myself->phoneWork().isEmpty() ) ) + notify->changePhoneNumber( "PHW", d->ui->m_phw->text() ); + if( d->ui->m_phh->text() != myself->phoneHome() && ( !d->ui->m_phh->text().isEmpty() || !myself->phoneHome().isEmpty() ) ) + notify->changePhoneNumber( "PHH", d->ui->m_phh->text() ); + if( d->ui->m_phm->text() != myself->phoneMobile() && ( !d->ui->m_phm->text().isEmpty() || !myself->phoneMobile().isEmpty() ) ) + notify->changePhoneNumber( "PHM", d->ui->m_phm->text() ); + // (the && .isEmpty is because one can be null and the other empty) + + if ( ( config->readEntry("BLP") == "BL" ) != d->ui->m_blp->isChecked() ) + { + // Yes, I know, calling sendCommand here is not very clean - Olivier + notify->sendCommand( "BLP", d->ui->m_blp->isChecked() ? "BL" : "AL" ); + } + } + } + return account(); +} + +bool MSNEditAccountWidget::validateData() +{ + QString userid = d->ui->m_login->text(); + if ( MSNProtocol::validContactId( userid ) ) + return true; + + KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, + i18n( "<qt>You must enter a valid email address.</qt>" ), i18n( "MSN Plugin" ) ); + return false; +} + +void MSNEditAccountWidget::slotAllow() +{ + //TODO: play with multiple selection + QListBoxItem *item = d->ui->m_BL->selectedItem(); + if ( !item ) + return; + + QString handle = item->text(); + + MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket(); + if ( !notify ) + return; + notify->removeContact( handle, MSNProtocol::BL, QString::null, QString::null ); + + d->ui->m_BL->takeItem( item ); + d->ui->m_AL->insertItem( item ); +} + +void MSNEditAccountWidget::slotBlock() +{ + //TODO: play with multiple selection + QListBoxItem *item = d->ui->m_AL->selectedItem(); + if ( !item ) + return; + + QString handle = item->text(); + + MSNNotifySocket *notify = static_cast<MSNAccount *>( account() )->notifySocket(); + if ( !notify ) + return; + + notify->removeContact( handle, MSNProtocol::AL, QString::null, QString::null ); + + d->ui->m_AL->takeItem( item ); + d->ui->m_BL->insertItem( item ); +} + +void MSNEditAccountWidget::slotShowReverseList() +{ + QStringList reverseList = account()->configGroup()->readListEntry( "reverseList" ); + KMessageBox::informationList( this, i18n( "Here you can see a list of contacts who added you to their contact list" ), reverseList, + i18n( "Reverse List - MSN Plugin" ) ); +} + +void MSNEditAccountWidget::slotSelectImage() +{ + QString path = 0; + bool remoteFile = false; + KURL filePath = KFileDialog::getImageOpenURL( QString::null, this, i18n( "MSN Display Picture" ) ); + if( filePath.isEmpty() ) + return; + + if( !filePath.isLocalFile() ) { + if(!KIO::NetAccess::download( filePath, path, this )) { + KMessageBox::sorry( this, i18n( "Downloading of display image failed" ), i18n( "MSN Plugin" ) ); + return; + } + remoteFile = true; + } + else path = filePath.path(); + + QImage img( path ); + img = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(img), 96, 96, this ); + + if(!img.isNull()) + { + img = MSNProtocol::protocol()->scalePicture(img); + + d->ui->m_displayPicture->setPixmap( QPixmap(img) ); + d->pictureData = img; + } + else + { + KMessageBox::sorry( this, i18n( "<qt>An error occurred when trying to change the display picture.<br>" + "Make sure that you have selected a correct image file</qt>" ), i18n( "MSN Plugin" ) ); + } + if( remoteFile ) KIO::NetAccess::removeTempFile( path ); +} + +void MSNEditAccountWidget::slotOpenRegister() +{ + KRun::runURL( "http://register.passport.net/", "text/html" ); +} + +#include "msneditaccountwidget.moc" + +// vim: set noet ts=4 sts=4 sw=4: + diff --git a/kopete/protocols/msn/ui/msneditaccountwidget.h b/kopete/protocols/msn/ui/msneditaccountwidget.h new file mode 100644 index 00000000..2b8b8f6e --- /dev/null +++ b/kopete/protocols/msn/ui/msneditaccountwidget.h @@ -0,0 +1,59 @@ +/* + msneditaccountwidget.h - MSN Account Widget + + Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org> + Copyright (c) 2003 by Martijn Klingens <[email protected]> + + Kopete (c) 2002-2003 by the Kopete developers <[email protected]> + + ************************************************************************* + * * + * 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 MSNEDITACCOUNTWIDEGET_H +#define MSNEDITACCOUNTWIDEGET_H + +#include <qwidget.h> + +#include "editaccountwidget.h" + +namespace Kopete { class Account; } + +class MSNProtocol; + +class MSNEditAccountWidgetPrivate; + +/** + * @author Olivier Goffart <ogoffart @ kde.org> + */ +class MSNEditAccountWidget : public QWidget, public KopeteEditAccountWidget +{ + Q_OBJECT + +public: + MSNEditAccountWidget( MSNProtocol *proto, Kopete::Account *account, QWidget *parent = 0, const char *name = 0 ); + ~MSNEditAccountWidget(); + virtual bool validateData(); + virtual Kopete::Account * apply(); + +private slots: + void slotAllow(); + void slotBlock(); + void slotShowReverseList(); + void slotSelectImage(); + void slotOpenRegister(); + +private: + MSNEditAccountWidgetPrivate *d; +}; + +#endif + +// vim: set noet ts=4 sts=4 sw=4: + diff --git a/kopete/protocols/msn/ui/msninfo.ui b/kopete/protocols/msn/ui/msninfo.ui new file mode 100644 index 00000000..17f1eecd --- /dev/null +++ b/kopete/protocols/msn/ui/msninfo.ui @@ -0,0 +1,221 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>MSNInfo</class> +<widget class="QWidget"> + <property name="name"> + <cstring>MSNInfo</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>457</width> + <height>360</height> + </rect> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>Layout22</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel2_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Email address:</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_id</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </hbox> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>Layout22_2</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <property name="spacing"> + <number>6</number> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel2_2_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>4</hsizetype> + <vsizetype>4</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Display name:</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_displayName</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </hbox> + </widget> + <widget class="QLayoutWidget"> + <property name="name"> + <cstring>layout3</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="text"> + <string>Personal message:</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>m_personalMessage</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </hbox> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox2</cstring> + </property> + <property name="title"> + <string>Phones</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>TextLabel5</cstring> + </property> + <property name="text"> + <string>Home:</string> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>TextLabel6</cstring> + </property> + <property name="text"> + <string>Work:</string> + </property> + </widget> + <widget class="QLineEdit" row="0" column="1"> + <property name="name"> + <cstring>m_phw</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + <widget class="QLineEdit" row="1" column="1"> + <property name="name"> + <cstring>m_phh</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>TextLabel7</cstring> + </property> + <property name="text"> + <string>Mobile:</string> + </property> + </widget> + <widget class="QLineEdit" row="2" column="1"> + <property name="name"> + <cstring>m_phm</cstring> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </grid> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>m_reversed</cstring> + </property> + <property name="text"> + <string>I am on &the contact list of this contact</string> + </property> + <property name="toolTip" stdset="0"> + <string>Show whether you are on the contact list of this user</string> + </property> + <property name="whatsThis" stdset="0"> + <string>If this box is checked, you are on this user's contact list. +If not, the user has not added you to their list, or has removed you.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>Spacer10</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </vbox> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> |