forked from len0rd/rockbox
Theme Editor: Altered the SkinDocument class' handling of tab titles and added a title to the confirm close dialog box, changed tab order in the EditorWindow class
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26607 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5e412b3757
commit
bc9b353c3e
2 changed files with 10 additions and 14 deletions
|
@ -272,6 +272,13 @@
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>fileTree</tabstop>
|
||||||
|
<tabstop>skinPreview</tabstop>
|
||||||
|
<tabstop>parseTree</tabstop>
|
||||||
|
<tabstop>fromTree</tabstop>
|
||||||
|
<tabstop>editorTabs</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -54,6 +54,7 @@ bool SkinDocument::requestClose()
|
||||||
{
|
{
|
||||||
/* Spawning the "Are you sure?" dialog */
|
/* Spawning the "Are you sure?" dialog */
|
||||||
QMessageBox confirm(this);
|
QMessageBox confirm(this);
|
||||||
|
confirm.setWindowTitle(tr("Confirm Close"));
|
||||||
confirm.setText(title + tr(" has been modified."));
|
confirm.setText(title + tr(" has been modified."));
|
||||||
confirm.setInformativeText(tr("Do you want to save your changes?"));
|
confirm.setInformativeText(tr("Do you want to save your changes?"));
|
||||||
confirm.setStandardButtons(QMessageBox::Save | QMessageBox::Discard
|
confirm.setStandardButtons(QMessageBox::Save | QMessageBox::Discard
|
||||||
|
@ -109,22 +110,10 @@ void SkinDocument::codeChanged()
|
||||||
model->changeTree(editor->document()->toPlainText().toAscii());
|
model->changeTree(editor->document()->toPlainText().toAscii());
|
||||||
|
|
||||||
if(editor->document()->toPlainText() != saved)
|
if(editor->document()->toPlainText() != saved)
|
||||||
{
|
emit titleChanged(title + QChar('*'));
|
||||||
if(title.length() > 0 && title[title.length() - 1] != '*')
|
|
||||||
{
|
|
||||||
title.append('*');
|
|
||||||
emit titleChanged(title);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if(title.length() > 0 && title[title.length() - 1] == '*')
|
|
||||||
{
|
|
||||||
title.chop(1);
|
|
||||||
emit titleChanged(title);
|
emit titleChanged(title);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SkinDocument::save()
|
void SkinDocument::save()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue