summaryrefslogtreecommitdiffstats
path: root/kopete/kopete/chatwindow
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/kopete/chatwindow')
-rw-r--r--kopete/kopete/chatwindow/chatmessagepart.cpp12
-rw-r--r--kopete/kopete/chatwindow/chatview.cpp14
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindow.cpp24
-rw-r--r--kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp4
-rw-r--r--kopete/kopete/chatwindow/kopeteemailwindow.cpp12
-rw-r--r--kopete/kopete/chatwindow/kopeteemoticonaction.cpp2
-rw-r--r--kopete/kopete/chatwindow/krichtexteditpart.cpp22
-rw-r--r--kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp2
8 files changed, 46 insertions, 46 deletions
diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp
index fbd8fa2c..341e4c47 100644
--- a/kopete/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/kopete/chatwindow/chatmessagepart.cpp
@@ -296,9 +296,9 @@ void ChatMessagePart::slotImportEmoticon()
TQString emo = d->activeElement.getAttribute("src").string();
TQString themeName = KopetePrefs::prefs()->iconTheme();
- KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false ));
+ KIO::copy(emo, TDEGlobal::dirs()->saveLocation( "emoticons", themeName, false ));
- TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
+ TQFile *fp = new TQFile(TDEGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml");
TQDomDocument themeXml;
@@ -356,7 +356,7 @@ void ChatMessagePart::save()
for(it = d->allMessages.constBegin(); it != itEnd; ++it)
{
Kopete::Message tempMessage = *it;
- stream << "[" << KGlobal::locale()->formatDateTime(tempMessage.timestamp()) << "] ";
+ stream << "[" << TDEGlobal::locale()->formatDateTime(tempMessage.timestamp()) << "] ";
if( tempMessage.from() && tempMessage.from()->metaContact() )
{
stream << formatName(tempMessage.from()->metaContact()->displayName());
@@ -1022,7 +1022,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
iconName = message.from()->protocol()->pluginIcon();
}
- protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small );
+ protocolIcon = TDEGlobal::iconLoader()->iconPath( iconName, KIcon::Small );
nickLink=TQString::fromLatin1("<a href=\"kopetemessage://%1/?protocolId=%2&amp;accountId=%3\" class=\"KopeteDisplayName\">")
.arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"&quot;"),
@@ -1038,7 +1038,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const
// Replace sender (contact nick)
resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"</a>" );
// Replace time, by default display only time and display seconds(that was true means).
- resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), TDEGlobal::locale()->formatTime(message.timestamp().time(), true) );
// Replace %screenName% (contact ID)
resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"</a>" );
// Replace service name (protocol name)
@@ -1186,7 +1186,7 @@ TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML )
// Replace %destinationName%
resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) );
// For %timeOpened%, display the date and time (also the seconds).
- resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) );
+ resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) );
// Look for %timeOpened{X}%
TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%");
diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp
index 52ed7fb7..da3288b0 100644
--- a/kopete/kopete/chatwindow/chatview.cpp
+++ b/kopete/kopete/chatwindow/chatview.cpp
@@ -477,16 +477,16 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp )
// look up the dock width
int dockWidth;
- KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
+ TDEGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
if( membersDockPosition == KDockWidget::DockLeft )
{
- dockWidth = KGlobal::config()->readNumEntry(
+ dockWidth = TDEGlobal::config()->readNumEntry(
TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30);
}
else
{
- dockWidth = KGlobal::config()->readNumEntry(
+ dockWidth = TDEGlobal::config()->readNumEntry(
TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70);
}
@@ -834,7 +834,7 @@ void ChatView::messageSentSuccessfully()
void ChatView::saveOptions()
{
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) );
config->setGroup( TQString::fromLatin1( "ChatViewDock" ) );
@@ -858,7 +858,7 @@ void ChatView::saveChatSettings()
if ( !mc )
return;
- KConfig* config = KGlobal::config();
+ KConfig* config = TDEGlobal::config();
TQString contactListGroup = TQString::fromLatin1("chatwindow_") +
mc->metaContactId();
@@ -878,7 +878,7 @@ void ChatView::loadChatSettings()
//read settings for metacontact
TQString contactListGroup = TQString::fromLatin1("chatwindow_") +
contacts.first()->metaContact()->metaContactId();
- KConfig* config = KGlobal::config();
+ KConfig* config = TDEGlobal::config();
config->setGroup( contactListGroup );
bool enableRichText = config->readBoolEntry( "EnableRichText", true );
editPart()->slotSetRichTextEnabled( enableRichText );
@@ -889,7 +889,7 @@ void ChatView::loadChatSettings()
void ChatView::readOptions()
{
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
/** THIS IS BROKEN !!! */
//dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") );
diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp
index 730f26cc..45ff87cf 100644
--- a/kopete/kopete/chatwindow/kopetechatwindow.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp
@@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name )
windows.append( this );
windowListChanged();
- KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
- m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false );
- m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true );
+ TDEGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
+ m_alwaysShowTabs = TDEGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false );
+ m_showFormatToolbar = TDEGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true );
adjustingFormatToolbar = false;
// kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl;
kapp->ref();
@@ -398,7 +398,7 @@ void KopeteChatWindow::initActions(void)
//The Sending movie
normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) );
- animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
+ animIcon = TDEGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
// Pause the animation because otherwise it's running even when we're not
// showing it. This eats resources, and also triggers a pixmap leak in
@@ -590,11 +590,11 @@ void KopeteChatWindow::createTabBar()
{
if( !m_tabBar )
{
- KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
+ TDEGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") );
m_tabBar = new KTabWidget( mainArea );
m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
- m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false ));
+ m_tabBar->setHoverCloseButton(TDEGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false ));
m_tabBar->setTabReorderingEnabled(true);
#if KDE_IS_VERSION(3,4,0)
m_tabBar->setAutomaticResizeTabs(true);
@@ -621,7 +621,7 @@ void KopeteChatWindow::createTabBar()
else
setActiveView( chatViewList.first() );
- int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 );
+ int tabPosition = TDEGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 );
slotPlaceTabs( tabPosition );
}
}
@@ -1031,7 +1031,7 @@ void KopeteChatWindow::readOptions()
{
// load and apply config file settings affecting the appearance of the UI
// kdDebug(14010) << k_funcinfo << endl;
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) );
config->setGroup( TQString::fromLatin1("ChatWindowSettings") );
m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true );
@@ -1041,7 +1041,7 @@ void KopeteChatWindow::saveOptions()
{
// kdDebug(14010) << k_funcinfo << endl;
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
// saves menubar,toolbar and statusbar setting
saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) );
@@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys()
void KopeteChatWindow::slotConfToolbar()
{
- saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
+ saveMainWindowSettings(TDEGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
KEditToolbar *dlg = new KEditToolbar(factory(), this );
if (dlg->exec())
{
@@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar()
createGUI( m_activeView->editPart() );
else
createGUI( 0L );
- applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
+ applyMainWindowSettings(TDEGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" ));
}
delete dlg;
}
@@ -1247,7 +1247,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState )
break;
case ChatView::Normal:
default:
- m_tabBar->setTabColor( cv, KGlobalSettings::textColor() );
+ m_tabBar->setTabColor( cv, TDEGlobalSettings::textColor() );
break;
}
}
diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
index 67e36f3d..cf54985f 100644
--- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
+++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp
@@ -96,7 +96,7 @@ ChatWindowStyleManager::~ChatWindowStyleManager()
void ChatWindowStyleManager::loadStyles()
{
- TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) );
+ TQStringList chatStyles = TDEGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) );
TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) );
if( !chatStyles.contains(localStyleDir))
chatStyles<<localStyleDir;
@@ -319,7 +319,7 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &styleP
// NOTE: This is a hidden config switch for style developers
// Check in the config if the cache is disabled.
// if the cache is disabled, reload the style everytime it's getted.
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
config->setGroup("KopeteStyleDebug");
bool disableCache = config->readBoolEntry("disableStyleCache", false);
if(disableCache)
diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/kopete/chatwindow/kopeteemailwindow.cpp
index bb70481f..ef51c020 100644
--- a/kopete/kopete/chatwindow/kopeteemailwindow.cpp
+++ b/kopete/kopete/chatwindow/kopeteemailwindow.cpp
@@ -175,7 +175,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP
else
toggleMode( Send );
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
applyMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) );
d->sendInProgress = false;
@@ -195,7 +195,7 @@ KopeteEmailWindow::~KopeteEmailWindow()
emit( closing( this ) );
// saves menubar, toolbar and statusbar setting
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
saveMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) );
config->sync();
@@ -239,7 +239,7 @@ void KopeteEmailWindow::initActions(void)
// The animated toolbarbutton
d->normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) );
- d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
+ d->animIcon = TDEGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar);
d->animIcon.pause();
d->anim = new TQLabel( this, "kde toolbar widget" );
@@ -280,12 +280,12 @@ void KopeteEmailWindow::slotSmileyActivated(const TQString &sm )
void KopeteEmailWindow::slotConfToolbar()
{
- saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
+ saveMainWindowSettings(TDEGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::fromLatin1("kopeteemailwindow.rc") );
if (dlg->exec())
{
createGUI( d->editPart );
- applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
+ applyMainWindowSettings(TDEGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" ));
}
delete dlg;
}
@@ -334,7 +334,7 @@ void KopeteEmailWindow::updateNextButton()
{
d->btnReadNext->setEnabled( false );
- d->btnReadNext->setPaletteForegroundColor( KGlobalSettings::textColor() );
+ d->btnReadNext->setPaletteForegroundColor( TDEGlobalSettings::textColor() );
}
else
d->btnReadNext->setEnabled( true );
diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
index 6cdfedbd..4be23dd4 100644
--- a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
+++ b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp
@@ -177,7 +177,7 @@ int KopeteEmoticonAction::plug( TQWidget* widget, int index )
if ( m_parentCollection )
instance = m_parentCollection->instance();
else
- instance = KGlobal::instance();
+ instance = TDEGlobal::instance();
bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
diff --git a/kopete/kopete/chatwindow/krichtexteditpart.cpp b/kopete/kopete/chatwindow/krichtexteditpart.cpp
index ed05e036..16ebe584 100644
--- a/kopete/kopete/chatwindow/krichtexteditpart.cpp
+++ b/kopete/kopete/chatwindow/krichtexteditpart.cpp
@@ -300,19 +300,19 @@ void KopeteRichTextEditPart::readConfig()
{
// Don't update config untill we read whole config first
m_configWriteLock = true;
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
config->setGroup("RichTextEditor");
- TQColor tmpColor = KGlobalSettings::textColor();
+ TQColor tmpColor = TDEGlobalSettings::textColor();
setFgColor( config->readColorEntry("FgColor", &tmpColor ) );
- tmpColor = KGlobalSettings::baseColor();
+ tmpColor = TDEGlobalSettings::baseColor();
setBgColor( config->readColorEntry("BgColor", &tmpColor ) );
TQFont tmpFont = KopetePrefs::prefs()->fontFace();
setFont( config->readFontEntry("Font", &tmpFont ) );
- int tmp = KGlobalSettings::generalFont().pixelSize();
+ int tmp = TDEGlobalSettings::generalFont().pixelSize();
setFontSize( config->readNumEntry( "FontSize", tmp ) );
action_bold->setChecked( config->readBoolEntry( "FontBold" ) );
@@ -342,7 +342,7 @@ void KopeteRichTextEditPart::writeConfig()
// If true we're still reading the conf write now, so don't write.
if( m_configWriteLock ) return;
- KConfig *config = KGlobal::config();
+ KConfig *config = TDEGlobal::config();
config->setGroup("RichTextEditor");
config->writeEntry("Font", mFont );
config->writeEntry("FontSize", mFont.pointSize() );
@@ -359,9 +359,9 @@ void KopeteRichTextEditPart::setFgColor()
{
TQColor col=editor->color();
- int s = KColorDialog::getColor( col, KGlobalSettings::textColor() , editor );
+ int s = KColorDialog::getColor( col, TDEGlobalSettings::textColor() , editor );
if(!col.isValid())
- col= KGlobalSettings::textColor() ;
+ col= TDEGlobalSettings::textColor() ;
if ( s != TQDialog::Accepted )
return;
@@ -391,7 +391,7 @@ void KopeteRichTextEditPart::setFgColor( const TQColor &newColor )
TQColor KopeteRichTextEditPart::fgColor()
{
- if( mFgColor == KGlobalSettings::textColor())
+ if( mFgColor == TDEGlobalSettings::textColor())
return TQColor();
return mFgColor;
}
@@ -400,10 +400,10 @@ void KopeteRichTextEditPart::setBgColor()
{
TQColor col=mBgColor;
- int s = KColorDialog::getColor( col, KGlobalSettings::baseColor(), editor );
+ int s = KColorDialog::getColor( col, TDEGlobalSettings::baseColor(), editor );
if(!col.isValid())
{
- col=KGlobalSettings::baseColor();
+ col=TDEGlobalSettings::baseColor();
}
if ( s != TQDialog::Accepted )
@@ -431,7 +431,7 @@ void KopeteRichTextEditPart::setBgColor( const TQColor &newColor )
TQColor KopeteRichTextEditPart::bgColor()
{
- if( mBgColor == KGlobalSettings::baseColor())
+ if( mBgColor == TDEGlobalSettings::baseColor())
return TQColor();
return mBgColor;
}
diff --git a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
index fad57bb2..d195434d 100644
--- a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
+++ b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp
@@ -205,7 +205,7 @@ void ChatWindowStyleRendering_Test::testHeaderRendering()
"<div>Outgoing/buddy_icon.png</div>\n"
"<div>%1</div>\n"
"<div>%2</div>"
- ).arg(KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) )
+ ).arg(TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) )
.arg(TQDateTime::currentDateTime().toString("hh:mm"));
TQString headerHtml = d->testStyle->getHeaderHtml();