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