[Libreoffice-commits] core.git: include/svtools svtools/source vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Sep 30 14:13:54 UTC 2018
include/svtools/imagemgr.hxx | 1 +
svtools/source/misc/imagemgr.cxx | 7 +++++++
vcl/unx/gtk3/gtk3gtkinst.cxx | 3 ++-
3 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 3e719d72ed64b0690ebef2dda1d56a0d28bc0c0e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 27 22:30:33 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 30 16:13:32 2018 +0200
add GetFileImageId and check if there is no parent
Change-Id: I80fdcb800642dbb850072a259d0f742e8c6cbb20
Reviewed-on: https://gerrit.libreoffice.org/61071
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svtools/imagemgr.hxx b/include/svtools/imagemgr.hxx
index fbff141124e6..34d3bbb5dd3b 100644
--- a/include/svtools/imagemgr.hxx
+++ b/include/svtools/imagemgr.hxx
@@ -121,6 +121,7 @@ private:
public:
SVT_DLLPUBLIC static OUString GetImageId( const INetURLObject& rURL );
SVT_DLLPUBLIC static Image GetImage( const INetURLObject& rURL, bool bBig = false );
+ SVT_DLLPUBLIC static OUString GetFileImageId( const INetURLObject& rURL );
SVT_DLLPUBLIC static Image GetFileImage( const INetURLObject& rURL );
SVT_DLLPUBLIC static Image GetImageNoDefault( const INetURLObject& rURL, bool bBig = false );
SVT_DLLPUBLIC static Image GetFolderImage( const svtools::VolumeInfo& rInfo );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 88496840a93f..f7a9a9e8a703 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -773,6 +773,13 @@ Image SvFileInformationManager::GetImage( const INetURLObject& rObject, bool bBi
return GetImageFromList_Impl( nImage, bBig );
}
+OUString SvFileInformationManager::GetFileImageId(const INetURLObject& rObject)
+{
+ SvImageId nImage = GetImageId_Impl( rObject, false );
+ DBG_ASSERT( nImage != SvImageId::NONE, "invalid ImageId" );
+ return GetImageNameFromList_Impl(nImage, /*bBig*/false);
+}
+
Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject )
{
SvImageId nImage = GetImageId_Impl( rObject, false );
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index b0bc0402ad77..f34dda68b30b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -5453,7 +5453,8 @@ public:
GtkDialog* pDialog = GTK_DIALOG(gtk_builder_get_object(m_pBuilder, id.getStr()));
if (!pDialog)
return nullptr;
- gtk_window_set_transient_for(GTK_WINDOW(pDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
+ if (m_pParentWidget)
+ gtk_window_set_transient_for(GTK_WINDOW(pDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
return o3tl::make_unique<GtkInstanceDialog>(pDialog, bTakeOwnership);
}
More information about the Libreoffice-commits
mailing list