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

f41
Caolán McNamara 12 years ago
parent 5506cea973
commit e26c795ad4

@ -0,0 +1,69 @@
From 914de32b27c7fe164b21f9247275ee3117c0864b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@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

@ -252,6 +252,7 @@ Patch18: 0001-rhbz-908674-Adapt-rtl-Allocator-construct-to-C-11.patch
Patch19: 0001-make-evolution-3.6-work-with-address-book.patch
Patch20: 0001-Resolves-fdo-60132-Error-reading-file-after-insertin.patch
Patch21: 0001-no-g_list_free_full-in-RHEL-6-glib.patch
Patch22: 0001-Resolves-rhbz-910176-cannot-select-directory-with-gn.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -993,6 +994,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch19 -p1 -b .make-evolution-3.6-work-with-address-book.patch
%patch20 -p1 -b .fdo-60132-Error-reading-file-after-insertin.patch
%patch21 -p1 -b .no-g_list_free_full-in-RHEL-6-glib.patch
%patch22 -p1 -b .rhbz-910176-cannot-select-directory-with-gn.patch
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@ -2055,8 +2057,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Thu Feb 07 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.0.0.3-5-UNBUILT
* Fri Feb 15 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.0.0.3-5
- make evolution 3.6 work with address book
- Resolves: rhbz#910176 cannot select directory with gtk folder picker
* Fri Feb 15 2013 Stephan Bergmann <sbergman@redhat.com> - 1:4.0.0.3-4
- Resolves: fdo#60491 missing libemboleobj.so

Loading…
Cancel
Save