From: Peter Penz Date: Thu, 25 Mar 2010 17:36:39 +0000 (+0000) Subject: Open the meta data configuration dialog modeless X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/dd743f9d98244ced35f80aeb6349630156f796be Open the meta data configuration dialog modeless svn path=/trunk/KDE/kdebase/apps/; revision=1107448 --- diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 7b707db6f..b54f3cef6 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -293,17 +293,15 @@ void InformationPanelContent::configureSettings() m_preview->setVisible(isChecked); InformationPanelSettings::setShowPreview(isChecked); } else if (action == configureAction) { - QPointer dialog = - new FileMetaDataConfigurationDialog(this); + FileMetaDataConfigurationDialog* dialog = new FileMetaDataConfigurationDialog(); dialog->setDescription(i18nc("@label::textbox", - "Configure which data should be shown in the Information Panel.")); + "Configure which data should be shown in the tooltip.")); dialog->setItems(m_metaDataWidget->items()); - dialog->exec(); - delete dialog; - } - - if (!m_item.isNull() && m_item.nepomukUri().isValid()) { - showItem(m_item); + dialog->setAttribute(Qt::WA_DeleteOnClose); + dialog->show(); + dialog->raise(); + dialog->activateWindow(); + connect(dialog, SIGNAL(destroyed()), this, SLOT(refreshMetaData())); } } @@ -347,6 +345,13 @@ void InformationPanelContent::slotPlayingStopped() m_preview->setVisible(true); } +void InformationPanelContent::refreshMetaData() +{ + if (!m_item.isNull() && m_item.nepomukUri().isValid()) { + showItem(m_item); + } +} + bool InformationPanelContent::applyPlace(const KUrl& url) { KFilePlacesModel* placesModel = DolphinSettings::instance().placesModel(); diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index 92a1c62d7..dbd31a542 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -96,6 +96,12 @@ private slots: void slotPlayingStarted(); void slotPlayingStopped(); + /** + * Is invoked after the file meta data configuration dialog has been + * closed and refreshs the visibility of the meta data. + */ + void refreshMetaData(); + private: /** * Checks whether the an URL is repesented by a place. If yes,