@ -209,7 +209,7 @@ void KopeteWindow::initActions()
actionCollection ( ) , " AddContact " ) ;
actionCollection ( ) , " AddContact " ) ;
actionAddContact - > setDelayed ( false ) ;
actionAddContact - > setDelayed ( false ) ;
// this signal mapper is needed to call slotAddContact with the correct arguments
// this signal mapper is needed to call slotAddContact with the correct arguments
addContactMapper = new TQSignalMapper ( TQT_TQOBJECT ( this ) ) ;
addContactMapper = new TQSignalMapper ( this ) ;
connect ( addContactMapper , TQT_SIGNAL ( mapped ( const TQString & ) ) ,
connect ( addContactMapper , TQT_SIGNAL ( mapped ( const TQString & ) ) ,
this , TQT_SLOT ( slotAddContactDialogInternal ( const TQString & ) ) ) ;
this , TQT_SLOT ( slotAddContactDialogInternal ( const TQString & ) ) ) ;
@ -220,10 +220,10 @@ void KopeteWindow::initActions()
*/
*/
actionDisconnect = new TDEAction ( i18n ( " O&ffline " ) , " connect_no " ,
actionDisconnect = new TDEAction ( i18n ( " O&ffline " ) , " connect_no " ,
0 , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotDisconnectAll ( ) ) ,
0 , this , TQT_SLOT ( slotDisconnectAll ( ) ) ,
actionCollection ( ) , " DisconnectAll " ) ;
actionCollection ( ) , " DisconnectAll " ) ;
actionExportContacts = new TDEAction ( i18n ( " &Export Contacts... " ) , " " , 0 , TQT_TQOBJECT ( this ) ,
actionExportContacts = new TDEAction ( i18n ( " &Export Contacts... " ) , " " , 0 , this ,
TQT_SLOT ( showExportDialog ( ) ) , actionCollection ( ) , " ExportContacts " ) ;
TQT_SLOT ( showExportDialog ( ) ) , actionCollection ( ) , " ExportContacts " ) ;
/* the connection menu has been replaced by the set status menu
/* the connection menu has been replaced by the set status menu
@ -238,16 +238,16 @@ void KopeteWindow::initActions()
actionDisconnect - > setEnabled ( false ) ;
actionDisconnect - > setEnabled ( false ) ;
selectAway = new TDEAction ( i18n ( " &Away " ) , SmallIcon ( " kopeteaway " ) , 0 ,
selectAway = new TDEAction ( i18n ( " &Away " ) , SmallIcon ( " kopeteaway " ) , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotGlobalAway ( ) ) , actionCollection ( ) ,
this , TQT_SLOT ( slotGlobalAway ( ) ) , actionCollection ( ) ,
" SetAwayAll " ) ;
" SetAwayAll " ) ;
selectBusy = new TDEAction ( i18n ( " &Busy " ) , SmallIcon ( " kopeteaway " ) , 0 ,
selectBusy = new TDEAction ( i18n ( " &Busy " ) , SmallIcon ( " kopeteaway " ) , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotGlobalBusy ( ) ) , actionCollection ( ) ,
this , TQT_SLOT ( slotGlobalBusy ( ) ) , actionCollection ( ) ,
" SetBusyAll " ) ;
" SetBusyAll " ) ;
actionSetInvisible = new TDEAction ( i18n ( " &Invisible " ) , " kopeteavailable " , 0 ,
actionSetInvisible = new TDEAction ( i18n ( " &Invisible " ) , " kopeteavailable " , 0 ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotSetInvisibleAll ( ) ) , actionCollection ( ) ,
this , TQT_SLOT ( slotSetInvisibleAll ( ) ) , actionCollection ( ) ,
" SetInvisibleAll " ) ;
" SetInvisibleAll " ) ;
@ -258,7 +258,7 @@ void KopeteWindow::initActions()
" SetAvailableAll " ) ; */
" SetAvailableAll " ) ; */
actionSetAvailable = new TDEAction ( i18n ( " &Online " ) ,
actionSetAvailable = new TDEAction ( i18n ( " &Online " ) ,
SmallIcon ( " kopeteavailable " ) , 0 , TQT_TQOBJECT ( this ) ,
SmallIcon ( " kopeteavailable " ) , 0 , this ,
TQT_SLOT ( slotGlobalAvailable ( ) ) , actionCollection ( ) ,
TQT_SLOT ( slotGlobalAvailable ( ) ) , actionCollection ( ) ,
" SetAvailableAll " ) ;
" SetAvailableAll " ) ;
@ -273,25 +273,25 @@ void KopeteWindow::initActions()
actionPrefs = KopeteStdAction : : preferences ( actionCollection ( ) , " settings_prefs " ) ;
actionPrefs = KopeteStdAction : : preferences ( actionCollection ( ) , " settings_prefs " ) ;
KStdAction : : quit ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotQuit ( ) ) , actionCollection ( ) ) ;
KStdAction : : quit ( this , TQT_SLOT ( slotQuit ( ) ) , actionCollection ( ) ) ;
setStandardToolBarMenuEnabled ( true ) ;
setStandardToolBarMenuEnabled ( true ) ;
menubarAction = KStdAction : : showMenubar ( TQT_TQOBJECT ( this ) , TQT_SLOT ( showMenubar ( ) ) , actionCollection ( ) , " settings_showmenubar " ) ;
menubarAction = KStdAction : : showMenubar ( this , TQT_SLOT ( showMenubar ( ) ) , actionCollection ( ) , " settings_showmenubar " ) ;
statusbarAction = KStdAction : : showStatusbar ( TQT_TQOBJECT ( this ) , TQT_SLOT ( showStatusbar ( ) ) , actionCollection ( ) , " settings_showstatusbar " ) ;
statusbarAction = KStdAction : : showStatusbar ( this , TQT_SLOT ( showStatusbar ( ) ) , actionCollection ( ) , " settings_showstatusbar " ) ;
KStdAction : : keyBindings ( guiFactory ( ) , TQT_SLOT ( configureShortcuts ( ) ) , actionCollection ( ) , " settings_keys " ) ;
KStdAction : : keyBindings ( guiFactory ( ) , TQT_SLOT ( configureShortcuts ( ) ) , actionCollection ( ) , " settings_keys " ) ;
new TDEAction ( i18n ( " Configure Plugins... " ) , " preferences-desktop-peripherals " , 0 , TQT_TQOBJECT ( this ) ,
new TDEAction ( i18n ( " Configure Plugins... " ) , " preferences-desktop-peripherals " , 0 , this ,
TQT_SLOT ( slotConfigurePlugins ( ) ) , actionCollection ( ) , " settings_plugins " ) ;
TQT_SLOT ( slotConfigurePlugins ( ) ) , actionCollection ( ) , " settings_plugins " ) ;
new TDEAction ( i18n ( " Configure &Global Shortcuts... " ) , " configure_shortcuts " , 0 , TQT_TQOBJECT ( this ) ,
new TDEAction ( i18n ( " Configure &Global Shortcuts... " ) , " configure_shortcuts " , 0 , this ,
TQT_SLOT ( slotConfGlobalKeys ( ) ) , actionCollection ( ) , " settings_global " ) ;
TQT_SLOT ( slotConfGlobalKeys ( ) ) , actionCollection ( ) , " settings_global " ) ;
KStdAction : : configureToolbars ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotConfToolbar ( ) ) , actionCollection ( ) ) ;
KStdAction : : configureToolbars ( this , TQT_SLOT ( slotConfToolbar ( ) ) , actionCollection ( ) ) ;
KStdAction : : configureNotifications ( TQT_TQOBJECT ( this ) , TQT_SLOT ( slotConfNotifications ( ) ) , actionCollection ( ) , " settings_notifications " ) ;
KStdAction : : configureNotifications ( this , TQT_SLOT ( slotConfNotifications ( ) ) , actionCollection ( ) , " settings_notifications " ) ;
actionShowOffliners = new TDEToggleAction ( i18n ( " Show Offline &Users " ) , " show_offliners " , CTRL + Key_U ,
actionShowOffliners = new TDEToggleAction ( i18n ( " Show Offline &Users " ) , " show_offliners " , CTRL + Key_U ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleShowOffliners ( ) ) , actionCollection ( ) , " settings_show_offliners " ) ;
this , TQT_SLOT ( slotToggleShowOffliners ( ) ) , actionCollection ( ) , " settings_show_offliners " ) ;
actionShowEmptyGroups = new TDEToggleAction ( i18n ( " Show Empty &Groups " ) , " folder " , CTRL + Key_G ,
actionShowEmptyGroups = new TDEToggleAction ( i18n ( " Show Empty &Groups " ) , " folder " , CTRL + Key_G ,
TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleShowEmptyGroups ( ) ) , actionCollection ( ) , " settings_show_empty_groups " ) ;
this , TQT_SLOT ( slotToggleShowEmptyGroups ( ) ) , actionCollection ( ) , " settings_show_empty_groups " ) ;
actionShowOffliners - > setCheckedState ( i18n ( " Hide Offline &Users " ) ) ;
actionShowOffliners - > setCheckedState ( i18n ( " Hide Offline &Users " ) ) ;
actionShowEmptyGroups - > setCheckedState ( i18n ( " Hide Empty &Groups " ) ) ;
actionShowEmptyGroups - > setCheckedState ( i18n ( " Hide Empty &Groups " ) ) ;
@ -306,7 +306,7 @@ void KopeteWindow::initActions()
// quick search bar - clear button
// quick search bar - clear button
TDEAction * resetQuickSearch = new TDEAction ( i18n ( " Reset Quick Search " ) ,
TDEAction * resetQuickSearch = new TDEAction ( i18n ( " Reset Quick Search " ) ,
TQApplication : : reverseLayout ( ) ? " clear_left " : " locationbar_erase " ,
TQApplication : : reverseLayout ( ) ? " clear_left " : " locationbar_erase " ,
0 , TQT_TQOBJECT( searchBar) , TQT_SLOT ( clear ( ) ) , actionCollection ( ) , " quicksearch_reset " ) ;
0 , searchBar, TQT_SLOT ( clear ( ) ) , actionCollection ( ) , " quicksearch_reset " ) ;
resetQuickSearch - > setWhatsThis ( i18n ( " Reset Quick Search \n "
resetQuickSearch - > setWhatsThis ( i18n ( " Reset Quick Search \n "
" Resets the quick search so that all contacts and groups are shown again. " ) ) ;
" Resets the quick search so that all contacts and groups are shown again. " ) ) ;
@ -323,18 +323,18 @@ void KopeteWindow::initActions()
connect ( setStatusMenu - > popupMenu ( ) , TQT_SIGNAL ( activated ( int ) ) , TQT_SLOT ( slotStatusMessageSelected ( int ) ) ) ;
connect ( setStatusMenu - > popupMenu ( ) , TQT_SIGNAL ( activated ( int ) ) , TQT_SLOT ( slotStatusMessageSelected ( int ) ) ) ;
// sync actions, config and prefs-dialog
// sync actions, config and prefs-dialog
connect ( KopetePrefs : : prefs ( ) , TQT_SIGNAL ( saved ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotConfigChanged ( ) ) ) ;
connect ( KopetePrefs : : prefs ( ) , TQT_SIGNAL ( saved ( ) ) , this , TQT_SLOT ( slotConfigChanged ( ) ) ) ;
slotConfigChanged ( ) ;
slotConfigChanged ( ) ;
globalAccel = new TDEGlobalAccel ( TQT_TQOBJECT ( this ) ) ;
globalAccel = new TDEGlobalAccel ( this ) ;
globalAccel - > insert ( TQString : : fromLatin1 ( " Read Message " ) , i18n ( " Read Message " ) , i18n ( " Read the next pending message " ) ,
globalAccel - > insert ( TQString : : fromLatin1 ( " Read Message " ) , i18n ( " Read Message " ) , i18n ( " Read the next pending message " ) ,
CTRL + SHIFT + Key_I , KKey : : QtWIN + CTRL + Key_I , Kopete : : ChatSessionManager : : self ( ) , TQT_SLOT ( slotReadMessage ( ) ) ) ;
CTRL + SHIFT + Key_I , KKey : : QtWIN + CTRL + Key_I , Kopete : : ChatSessionManager : : self ( ) , TQT_SLOT ( slotReadMessage ( ) ) ) ;
globalAccel - > insert ( TQString : : fromLatin1 ( " Show/Hide Contact List " ) , i18n ( " Show/Hide Contact List " ) , i18n ( " Show or hide the contact list " ) ,
globalAccel - > insert ( TQString : : fromLatin1 ( " Show/Hide Contact List " ) , i18n ( " Show/Hide Contact List " ) , i18n ( " Show or hide the contact list " ) ,
CTRL + SHIFT + Key_S , KKey : : QtWIN + CTRL + Key_S , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotShowHide ( ) ) ) ;
CTRL + SHIFT + Key_S , KKey : : QtWIN + CTRL + Key_S , this , TQT_SLOT ( slotShowHide ( ) ) ) ;
globalAccel - > insert ( TQString : : fromLatin1 ( " Set Away/Back " ) , i18n ( " Set Away/Back " ) , i18n ( " Sets away from keyboard or sets back " ) ,
globalAccel - > insert ( TQString : : fromLatin1 ( " Set Away/Back " ) , i18n ( " Set Away/Back " ) , i18n ( " Sets away from keyboard or sets back " ) ,
CTRL + SHIFT + Key_W , KKey : : QtWIN + CTRL + SHIFT + Key_W , TQT_TQOBJECT ( this ) , TQT_SLOT ( slotToggleAway ( ) ) ) ;
CTRL + SHIFT + Key_W , KKey : : QtWIN + CTRL + SHIFT + Key_W , this , TQT_SLOT ( slotToggleAway ( ) ) ) ;
globalAccel - > readSettings ( ) ;
globalAccel - > readSettings ( ) ;
globalAccel - > updateConnections ( ) ;
globalAccel - > updateConnections ( ) ;
@ -722,7 +722,7 @@ void KopeteWindow::slotAccountRegistered( Kopete::Account *account )
TQT_SLOT ( slotAccountStatusIconRightClicked ( Kopete : : Account * ,
TQT_SLOT ( slotAccountStatusIconRightClicked ( Kopete : : Account * ,
const TQPoint & ) ) ) ;
const TQPoint & ) ) ) ;
m_accountStatusBarIcons . insert ( account , TQT_TQOBJECT( sbIcon) ) ;
m_accountStatusBarIcons . insert ( account , sbIcon ) ;
slotAccountStatusIconChanged ( account - > myself ( ) ) ;
slotAccountStatusIconChanged ( account - > myself ( ) ) ;
// add an item for this account to the add contact actionmenu
// add an item for this account to the add contact actionmenu
@ -744,7 +744,7 @@ void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account)
}
}
// the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key.
// the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key.
KopeteAccountStatusBarIcon * sbIcon = static_cast < KopeteAccountStatusBarIcon * > ( TQT_TQWIDGET( m_accountStatusBarIcons[ ( void * ) account ] ) ) ;
KopeteAccountStatusBarIcon * sbIcon = static_cast < KopeteAccountStatusBarIcon * > ( m_accountStatusBarIcons[ ( void * ) account ] ) ;
if ( ! sbIcon )
if ( ! sbIcon )
return ;
return ;
@ -816,7 +816,7 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact )
}
}
}
}
KopeteAccountStatusBarIcon * i = static_cast < KopeteAccountStatusBarIcon * > ( TQT_TQWIDGET( m_accountStatusBarIcons[ contact - > account ( ) ] ) ) ;
KopeteAccountStatusBarIcon * i = static_cast < KopeteAccountStatusBarIcon * > ( m_accountStatusBarIcons[ contact - > account ( ) ] ) ;
if ( ! i )
if ( ! i )
return ;
return ;