diff options
-rw-r--r-- | include/svtools/imagemgr.hxx | 1 | ||||
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 3 |
3 files changed, 10 insertions, 1 deletions
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); } |