fixed issue 1011

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent d72ae38b7f
commit c03df6ae26
  1. 27
      src/core/UBApplication.cpp
  2. 13
      src/gui/UBTeacherGuideWidgetsTools.cpp
  3. 4
      src/gui/UBTeacherGuideWidgetsTools.h

@ -357,33 +357,6 @@ int UBApplication::exec(const QString& pFileToImport)
else
applicationController->showBoard();
// if (UBSettings::settings()->appIsInSoftwareUpdateProcess->get().toBool())
// {
// UBSettings::settings()->appIsInSoftwareUpdateProcess->set(false);
// // clean potential updater in temp directory
// UBFileSystemUtils::cleanupGhostTempFolders();
// QUuid docUuid( UBSettings::settings()->appLastSessionDocumentUUID->get().toString());
// if (!docUuid.isNull())
// {
// UBDocumentProxy* proxy = UBPersistenceManager::persistenceManager()->documentByUuid(docUuid);
// if (proxy)
// {
// bool ok;
// int lastSceneIndex = UBSettings::settings()->appLastSessionPageIndex->get().toInt(&ok);
// if (!ok)
// lastSceneIndex = 0;
// boardController->setActiveDocumentScene(proxy, lastSceneIndex);
// }
// }
// }
return QApplication::exec();
}

@ -520,6 +520,8 @@ void UBTGMediaWidget::mousePressEvent(QMouseEvent *event)
}
}
/***************************************************************************
* class UBTGUrlWidget *
***************************************************************************/
@ -531,10 +533,12 @@ UBTGUrlWidget::UBTGUrlWidget(QWidget* parent, const char* name ):QWidget(parent)
setObjectName(name);
SET_STYLE_SHEET();
mpLayout = new QVBoxLayout(this);
setLayout(mpLayout);
mpTitle = new QLineEdit(this);
mpTitle->setObjectName("UBTGLineEdit");
mpTitle->setPlaceholderText(tr("Insert link title here..."));
mpUrl = new QLineEdit(this);
connect(mpUrl,SIGNAL(editingFinished()),this,SLOT(onUrlEditionFinished()));
mpUrl->setObjectName("UBTGLineEdit");
mpUrl->setPlaceholderText("http://");
mpLayout->addWidget(mpTitle);
@ -548,6 +552,15 @@ UBTGUrlWidget::~UBTGUrlWidget()
DELETEPTR(mpLayout);
}
void UBTGUrlWidget::onUrlEditionFinished()
{
QString url = mpUrl->text();
if(url.length() && !url.startsWith("http://") && !url.startsWith("https://") && !url.startsWith("ftp://") && !url.startsWith("sftp://") && !url.startsWith("http://")){
mpUrl->setText("http://" + mpUrl->text());
setFocus();
}
}
void UBTGUrlWidget::initializeWithDom(QDomElement element)
{
mpTitle->setText(element.attribute("title"));

@ -178,6 +178,10 @@ public:
~UBTGUrlWidget();
tUBGEElementNode* saveData();
void initializeWithDom(QDomElement element);
public slots:
void onUrlEditionFinished();
private:
QVBoxLayout* mpLayout;
QLineEdit* mpTitle;

Loading…
Cancel
Save