void ServiceButton::properties() { if (!_service) { return; } QString path = _service->desktopEntryPath(); // If the path to the desktop file is relative, try to get the full // path from KStdDirs. path = locate("apps", path); KURL serviceURL; serviceURL.setPath(path); // the KPropertiesDialog deletes itself, so this isn't a memory leak KPropertiesDialog* dialog = new KPropertiesDialog(serviceURL, 0, 0, false, false); dialog->setFileNameReadOnly(true); connect(dialog, SIGNAL(saveAs(const KURL &, KURL &)), this, SLOT(slotSaveAs(const KURL &, KURL &))); connect(dialog, SIGNAL(propertiesClosed()), this, SLOT(slotUpdate())); dialog->show(); }
void LauncherApplet::slotShowPreferences() { // Will delete itself... KPropertiesDialog *pDlg = new KPropertiesDialog(_fileItem, 0L, 0L, false, false); pDlg->setFileNameReadOnly(true); connect(pDlg, SIGNAL(applied()), SLOT(slotSettingsChanged())); pDlg->show(); }
void KonqSidebarTree::slotProperties() { if (!m_currentTopLevelItem) return; KURL url; url.setPath(m_currentTopLevelItem->path()); KPropertiesDialog *dlg = new KPropertiesDialog( url ); dlg->setFileNameReadOnly(true); dlg->exec(); delete dlg; }