|
|
|
@ -806,7 +806,7 @@ void QuantaApp::slotRepaintPreview()
|
|
|
|
|
encoding = encodingIf->encoding();
|
|
|
|
|
if (encoding.isEmpty())
|
|
|
|
|
encoding = "utf8"; //final fallback
|
|
|
|
|
tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
|
|
|
|
|
tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding.ascii()));
|
|
|
|
|
*(tmpFile->textStream()) << w->editIf->text();
|
|
|
|
|
tmpFile->close();
|
|
|
|
|
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
|
|
|
|
@ -1018,7 +1018,7 @@ void QuantaApp::slotOptionsConfigureKeys()
|
|
|
|
|
{
|
|
|
|
|
if (node.nodeName() == "Action")
|
|
|
|
|
{
|
|
|
|
|
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(node.toElement().attribute("name")));
|
|
|
|
|
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(node.toElement().attribute("name").ascii()));
|
|
|
|
|
if (action)
|
|
|
|
|
{
|
|
|
|
|
action->setModified(true);
|
|
|
|
@ -1044,7 +1044,7 @@ void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
|
|
|
|
|
|
|
|
|
|
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
|
|
|
|
|
KEditToolbar *dlg;
|
|
|
|
|
if (defaultToolbar)
|
|
|
|
|
if (!defaultToolbar.isEmpty())
|
|
|
|
|
dlg = new KEditToolbar(defaultToolbar, factory(), this);
|
|
|
|
|
else
|
|
|
|
|
dlg = new KEditToolbar(factory(), this);
|
|
|
|
@ -1094,7 +1094,7 @@ void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
|
|
|
|
|
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
|
|
|
|
|
for (uint i = 0; i < nodeList.count(); i++)
|
|
|
|
|
{
|
|
|
|
|
KAction *action = ac->action(nodeList.item(i).toElement().attribute("name"));
|
|
|
|
|
KAction *action = ac->action(nodeList.item(i).toElement().attribute("name").ascii());
|
|
|
|
|
if (action)
|
|
|
|
|
action->plug(menu);
|
|
|
|
|
}
|
|
|
|
@ -1792,8 +1792,8 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl
|
|
|
|
|
//avoid TQToolBar warning in the log
|
|
|
|
|
QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
|
|
|
|
|
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
|
|
|
|
|
TQWidget *w = new TQWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
|
|
|
|
|
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name"), true, true);
|
|
|
|
|
TQWidget *w = new TQWidget(toolbarTab, TQString("ToolbarHoldingWidget" + element.attribute("name")).ascii());
|
|
|
|
|
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name").ascii(), true, true);
|
|
|
|
|
tb->loadState(element);
|
|
|
|
|
tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
|
|
|
|
|
|
|
|
|
@ -2234,7 +2234,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
|
|
|
|
|
el = node.toElement();
|
|
|
|
|
TQString actionName = el.attribute("name");
|
|
|
|
|
//if there is no such action yet, add to the available actions
|
|
|
|
|
if (!actionCollection()->action(actionName))
|
|
|
|
|
if (!actionCollection()->action(actionName.ascii()))
|
|
|
|
|
{
|
|
|
|
|
bool toggable = (el.attribute("toggable", "") == "true");
|
|
|
|
|
TagAction *tagAction = new TagAction(&el, this, toggable);
|
|
|
|
@ -2259,7 +2259,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
|
|
|
|
|
} else
|
|
|
|
|
{
|
|
|
|
|
// kdDebug(24000) << "The action " << actionName << " is already present!" << endl;
|
|
|
|
|
TagAction *tagAction = dynamic_cast<TagAction*>(actionCollection()->action(actionName));
|
|
|
|
|
TagAction *tagAction = dynamic_cast<TagAction*>(actionCollection()->action(actionName.ascii()));
|
|
|
|
|
if (tagAction)
|
|
|
|
|
tagAction->setModified(true);
|
|
|
|
|
}
|
|
|
|
@ -2277,7 +2277,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
|
|
|
|
|
nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
|
|
|
|
|
for (uint i = 0; i < nodeList.count(); i++)
|
|
|
|
|
{
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).cloneNode().toElement().attribute("name") );
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).cloneNode().toElement().attribute("name").ascii() );
|
|
|
|
|
if (action)
|
|
|
|
|
{
|
|
|
|
|
action->plug(menu);
|
|
|
|
@ -2324,7 +2324,7 @@ void QuantaApp::showToolbarFile(const KURL &url)
|
|
|
|
|
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
|
|
|
|
|
for (uint i = 0; i < nodeList.count(); i++)
|
|
|
|
|
{
|
|
|
|
|
action = ac->action(nodeList.item(i).toElement().attribute("name") );
|
|
|
|
|
action = ac->action(nodeList.item(i).toElement().attribute("name").ascii() );
|
|
|
|
|
if (action)
|
|
|
|
|
{
|
|
|
|
|
action->plug(menu);
|
|
|
|
@ -2403,7 +2403,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF
|
|
|
|
|
TQDomElement e = n.toElement();
|
|
|
|
|
if (e.tagName() == "Action")
|
|
|
|
|
{
|
|
|
|
|
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name")));
|
|
|
|
|
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name").ascii()));
|
|
|
|
|
if (action)
|
|
|
|
|
{
|
|
|
|
|
action->data().save(actStr,1);
|
|
|
|
@ -2735,7 +2735,7 @@ void QuantaApp::slotSendToolbar()
|
|
|
|
|
TQStringList toolbarFile;
|
|
|
|
|
toolbarFile += tempFileName;
|
|
|
|
|
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email"));
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email").ascii() );
|
|
|
|
|
TQString toStr;
|
|
|
|
|
TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
|
|
|
|
|
TQString titleStr;
|
|
|
|
@ -3285,7 +3285,7 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
|
|
|
|
|
nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
|
|
|
|
|
for (uint i = 0; i < nodeList.count(); i++)
|
|
|
|
|
{
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).toElement().attribute("name"));
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).toElement().attribute("name").ascii());
|
|
|
|
|
if (dynamic_cast<TagAction*>(action) &&
|
|
|
|
|
dynamic_cast<TagAction*>(action)->isModified())
|
|
|
|
|
{
|
|
|
|
@ -3377,7 +3377,7 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
|
|
|
|
|
nodeList = p_toolbar->dom->elementsByTagName("Action");
|
|
|
|
|
for (uint i = 0; i < nodeList.count(); i++)
|
|
|
|
|
{
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).toElement().attribute("name"));
|
|
|
|
|
action = actionCollection()->action(nodeList.item(i).toElement().attribute("name").ascii());
|
|
|
|
|
if (action && !action->isPlugged())
|
|
|
|
|
{
|
|
|
|
|
if (dynamic_cast<TagAction*>(action) &&
|
|
|
|
@ -3609,7 +3609,7 @@ void QuantaApp::slotEmailDTEP()
|
|
|
|
|
TQStringList dtdFile;
|
|
|
|
|
dtdFile += tempFileName;
|
|
|
|
|
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email"));
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email").ascii());
|
|
|
|
|
TQString toStr;
|
|
|
|
|
TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
|
|
|
|
|
TQString titleStr;
|
|
|
|
@ -4558,7 +4558,7 @@ void QuantaApp::slotTagMail()
|
|
|
|
|
Document *w = ViewManager::ref()->activeDocument();
|
|
|
|
|
if (!w) return;
|
|
|
|
|
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)"));
|
|
|
|
|
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)").ascii() );
|
|
|
|
|
|
|
|
|
|
if ( mailDlg->exec() ) {
|
|
|
|
|
TQString tag = TQString(QuantaCommon::tagCase("<a"));
|
|
|
|
@ -4620,7 +4620,7 @@ void QuantaApp::slotTagQuickList()
|
|
|
|
|
Document *w = ViewManager::ref()->activeDocument();
|
|
|
|
|
if (!w) return;
|
|
|
|
|
|
|
|
|
|
TagQuickListDlg *listDlg = new TagQuickListDlg(this,i18n("Generate List"));
|
|
|
|
|
TagQuickListDlg *listDlg = new TagQuickListDlg(this,i18n("Generate List").ascii());
|
|
|
|
|
if ( listDlg->exec() ) {
|
|
|
|
|
int i;
|
|
|
|
|
int n = listDlg->spinBoxRows->value();
|
|
|
|
|