Improve "Load" button label in PalettePopup to know what it does when there is no active document

This commit is contained in:
David Capello 2014-04-19 20:52:36 -03:00
parent 2c0642d1f1
commit 5ba85c01dc
2 changed files with 6 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<view id="view" expansive="true" />
<hbox>
<hbox expansive="true" />
<button id="load" text="Load" width="60" />
<button id="load" text="Load" width="80" />
<button id="openfolder" text="Open Folder" width="60" />
</hbox>
</vbox>

View File

@ -62,6 +62,11 @@ void PalettePopup::showPopup(gfx::Rect& bounds)
m_load->setEnabled(false);
m_paletteListBox.selectChild(NULL);
if (!UIContext::instance()->getActiveDocument())
m_load->setText("Set as Default");
else
m_load->setText("Load");
moveWindow(bounds);
openWindow();
}