[libreoffice/f18] Resolves: rhbz#910176 cannot select directory with gtk folder picker

Caolán McNamara caolanm at fedoraproject.org
Fri Feb 15 14:17:08 UTC 2013


commit 2b2915b0916860d341ce16cb77d284086af57c02
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 15 14:17:04 2013 +0000

    Resolves: rhbz#910176 cannot select directory with gtk folder picker

 ...bz-910176-cannot-select-directory-with-gn.patch |   69 ++++++++++++++++++++
 libreoffice.spec                                   |    5 +-
 2 files changed, 73 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-rhbz-910176-cannot-select-directory-with-gn.patch b/0001-Resolves-rhbz-910176-cannot-select-directory-with-gn.patch
new file mode 100644
index 0000000..ce84aaf
--- /dev/null
+++ b/0001-Resolves-rhbz-910176-cannot-select-directory-with-gn.patch
@@ -0,0 +1,69 @@
+From 914de32b27c7fe164b21f9247275ee3117c0864b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 15 Feb 2013 13:41:11 +0000
+Subject: [PATCH] Resolves: rhbz#910176 cannot select directory with gnome
+ folder picker
+
+<< gtk documentation
+gtk_file_chooser_get_current_folder_uri ()
+
+Gets the current folder of chooser as an URI.
+
+Note that this is the folder that the file chooser is currently displaying ...
+which is not the same as the currently-selected folder if the chooser is in
+GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode ... to get the currently-selected
+folder in that mode, use gtk_file_chooser_get_uri() as the usual way to get the
+selection.
+>>
+
+<< offapi documentation
+XFolderPicker
+
+getDisplayDirectory:
+    Returns the root directory that the FolderPicker is showing.
+getDirectory
+    Returns the selected directory
+>>
+
+so  getDisplayDirectory <-> gtk_file_chooser_get_current_folder_uri
+and getDirectory <-> gtk_file_chooser_get_uri
+
+Change-Id: Iaa5ab16a250cd59fe5e8bd02149298eef6d1dec2
+---
+ vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+index 4da4b1e..6cd0531 100644
+--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
++++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+@@ -96,7 +96,7 @@ rtl::OUString SAL_CALL SalGtkFolderPicker::getDisplayDirectory() throw( uno::Run
+ 
+     gchar* pCurrentFolder =
+         gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
+-    ::rtl::OUString aCurrentFolderName = uritounicode(pCurrentFolder);
++    OUString aCurrentFolderName = uritounicode(pCurrentFolder);
+     g_free( pCurrentFolder );
+ 
+     return aCurrentFolderName;
+@@ -104,7 +104,16 @@ rtl::OUString SAL_CALL SalGtkFolderPicker::getDisplayDirectory() throw( uno::Run
+ 
+ rtl::OUString SAL_CALL SalGtkFolderPicker::getDirectory() throw( uno::RuntimeException )
+ {
+-    return getDisplayDirectory();
++    SolarMutexGuard g;
++
++    OSL_ASSERT( m_pDialog != NULL );
++
++    gchar* pSelectedFolder =
++        gtk_file_chooser_get_uri( GTK_FILE_CHOOSER( m_pDialog ) );
++    OUString aSelectedFolderName = uritounicode(pSelectedFolder);
++    g_free( pSelectedFolder );
++
++    return aSelectedFolderName;
+ }
+ 
+ void SAL_CALL SalGtkFolderPicker::setDescription( const rtl::OUString& rDescription )
+-- 
+1.8.1.2
+
diff --git a/libreoffice.spec b/libreoffice.spec
index e8b7509..8681250 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -256,6 +256,7 @@ Patch34: 0001-fdo-59426-Don-t-try-to-repair-package-during-flat-de.patch
 Patch35: 0001-valgrind-use-after-free.patch
 Patch36: 0001-make-evolution-3.6-work-with-address-book.patch
 Patch37: 0001-rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch
+Patch38: 0001-Resolves-rhbz-910176-cannot-select-directory-with-gn.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1005,6 +1006,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch35 -p1 -b .valgrind-use-after-free.patch
 %patch36 -p1 -b .make-evolution-3.6-work-with-address-book.patch
 %patch37 -p1 -b .rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch
+%patch38 -p1 -b .rhbz-910176-cannot-select-directory-with-gn.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2274,10 +2276,11 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
-* Thu Feb 07 2013 Caolán McNamara <caolanm at redhat.com> - 1:3.6.5.2-4.UNBUILT
+* Fri Feb 15 2013 Caolán McNamara <caolanm at redhat.com> - 1:3.6.5.2-4
 - make evolution 3.6 work with address book
 - Resolves: fdo#60491 missing libemboleobj.so
 - Resolves: rhbz#908674 potential memory corruption
+- Resolves: rhbz#910176 cannot select directory with gtk folder picker
 
 * Wed Feb 06 2013 David Tardon <dtardon at redhat.com> - 1:3.6.5.2-3
 - Resolves: rhbz#889342 crash when opening odp file


More information about the scm-commits mailing list