removed install samba feature for fileproperiesplugin

This commit is contained in:
Ivailo Monev 2014-11-19 18:48:35 +00:00
parent fc6688082b
commit 66c4248d2a
2 changed files with 0 additions and 36 deletions

View file

@ -26,18 +26,6 @@ if(NOT INSIDE_KDENETWORK)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
endif(NOT INSIDE_KDENETWORK) endif(NOT INSIDE_KDENETWORK)
option(SAMBA_INSTALL "Offer to install Samba for file sharing with PackageKit if it is not already installed, use -DSAMBA_INSTALL=off to disable, use -DSAMBA_PACKAGE_NAME= to set package name." ON)
if(NOT SAMBA_PACKAGE_NAME)
set(SAMBA_PACKAGE_NAME \\\"samba\\\")
endif(NOT SAMBA_PACKAGE_NAME)
if(SAMBA_INSTALL)
message(STATUS "Samba install feature will be enabled.")
add_definitions(-DSAMBA_INSTALL)
add_definitions(-DSAMBA_PACKAGE_NAME=${SAMBA_PACKAGE_NAME})
else(SAMBA_INSTALL)
message(STATUS "Samba install feature will NOT be enabled.")
endif(SAMBA_INSTALL)
add_subdirectory(samba) add_subdirectory(samba)
if(NOT INSIDE_KDENETWORK) if(NOT INSIDE_KDENETWORK)

View file

@ -73,13 +73,6 @@ SambaUserSharePlugin::SambaUserSharePlugin(QObject *parent, const QList<QVariant
vLayout->addWidget(new QLabel(i18n("Samba is not installed on your system."), widget)); vLayout->addWidget(new QLabel(i18n("Samba is not installed on your system."), widget));
#ifdef SAMBA_INSTALL
KPushButton *btn = new KPushButton(i18n("Install Samba..."), widget);
btn->setDefault(false);
vLayout->addWidget(btn);
connect(btn, SIGNAL(clicked()), SLOT(installSamba()));
#endif
// align items on top // align items on top
vLayout->addStretch(); vLayout->addStretch();
@ -115,23 +108,6 @@ SambaUserSharePlugin::~SambaUserSharePlugin()
{ {
} }
void SambaUserSharePlugin::installSamba()
{
unsigned int xid = 0;
QStringList packages;
packages << SAMBA_PACKAGE_NAME;
QString interaction("show-confirm-install,show-progress");
QDBusInterface device("org.freedesktop.PackageKit", "/org/freedesktop/PackageKit",
"org.freedesktop.PackageKit.Modify");
if (!device.isValid()) {
KMessageBox::sorry(qobject_cast<KPropertiesDialog *>(this),
i18n("<qt><strong>Samba could not be installed.</strong><br />Please, check if kpackagekit is properly installed</qt>"));
return;
}
QDBusReply<int> reply = device.call("InstallPackageNames", xid, packages, interaction);
}
void SambaUserSharePlugin::setupModel() void SambaUserSharePlugin::setupModel()
{ {
model = new UserPermissionModel(shareData, this); model = new UserPermissionModel(shareData, this);