Changeset 578:d20cd31dfc52 in qutecom-2.2


Ignore:
Timestamp:
Mar 10, 2010 9:09:37 PM (3 years ago)
Author:
laurent@…
Branch:
default
Message:

split jabber / gtalk

Files:
2 added
23 edited

Legend:

Unmodified
Added
Removed
  • libs/imwrapper/include/imwrapper/EnumIMProtocol.h

    r0 r578  
    4141                IMProtocolICQ, 
    4242                IMProtocolJabber, 
     43                IMProtocolGoogleTalk, 
    4344                IMProtocolSIPSIMPLE, // Kept for compatibility with previous version of WengoPhone. @see ConfigImporter 
    4445                IMProtocolSIP, 
  • libs/imwrapper/src/EnumIMProtocol.cpp

    r0 r578  
    3636        _protocolMap[EnumIMProtocol::IMProtocolICQ] = "ICQ"; 
    3737        _protocolMap[EnumIMProtocol::IMProtocolJabber] = "Jabber"; 
     38        _protocolMap[EnumIMProtocol::IMProtocolGoogleTalk] = "Google-Talk"; 
    3839        _protocolMap[EnumIMProtocol::IMProtocolSIPSIMPLE] = "SIP/SIMPLE"; 
    3940        _protocolMap[EnumIMProtocol::IMProtocolSIP] = "SIP"; 
  • libs/imwrapper/src/IMAccount.cpp

    r440 r578  
    107107        string result = login; 
    108108 
    109         if (protocol == EnumIMProtocol::IMProtocolJabber) { 
     109        if (protocol == EnumIMProtocol::IMProtocolJabber || protocol == EnumIMProtocol::IMProtocolGoogleTalk) { 
    110110                string::size_type index = login.find('/'); 
    111111 
  • libs/imwrapper/src/purple/PurpleAccountMngr.cpp

    r166 r578  
    129129{ 
    130130        const char *gPrclId = purple_account_get_protocol_id(account); 
    131         IMAccount *mAccount = FindIMAccount(purple_account_get_username(account), 
    132                                                                         PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     131        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     132        IMAccount *mAccount = FindIMAccount(purple_account_get_username(account),protocol); 
     133        if(!mAccount && protocol == EnumIMProtocol::IMProtocolJabber) 
     134                mAccount = FindIMAccount(purple_account_get_username(account),EnumIMProtocol::IMProtocolGoogleTalk); 
     135         
    133136        PurpleIMPresence *mPresence = NULL; 
    134137         
  • libs/imwrapper/src/purple/PurpleChatMngr.cpp

    r533 r578  
    275275std::string PurpleChatMngr::cleanContactId(std::string contactId, EnumIMProtocol::IMProtocol prtcl) 
    276276{ 
    277         if (prtcl == EnumIMProtocol::IMProtocolJabber) { 
     277        if (prtcl == EnumIMProtocol::IMProtocolJabber || prtcl == EnumIMProtocol::IMProtocolGoogleTalk) { 
    278278                std::string::size_type index = contactId.find('/'); 
    279279 
     
    290290        PurpleConversationType chatType = purple_conversation_get_type(conv); 
    291291        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    292         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    293                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     292         
     293        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     294        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     295        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     296        { 
     297                protocol = EnumIMProtocol::IMProtocolGoogleTalk; 
     298                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     299        } 
     300                 
     301         
    294302        PurpleIMChat *mChat = FindIMChat(*account); 
    295303        mConvInfo_t *mConv; 
     
    300308 
    301309                // Check if it's a jabber contact, and remove his ressource 
    302                 std::string contactId = cleanContactId(std::string(purple_conversation_get_name(conv)), 
    303                         PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     310                std::string contactId = cleanContactId(std::string(purple_conversation_get_name(conv)),protocol); 
    304311 
    305312                IMContact imContact(*account, contactId); 
     
    370377                PurpleAccount *gAccount = purple_conversation_get_account(conv); 
    371378                const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    372                 std::string contactId = cleanContactId(name, 
    373                         PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     379                 
     380                EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     381                std::string contactId = cleanContactId(name,protocol); 
     382                if(contactId.empty() && protocol == EnumIMProtocol::IMProtocolJabber) 
     383                        contactId = cleanContactId(name,EnumIMProtocol::IMProtocolGoogleTalk); 
    374384 
    375385                mIMChat->messageReceivedEvent(*mIMChat,  
     
    384394        PurpleAccount *gAccount = purple_conversation_get_account(conv); 
    385395        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    386         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    387                                                                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     396         
     397        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     398        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     399        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     400                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
     401         
    388402        mConvInfo_t *mConv = NULL; 
    389403        IMChatSession *chatSession = NULL; 
     
    433447        PurpleAccount *gAccount = purple_conversation_get_account(conv); 
    434448        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    435         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    436                                                                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     449        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     450        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     451        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     452                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
     453         
    437454        mConvInfo_t *mConv = NULL; 
    438455        IMChatSession *chatSession = NULL; 
     
    527544        PurpleAccount *gAccount = purple_conversation_get_account(conv); 
    528545        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    529         std::string contactId = cleanContactId(name, 
    530                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     546         
     547        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     548        std::string contactId = cleanContactId(name,protocol); 
     549        if(contactId.empty() && protocol == EnumIMProtocol::IMProtocolJabber) 
     550                contactId = cleanContactId(name,EnumIMProtocol::IMProtocolGoogleTalk); 
    531551 
    532552        mIMChat->typingStateChangedEvent(*mIMChat, *((IMChatSession *)(mConv->conv_session)), 
     
    540560        PurpleAccount *gAccount = purple_conversation_get_account((PurpleConversation *) gConv); 
    541561        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    542         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    543                                                                                                         PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     562        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     563        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     564        if(!account &&  protocol == EnumIMProtocol::IMProtocolJabber) 
     565                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
    544566        PurpleIMChat *mChat = FindIMChat(*account); 
    545567 
  • libs/imwrapper/src/purple/PurpleConnectMngr.cpp

    r325 r578  
    119119        protocol = PurpleIMPrcl::GetEnumIMProtocol(gAccount->protocol_id); 
    120120        mAccount = PurpleAccountMngr::FindIMAccount(gAccount->username, protocol); 
    121         if (mAccount == NULL) 
    122                 return NULL; 
    123  
     121        if (!mAccount && EnumIMProtocol::IMProtocolJabber) 
     122                mAccount = PurpleAccountMngr::FindIMAccount(gAccount->username, EnumIMProtocol::IMProtocolGoogleTalk); 
     123                    
     124        if (mAccount == NULL)    
     125                   return NULL; 
     126                    
    124127        return PurpleConnectMngr::FindIMConnect(*mAccount); 
    125128} 
  • libs/imwrapper/src/purple/PurpleContactListMngr.cpp

    r533 r578  
    172172        PurpleAccount *gAccount = purple_buddy_get_account(gBuddy); 
    173173        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    174         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    175                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     174        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     175        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     176        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     177                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
    176178         
    177179        if (account == NULL) 
     
    241243void PurpleContactListMngr::UpdateBuddy(PurpleBuddyList *list, PurpleBuddy *gBuddy) 
    242244{ 
    243         IMAccount *account = NULL; 
    244245        PurpleAccount   *gAccount = purple_buddy_get_account(gBuddy); 
    245246        PurplePresence *gPresence = purple_buddy_get_presence(gBuddy); 
    246247        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    247248         
    248         account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    249                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     249        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     250        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     251        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     252                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
    250253         
    251254        if (account) 
     
    280283void PurpleContactListMngr::UpdateBuddyIcon(PurpleBuddy *buddy) 
    281284{ 
    282         IMAccount *account = NULL; 
    283285        PurpleIMPresence *mIMPresence = NULL; 
    284286        PurpleAccount   *gAccount = purple_buddy_get_account(buddy); 
    285287        const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    286288         
    287         account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    288                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     289        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     290        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     291        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     292                account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
    289293 
    290294        if (!account) 
  • libs/imwrapper/src/purple/PurpleEnumIMProtocol.cpp

    r166 r578  
    5252        case EnumIMProtocol::IMProtocolJabber: 
    5353                return PRPL_JABBER; 
     54                         
     55        case EnumIMProtocol::IMProtocolGoogleTalk: 
     56                return PRPL_JABBER; 
    5457 
    5558        case EnumIMProtocol::IMProtocolSIPSIMPLE: 
  • libs/imwrapper/src/purple/PurpleEnumPresenceState.cpp

    r166 r578  
    5555                        else if (proto == EnumIMProtocol::IMProtocolAIM 
    5656                                        || proto == EnumIMProtocol::IMProtocolICQ 
    57                                         || proto == EnumIMProtocol::IMProtocolJabber) 
     57                                        || proto == EnumIMProtocol::IMProtocolJabber 
     58                                        || proto == EnumIMProtocol::IMProtocolGoogleTalk) 
    5859                                return ST_DND; 
    5960                        else 
  • libs/imwrapper/src/purple/PurpleIMConnect.cpp

    r166 r578  
    172172 
    173173                case EnumIMProtocol::IMProtocolJabber: 
     174                case EnumIMProtocol::IMProtocolGoogleTalk: 
    174175                        AddJabberAccountParams(gAccount, mParams); 
    175176                        break; 
  • libs/imwrapper/src/purple/PurplePresenceMngr.cpp

    r533 r578  
    107107{ 
    108108        PurpleIMPresence *mIMPresence = NULL; 
    109         const char *gPrclId = purple_account_get_protocol_id(gAccount); 
    110         IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount), 
    111                 PurpleIMPrcl::GetEnumIMProtocol(gPrclId)); 
     109        const char *gPrclId = purple_account_get_protocol_id(gAccount);  
     110        EnumIMProtocol::IMProtocol protocol = PurpleIMPrcl::GetEnumIMProtocol(gPrclId); 
     111        IMAccount *account = _accountMngr->FindIMAccount(purple_account_get_username(gAccount),protocol); 
     112        if(!account && protocol == EnumIMProtocol::IMProtocolJabber) 
     113                account =_accountMngr->FindIMAccount(purple_account_get_username(gAccount),EnumIMProtocol::IMProtocolGoogleTalk); 
    112114 
    113115        if (!account) 
  • wengophone/resources/pics/protocols/jabber.png

    • Property exe set to *
  • wengophone/resources/pics/protocols/jabber_off.png

    • Property exe set to *
  • wengophone/resources/wengophone.qrc

    r0 r578  
    239239<file>pics/protocols/jabber.png</file> 
    240240<file>pics/protocols/jabber_off.png</file> 
     241<file>pics/protocols/google-talk.png</file> 
     242<file>pics/protocols/google-talk_off.png</file> 
    241243<file>pics/protocols/msn.png</file> 
    242244<file>pics/protocols/msn_off.png</file> 
  • wengophone/src/presentation/qt/QtEnumIMProtocol.cpp

    r0 r578  
    8888                imProtocol = IMProtocolJabber; 
    8989                break; 
     90                         
     91        case EnumIMProtocol::IMProtocolGoogleTalk: 
     92                imProtocol = IMProtocolGoogleTalk; 
     93                break; 
    9094 
    9195        case EnumIMProtocol::IMProtocolSIPSIMPLE: 
  • wengophone/src/presentation/qt/QtIMAccountHelper.cpp

    r0 r578  
    5757        case EnumIMProtocol::IMProtocolJabber: 
    5858                return 60; 
     59         
     60        case EnumIMProtocol::IMProtocolGoogleTalk: 
     61                return 70; 
    5962 
    6063        case EnumIMProtocol::IMProtocolUnknown: 
  • wengophone/src/presentation/qt/imaccount/GoogleTalkSettings.ui

    r0 r578  
    1 <ui version="4.0" > 
    2  <author></author> 
    3  <comment></comment> 
    4  <exportmacro></exportmacro> 
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<ui version="4.0"> 
    53 <class>GoogleTalkSettings</class> 
    6  <widget class="QWidget" name="GoogleTalkSettings" > 
    7   <property name="geometry" > 
     4 <widget class="QWidget" name="GoogleTalkSettings"> 
     5  <property name="geometry"> 
    86   <rect> 
    97    <x>0</x> 
    108    <y>0</y> 
    11     <width>277</width> 
    12     <height>144</height> 
     9    <width>325</width> 
     10    <height>149</height> 
    1311   </rect> 
    1412  </property> 
    15   <property name="windowTitle" > 
     13  <property name="windowTitle"> 
    1614   <string>GoogleTalk Settings</string> 
    1715  </property> 
    18   <layout class="QGridLayout" > 
    19    <property name="margin" > 
    20     <number>9</number> 
    21    </property> 
    22    <property name="spacing" > 
    23     <number>6</number> 
    24    </property> 
    25    <item row="2" column="1" > 
     16  <layout class="QGridLayout"> 
     17   <item row="2" column="1"> 
    2618    <spacer> 
    27      <property name="orientation" > 
     19     <property name="orientation"> 
    2820      <enum>Qt::Vertical</enum> 
    2921     </property> 
    30      <property name="sizeHint" > 
     22     <property name="sizeHint" stdset="0"> 
    3123      <size> 
    3224       <width>20</width> 
     
    3628    </spacer> 
    3729   </item> 
    38    <item row="0" column="0" > 
    39     <widget class="QLabel" name="label" > 
    40      <property name="pixmap" > 
    41       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/jabber.png</pixmap> 
     30   <item row="0" column="0"> 
     31    <widget class="QLabel" name="label"> 
     32     <property name="pixmap"> 
     33      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/google-talk.png</pixmap> 
    4234     </property> 
    4335    </widget> 
    4436   </item> 
    45    <item row="0" column="1" > 
    46     <layout class="QGridLayout" > 
    47      <property name="margin" > 
    48       <number>0</number> 
    49      </property> 
    50      <property name="spacing" > 
    51       <number>6</number> 
    52      </property> 
    53      <item row="1" column="0" > 
    54       <widget class="QLabel" name="passwordLabel" > 
    55        <property name="text" > 
     37   <item row="0" column="1"> 
     38    <layout class="QGridLayout"> 
     39     <item row="1" column="0"> 
     40      <widget class="QLabel" name="passwordLabel"> 
     41       <property name="text"> 
    5642        <string>Password:</string> 
    5743       </property> 
    5844      </widget> 
    5945     </item> 
    60      <item row="1" column="1" > 
    61       <widget class="QLineEdit" name="passwordLineEdit" > 
    62        <property name="echoMode" > 
     46     <item row="1" column="1"> 
     47      <widget class="QLineEdit" name="passwordLineEdit"> 
     48       <property name="echoMode"> 
    6349        <enum>QLineEdit::Password</enum> 
    6450       </property> 
    6551      </widget> 
    6652     </item> 
    67      <item row="0" column="1" > 
    68       <widget class="QLineEdit" name="loginLineEdit" /> 
     53     <item row="0" column="1"> 
     54      <widget class="QLineEdit" name="loginLineEdit"/> 
    6955     </item> 
    70      <item row="0" column="0" > 
    71       <widget class="QLabel" name="loginLabel" > 
    72        <property name="text" > 
     56     <item row="0" column="0"> 
     57      <widget class="QLabel" name="loginLabel"> 
     58       <property name="text"> 
    7359        <string>Login:</string> 
    7460       </property> 
     
    7763    </layout> 
    7864   </item> 
    79    <item row="1" column="1" > 
    80     <layout class="QGridLayout" > 
    81      <property name="margin" > 
    82       <number>0</number> 
    83      </property> 
    84      <property name="spacing" > 
    85       <number>6</number> 
    86      </property> 
    87      <item row="0" column="1" > 
    88       <widget class="LinkLabel" name="forgotPasswordLabel" > 
    89        <property name="text" > 
     65   <item row="1" column="1"> 
     66    <layout class="QGridLayout"> 
     67     <item row="0" column="1"> 
     68      <widget class="LinkLabel" name="forgotPasswordLabel"> 
     69       <property name="text"> 
    9070        <string>Forgot your GoogleTalk password?</string> 
    9171       </property> 
    92        <property name="alignment" > 
     72       <property name="alignment"> 
    9373        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 
    9474       </property> 
    9575      </widget> 
    9676     </item> 
    97      <item rowspan="2" row="0" column="2" > 
    98       <widget class="QLabel" name="label_2" > 
    99        <property name="text" > 
     77     <item row="0" column="2" rowspan="2"> 
     78      <widget class="QLabel" name="label_2"> 
     79       <property name="text"> 
    10080        <string/> 
    10181       </property> 
    102        <property name="pixmap" > 
    103         <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/help.png</pixmap> 
     82       <property name="pixmap"> 
     83        <pixmap resource="../../../../resources/wengophone.qrc">:/pics/help.png</pixmap> 
    10484       </property> 
    10585      </widget> 
    10686     </item> 
    107      <item row="1" column="1" > 
    108       <widget class="LinkLabel" name="createAccountLabel" > 
    109        <property name="text" > 
     87     <item row="1" column="1"> 
     88      <widget class="LinkLabel" name="createAccountLabel"> 
     89       <property name="text"> 
    11090        <string>Get a new GoogleTalk Account</string> 
    11191       </property> 
    112        <property name="alignment" > 
     92       <property name="alignment"> 
    11393        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 
    11494       </property> 
    11595      </widget> 
    11696     </item> 
    117      <item row="0" column="0" > 
     97     <item row="0" column="0"> 
    11898      <spacer> 
    119        <property name="orientation" > 
     99       <property name="orientation"> 
    120100        <enum>Qt::Horizontal</enum> 
    121101       </property> 
    122        <property name="sizeHint" > 
     102       <property name="sizeHint" stdset="0"> 
    123103        <size> 
    124104         <width>40</width> 
     
    132112  </layout> 
    133113 </widget> 
    134  <pixmapfunction></pixmapfunction> 
    135114 <customwidgets> 
    136115  <customwidget> 
     
    138117   <extends>QLabel</extends> 
    139118   <header>qtutil/LinkLabel.h</header> 
    140    <container>0</container> 
    141    <pixmap></pixmap> 
    142119  </customwidget> 
    143120 </customwidgets> 
     
    147124 </tabstops> 
    148125 <resources> 
    149   <include location="../../../../resources/wengophone.qrc" /> 
     126  <include location="../../../../resources/wengophone.qrc"/> 
    150127 </resources> 
    151128 <connections/> 
  • wengophone/src/presentation/qt/imaccount/QtIMAccountManager.cpp

    r0 r578  
    6060        addIMAccountMenu->addAction(QIcon(":pics/protocols/jabber.png"), 
    6161                                QtEnumIMProtocol::toString(QtEnumIMProtocol::IMProtocolJabber)); 
    62         addIMAccountMenu->addAction(QIcon(":pics/protocols/jabber.png"), 
     62        addIMAccountMenu->addAction(QIcon(":pics/protocols/google-talk.png"), 
    6363                                QtEnumIMProtocol::toString(QtEnumIMProtocol::IMProtocolGoogleTalk)); 
    6464        _ui->addIMAccountButton->setMenu(addIMAccountMenu); 
  • wengophone/src/presentation/qt/imcontact/QtAddIMContact.cpp

    r128 r578  
    6363        _ui->protocolComboBox->addItem(QIcon(":pics/protocols/jabber.png"), 
    6464                QString::fromStdString(EnumIMProtocol::toString(EnumIMProtocol::IMProtocolJabber))); 
     65        _ui->protocolComboBox->addItem(QIcon(":pics/protocols/google-talk.png"), 
     66                QString::fromStdString(EnumIMProtocol::toString(EnumIMProtocol::IMProtocolGoogleTalk))); 
    6567        _ui->protocolComboBox->addItem(QIcon(":pics/protocols/sip.png"), 
    6668                QString::fromStdString(EnumIMProtocol::toString(EnumIMProtocol::IMProtocolSIP))); 
  • wengophone/src/presentation/qt/imcontact/QtSimpleIMContactManager.cpp

    r459 r578  
    6666        _jabberLineEditMouseEventFilter = new MousePressEventFilter(this, SLOT(jabberLineEditClicked())); 
    6767        _ui->jabberLineEdit->installEventFilter(_jabberLineEditMouseEventFilter); 
     68        _googleTalkLineEditMouseEventFilter = new MousePressEventFilter(this, SLOT(googleTalkLineEditClicked())); 
     69        _ui->googleTalkLineEdit->installEventFilter(_googleTalkLineEditMouseEventFilter); 
    6870 
    6971        SAFE_CONNECT(_ui->msnLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
     
    7274        SAFE_CONNECT(_ui->yahooLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
    7375        SAFE_CONNECT(_ui->jabberLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
     76        SAFE_CONNECT(_ui->googleTalkLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
    7477        SAFE_CONNECT(_ui->wengoLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
    7578        SAFE_CONNECT(_ui->sipLineEdit, SIGNAL(textChanged(const QString &)), SIGNAL(contentHasChanged())); 
     
    9093        OWSAFE_DELETE(_yahooLineEditMouseEventFilter); 
    9194        OWSAFE_DELETE(_jabberLineEditMouseEventFilter); 
     95        OWSAFE_DELETE(_googleTalkLineEditMouseEventFilter); 
    9296        OWSAFE_DELETE(_ui); 
    9397} 
     
    145149        changeIMProtocolPixmaps(EnumIMProtocol::IMProtocolJabber, 
    146150                _ui->jabberLabel, ":pics/protocols/jabber.png", _ui->jabberLineEdit); 
     151        changeIMProtocolPixmaps(EnumIMProtocol::IMProtocolGoogleTalk, 
     152                _ui->googleTalkLabel, ":pics/protocols/google-talk.png", _ui->googleTalkLineEdit); 
    147153 
    148154        //Loads all the IM contacts 
     
    162168        if (_ui->jabberLineEdit->isEnabled()) { 
    163169                _ui->jabberLineEdit->setText(getIMContactsOfProtocol(EnumIMProtocol::IMProtocolJabber)); 
     170        } 
     171        if (_ui->googleTalkLineEdit->isEnabled()) { 
     172                _ui->googleTalkLineEdit->setText(getIMContactsOfProtocol(EnumIMProtocol::IMProtocolGoogleTalk)); 
    164173        } 
    165174 
     
    249258                addIMContactsOfProtocol(EnumIMProtocol::IMProtocolJabber, _ui->jabberLineEdit->text()); 
    250259        } 
     260        if (_ui->googleTalkLineEdit->isEnabled()) { 
     261                addIMContactsOfProtocol(EnumIMProtocol::IMProtocolGoogleTalk, _ui->googleTalkLineEdit->text()); 
     262        } 
    251263 
    252264        addIMContactsOfProtocol(EnumIMProtocol::IMProtocolSIP, _ui->sipLineEdit->text().remove(" ")); 
     
    289301                QtIMAccountSettings(_cUserProfile.getUserProfile(), 
    290302                        QtEnumIMProtocol::IMProtocolJabber, _imContactManagerWidget); 
     303                loadIMContacts(); 
     304        } 
     305} 
     306 
     307void QtSimpleIMContactManager::googleTalkLineEditClicked() { 
     308        if (!_ui->jabberLineEdit->isEnabled()) { 
     309                QtIMAccountSettings(_cUserProfile.getUserProfile(), 
     310                                                        QtEnumIMProtocol::IMProtocolGoogleTalk, _imContactManagerWidget); 
    291311                loadIMContacts(); 
    292312        } 
  • wengophone/src/presentation/qt/imcontact/QtSimpleIMContactManager.h

    r0 r578  
    7878 
    7979        void jabberLineEditClicked(); 
     80         
     81        void googleTalkLineEditClicked(); 
    8082 
    8183private: 
     
    115117 
    116118        MousePressEventFilter * _jabberLineEditMouseEventFilter; 
     119         
     120        MousePressEventFilter * _googleTalkLineEditMouseEventFilter; 
    117121}; 
    118122 
  • wengophone/src/presentation/qt/imcontact/SimpleIMContactManager.ui

    r0 r578  
    1 <ui version="4.0" > 
    2  <author></author> 
    3  <comment></comment> 
    4  <exportmacro></exportmacro> 
     1<?xml version="1.0" encoding="UTF-8"?> 
     2<ui version="4.0"> 
    53 <class>SimpleIMContactManager</class> 
    6  <widget class="QWidget" name="SimpleIMContactManager" > 
    7   <property name="geometry" > 
     4 <widget class="QWidget" name="SimpleIMContactManager"> 
     5  <property name="geometry"> 
    86   <rect> 
    97    <x>0</x> 
    108    <y>0</y> 
    11     <width>400</width> 
    12     <height>307</height> 
     9    <width>472</width> 
     10    <height>369</height> 
    1311   </rect> 
    1412  </property> 
    15   <layout class="QGridLayout" > 
    16    <property name="margin" > 
    17     <number>9</number> 
    18    </property> 
    19    <property name="spacing" > 
    20     <number>6</number> 
    21    </property> 
    22    <item row="3" column="0" > 
    23     <widget class="QLabel" name="icqLabel" > 
    24      <property name="pixmap" > 
    25       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/icq_off.png</pixmap> 
    26      </property> 
    27     </widget> 
    28    </item> 
    29    <item row="3" column="2" > 
    30     <widget class="QLabel" name="label_8" > 
    31      <property name="text" > 
     13  <layout class="QGridLayout" name="gridLayout"> 
     14   <item row="0" column="0"> 
     15    <widget class="QLabel" name="wengoLabel"> 
     16     <property name="maximumSize"> 
     17      <size> 
     18       <width>22</width> 
     19       <height>22</height> 
     20      </size> 
     21     </property> 
     22     <property name="pixmap"> 
     23      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/wengo.png</pixmap> 
     24     </property> 
     25    </widget> 
     26   </item> 
     27   <item row="0" column="1" colspan="2"> 
     28    <widget class="QLabel" name="label_2"> 
     29     <property name="sizePolicy"> 
     30      <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> 
     31       <horstretch>0</horstretch> 
     32       <verstretch>0</verstretch> 
     33      </sizepolicy> 
     34     </property> 
     35     <property name="text"> 
     36      <string>@company@ ID:</string> 
     37     </property> 
     38    </widget> 
     39   </item> 
     40   <item row="0" column="3"> 
     41    <widget class="QLineEdit" name="wengoLineEdit"> 
     42     <property name="enabled"> 
     43      <bool>true</bool> 
     44     </property> 
     45     <property name="text"> 
     46      <string/> 
     47     </property> 
     48    </widget> 
     49   </item> 
     50   <item row="1" column="0"> 
     51    <widget class="QLabel" name="msnLabel"> 
     52     <property name="pixmap"> 
     53      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/msn_off.png</pixmap> 
     54     </property> 
     55    </widget> 
     56   </item> 
     57   <item row="1" column="1"> 
     58    <widget class="QLabel" name="label_4"> 
     59     <property name="text"> 
     60      <string>MSN ID:</string> 
     61     </property> 
     62    </widget> 
     63   </item> 
     64   <item row="1" column="3"> 
     65    <widget class="QLineEdit" name="msnLineEdit"> 
     66     <property name="enabled"> 
     67      <bool>false</bool> 
     68     </property> 
     69     <property name="text"> 
     70      <string>Update your profile</string> 
     71     </property> 
     72    </widget> 
     73   </item> 
     74   <item row="2" column="0"> 
     75    <widget class="QLabel" name="aimLabel"> 
     76     <property name="pixmap"> 
     77      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/aim_off.png</pixmap> 
     78     </property> 
     79    </widget> 
     80   </item> 
     81   <item row="2" column="1"> 
     82    <widget class="QLabel" name="label_7"> 
     83     <property name="text"> 
     84      <string>AIM ID:</string> 
     85     </property> 
     86    </widget> 
     87   </item> 
     88   <item row="2" column="3"> 
     89    <widget class="QLineEdit" name="aimLineEdit"> 
     90     <property name="enabled"> 
     91      <bool>false</bool> 
     92     </property> 
     93     <property name="text"> 
     94      <string>Update your profile</string> 
     95     </property> 
     96    </widget> 
     97   </item> 
     98   <item row="3" column="0"> 
     99    <widget class="QLabel" name="icqLabel"> 
     100     <property name="pixmap"> 
     101      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/icq_off.png</pixmap> 
     102     </property> 
     103    </widget> 
     104   </item> 
     105   <item row="3" column="1"> 
     106    <widget class="QLabel" name="label_8"> 
     107     <property name="text"> 
    32108      <string>ICQ ID:</string> 
    33109     </property> 
    34110    </widget> 
    35111   </item> 
    36    <item row="3" column="3" colspan="2" > 
    37     <widget class="QLineEdit" name="icqLineEdit" > 
    38      <property name="enabled" > 
    39       <bool>false</bool> 
    40      </property> 
    41      <property name="text" > 
    42       <string>Update your profile</string> 
    43      </property> 
    44     </widget> 
    45    </item> 
    46    <item row="8" column="1" colspan="4" > 
     112   <item row="3" column="3"> 
     113    <widget class="QLineEdit" name="icqLineEdit"> 
     114     <property name="enabled"> 
     115      <bool>false</bool> 
     116     </property> 
     117     <property name="text"> 
     118      <string>Update your profile</string> 
     119     </property> 
     120    </widget> 
     121   </item> 
     122   <item row="4" column="0"> 
     123    <widget class="QLabel" name="yahooLabel"> 
     124     <property name="pixmap"> 
     125      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/yahoo_off.png</pixmap> 
     126     </property> 
     127    </widget> 
     128   </item> 
     129   <item row="4" column="1" colspan="2"> 
     130    <widget class="QLabel" name="label_5"> 
     131     <property name="text"> 
     132      <string>Yahoo! ID:</string> 
     133     </property> 
     134    </widget> 
     135   </item> 
     136   <item row="4" column="3"> 
     137    <widget class="QLineEdit" name="yahooLineEdit"> 
     138     <property name="enabled"> 
     139      <bool>false</bool> 
     140     </property> 
     141     <property name="text"> 
     142      <string>Update your profile</string> 
     143     </property> 
     144    </widget> 
     145   </item> 
     146   <item row="5" column="0"> 
     147    <widget class="QLabel" name="googleTalkLabel"> 
     148     <property name="pixmap"> 
     149      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/google-talk_off.png</pixmap> 
     150     </property> 
     151    </widget> 
     152   </item> 
     153   <item row="5" column="1" colspan="2"> 
     154    <widget class="QLabel" name="label_9"> 
     155     <property name="sizePolicy"> 
     156      <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> 
     157       <horstretch>0</horstretch> 
     158       <verstretch>0</verstretch> 
     159      </sizepolicy> 
     160     </property> 
     161     <property name="text"> 
     162      <string>GoogleTalk ID:</string> 
     163     </property> 
     164    </widget> 
     165   </item> 
     166   <item row="5" column="3"> 
     167    <widget class="QLineEdit" name="googleTalkLineEdit"> 
     168     <property name="enabled"> 
     169      <bool>false</bool> 
     170     </property> 
     171     <property name="text"> 
     172      <string>Update your profile</string> 
     173     </property> 
     174    </widget> 
     175   </item> 
     176   <item row="6" column="0"> 
     177    <widget class="QLabel" name="jabberLabel"> 
     178     <property name="pixmap"> 
     179      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/jabber_off.png</pixmap> 
     180     </property> 
     181    </widget> 
     182   </item> 
     183   <item row="6" column="1" colspan="2"> 
     184    <widget class="QLabel" name="label_10"> 
     185     <property name="sizePolicy"> 
     186      <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> 
     187       <horstretch>0</horstretch> 
     188       <verstretch>0</verstretch> 
     189      </sizepolicy> 
     190     </property> 
     191     <property name="text"> 
     192      <string>Jabber ID:</string> 
     193     </property> 
     194    </widget> 
     195   </item> 
     196   <item row="6" column="3"> 
     197    <widget class="QLineEdit" name="jabberLineEdit"> 
     198     <property name="enabled"> 
     199      <bool>false</bool> 
     200     </property> 
     201     <property name="text"> 
     202      <string>Update your profile</string> 
     203     </property> 
     204    </widget> 
     205   </item> 
     206   <item row="7" column="0"> 
     207    <widget class="QLabel" name="sipLabel"> 
     208     <property name="text"> 
     209      <string/> 
     210     </property> 
     211     <property name="pixmap"> 
     212      <pixmap resource="../../../../resources/wengophone.qrc">:/pics/protocols/sip.png</pixmap> 
     213     </property> 
     214    </widget> 
     215   </item> 
     216   <item row="7" column="1"> 
     217    <widget class="QLabel" name="label_3"> 
     218     <property name="text"> 
     219      <string>SIP ID:</string> 
     220     </property> 
     221    </widget> 
     222   </item> 
     223   <item row="7" column="3"> 
     224    <widget class="QLineEdit" name="sipLineEdit"> 
     225     <property name="enabled"> 
     226      <bool>true</bool> 
     227     </property> 
     228     <property name="text"> 
     229      <string/> 
     230     </property> 
     231    </widget> 
     232   </item> 
     233   <item row="8" column="3"> 
     234    <widget class="QLabel" name="label_6"> 
     235     <property name="text"> 
     236      <string>exemple: username@server</string> 
     237     </property> 
     238     <property name="margin"> 
     239      <number>0</number> 
     240     </property> 
     241     <property name="indent"> 
     242      <number>-1</number> 
     243     </property> 
     244    </widget> 
     245   </item> 
     246   <item row="9" column="2" colspan="2"> 
    47247    <spacer> 
    48      <property name="orientation" > 
     248     <property name="orientation"> 
    49249      <enum>Qt::Vertical</enum> 
    50250     </property> 
    51      <property name="sizeHint" > 
     251     <property name="sizeHint" stdset="0"> 
    52252      <size> 
    53253       <width>354</width> 
     
    57257    </spacer> 
    58258   </item> 
    59    <item row="4" column="3" colspan="2" > 
    60     <widget class="QLineEdit" name="yahooLineEdit" > 
    61      <property name="enabled" > 
    62       <bool>false</bool> 
    63      </property> 
    64      <property name="text" > 
    65       <string>Update your profile</string> 
    66      </property> 
    67     </widget> 
    68    </item> 
    69    <item row="5" column="2" colspan="2" > 
    70     <widget class="QLabel" name="label_9" > 
    71      <property name="sizePolicy" > 
    72       <sizepolicy> 
    73        <hsizetype>0</hsizetype> 
    74        <vsizetype>5</vsizetype> 
    75        <horstretch>0</horstretch> 
    76        <verstretch>0</verstretch> 
    77       </sizepolicy> 
    78      </property> 
    79      <property name="text" > 
    80       <string>Jabber/GoogleTalk ID:</string> 
    81      </property> 
    82     </widget> 
    83    </item> 
    84    <item row="6" column="0" colspan="2" > 
    85     <widget class="QLabel" name="sipLabel" > 
    86      <property name="text" > 
    87       <string/> 
    88      </property> 
    89      <property name="pixmap" > 
    90       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/sip.png</pixmap> 
    91      </property> 
    92     </widget> 
    93    </item> 
    94    <item row="6" column="2" > 
    95     <widget class="QLabel" name="label_3" > 
    96      <property name="text" > 
    97       <string>SIP ID:</string> 
    98      </property> 
    99     </widget> 
    100    </item> 
    101    <item row="5" column="4" > 
    102     <widget class="QLineEdit" name="jabberLineEdit" > 
    103      <property name="enabled" > 
    104       <bool>false</bool> 
    105      </property> 
    106      <property name="text" > 
    107       <string>Update your profile</string> 
    108      </property> 
    109     </widget> 
    110    </item> 
    111    <item row="4" column="2" > 
    112     <widget class="QLabel" name="label_5" > 
    113      <property name="text" > 
    114       <string>Yahoo! ID:</string> 
    115      </property> 
    116     </widget> 
    117    </item> 
    118    <item row="5" column="0" colspan="2" > 
    119     <widget class="QLabel" name="jabberLabel" > 
    120      <property name="pixmap" > 
    121       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/jabber_off.png</pixmap> 
    122      </property> 
    123     </widget> 
    124    </item> 
    125    <item row="0" column="0" > 
    126     <widget class="QLabel" name="wengoLabel" > 
    127      <property name="maximumSize" > 
    128       <size> 
    129        <width>22</width> 
    130        <height>22</height> 
    131       </size> 
    132      </property> 
    133      <property name="pixmap" > 
    134       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/wengo.png</pixmap> 
    135      </property> 
    136     </widget> 
    137    </item> 
    138    <item row="1" column="0" colspan="2" > 
    139     <widget class="QLabel" name="msnLabel" > 
    140      <property name="pixmap" > 
    141       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/msn_off.png</pixmap> 
    142      </property> 
    143     </widget> 
    144    </item> 
    145    <item row="2" column="0" colspan="2" > 
    146     <widget class="QLabel" name="aimLabel" > 
    147      <property name="pixmap" > 
    148       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/aim_off.png</pixmap> 
    149      </property> 
    150     </widget> 
    151    </item> 
    152    <item row="4" column="0" colspan="2" > 
    153     <widget class="QLabel" name="yahooLabel" > 
    154      <property name="pixmap" > 
    155       <pixmap resource="../../../../resources/wengophone.qrc" >:/pics/protocols/yahoo_off.png</pixmap> 
    156      </property> 
    157     </widget> 
    158    </item> 
    159    <item row="0" column="2" > 
    160     <widget class="QLabel" name="label_2" > 
    161      <property name="sizePolicy" > 
    162       <sizepolicy> 
    163        <hsizetype>0</hsizetype> 
    164        <vsizetype>5</vsizetype> 
    165        <horstretch>0</horstretch> 
    166        <verstretch>0</verstretch> 
    167       </sizepolicy> 
    168      </property> 
    169      <property name="text" > 
    170       <string>@company@ ID:</string> 
    171      </property> 
    172     </widget> 
    173    </item> 
    174    <item row="1" column="2" > 
    175     <widget class="QLabel" name="label_4" > 
    176      <property name="text" > 
    177       <string>MSN ID:</string> 
    178      </property> 
    179     </widget> 
    180    </item> 
    181    <item row="2" column="2" > 
    182     <widget class="QLabel" name="label_7" > 
    183      <property name="text" > 
    184       <string>AIM ID:</string> 
    185      </property> 
    186     </widget> 
    187    </item> 
    188    <item row="2" column="3" colspan="2" > 
    189     <widget class="QLineEdit" name="aimLineEdit" > 
    190      <property name="enabled" > 
    191       <bool>false</bool> 
    192      </property> 
    193      <property name="text" > 
    194       <string>Update your profile</string> 
    195      </property> 
    196     </widget> 
    197    </item> 
    198    <item row="1" column="3" colspan="2" > 
    199     <widget class="QLineEdit" name="msnLineEdit" > 
    200      <property name="enabled" > 
    201       <bool>false</bool> 
    202      </property> 
    203      <property name="text" > 
    204       <string>Update your profile</string> 
    205      </property> 
    206     </widget> 
    207    </item> 
    208    <item row="0" column="3" colspan="2" > 
    209     <widget class="QLineEdit" name="wengoLineEdit" > 
    210      <property name="enabled" > 
    211       <bool>true</bool> 
    212      </property> 
    213      <property name="text" > 
    214       <string/> 
    215      </property> 
    216     </widget> 
    217    </item> 
    218    <item row="7" column="3" colspan="2" > 
    219     <widget class="QLabel" name="label_6" > 
    220      <property name="text" > 
    221       <string>exemple: username@server</string> 
    222      </property> 
    223      <property name="margin" > 
    224       <number>0</number> 
    225      </property> 
    226      <property name="indent" > 
    227       <number>-1</number> 
    228      </property> 
    229     </widget> 
    230    </item> 
    231    <item row="6" column="3" colspan="2" > 
    232     <widget class="QLineEdit" name="sipLineEdit" > 
    233      <property name="enabled" > 
    234       <bool>true</bool> 
    235      </property> 
    236      <property name="text" > 
    237       <string/> 
    238      </property> 
    239     </widget> 
    240    </item> 
    241259  </layout> 
    242260 </widget> 
    243  <pixmapfunction></pixmapfunction> 
    244261 <tabstops> 
    245262  <tabstop>wengoLineEdit</tabstop> 
     
    247264  <tabstop>aimLineEdit</tabstop> 
    248265  <tabstop>yahooLineEdit</tabstop> 
    249   <tabstop>jabberLineEdit</tabstop> 
     266  <tabstop>googleTalkLineEdit</tabstop> 
    250267 </tabstops> 
    251268 <resources> 
    252   <include location="../../../../resources/wengophone.qrc" /> 
     269  <include location="../../../../resources/wengophone.qrc"/> 
    253270 </resources> 
    254271 <connections/> 
  • wengophone/src/presentation/qt/profilebar/QtIMProfileWidget.cpp

    r219 r578  
    7777                name += "jabber"; 
    7878                break; 
     79         
     80        case EnumIMProtocol::IMProtocolGoogleTalk: 
     81                name += "google-talk"; 
     82                break; 
    7983 
    8084        case EnumIMProtocol::IMProtocolWengo: 
     
    171175        addIMAccountMenu->addAction(QIcon(":pics/protocols/jabber.png"), 
    172176                                QtEnumIMProtocol::toString(QtEnumIMProtocol::IMProtocolJabber)); 
    173         addIMAccountMenu->addAction(QIcon(":pics/protocols/jabber.png"), 
     177        addIMAccountMenu->addAction(QIcon(":pics/protocols/google-talk.png"), 
    174178                                QtEnumIMProtocol::toString(QtEnumIMProtocol::IMProtocolGoogleTalk)); 
    175179        _ui->addIMAccountButton->setPopupMode(QToolButton::InstantPopup); 
Note: See TracChangeset for help on using the changeset viewer.