Commit bf0d6fe1 authored by Craig Watson's avatar Craig Watson

Removed 'Set as background' button for images, since that feature is now...

Removed 'Set as background' button for images, since that feature is now accessible from the image menu on the board
parent 86ced718
......@@ -867,7 +867,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
, mpButtonLayout(NULL)
, mpAddPageButton(NULL)
, mpAddToLibButton(NULL)
, mpSetAsBackgroundButton(NULL)
, mpObjInfoLabel(NULL)
, mpObjInfos(NULL)
, mpThumbnail(NULL)
......@@ -899,10 +898,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
mpAddPageButton->setText(tr("Add to page"));
mpButtonLayout->addWidget(mpAddPageButton);
mpSetAsBackgroundButton = new UBFeatureItemButton();
mpSetAsBackgroundButton->setText(tr("Set as background"));
mpButtonLayout->addWidget(mpSetAsBackgroundButton);
mpAddToLibButton = new UBFeatureItemButton();
mpAddToLibButton->setText(tr("Add to library"));
mpButtonLayout->addWidget(mpAddToLibButton);
......@@ -924,7 +919,6 @@ UBFeatureProperties::UBFeatureProperties( QWidget *parent, const char *name ) :
mpLayout->setMargin(0);
connect( mpAddPageButton, SIGNAL(clicked()), this, SLOT(onAddToPage()) );
connect( mpSetAsBackgroundButton, SIGNAL( clicked() ), this, SLOT( onSetAsBackground() ) );
connect( mpAddToLibButton, SIGNAL( clicked() ), this, SLOT(onAddToLib() ) );
}
......@@ -955,11 +949,6 @@ UBFeatureProperties::~UBFeatureProperties()
delete mpAddPageButton;
mpAddPageButton = NULL;
}
if ( mpSetAsBackgroundButton )
{
delete mpSetAsBackgroundButton;
mpSetAsBackgroundButton = NULL;
}
if ( mpAddToLibButton )
{
delete mpAddToLibButton;
......@@ -1047,26 +1036,10 @@ void UBFeatureProperties::showElement(const UBFeature &elem)
if ( UBApplication::isFromWeb( elem.getFullPath().toString() ) )
{
mpAddToLibButton->show();
if( elem.getMetadata()["Type"].toLower().contains("image") )
{
mpSetAsBackgroundButton->show();
}
else
{
mpSetAsBackgroundButton->hide();
}
}
else
{
mpAddToLibButton->hide();
if (UBFileSystemUtils::mimeTypeFromFileName( elem.getFullPath().toLocalFile() ).contains("image"))
{
mpSetAsBackgroundButton->show();
}
else
{
mpSetAsBackgroundButton->hide();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment