summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/AllLangMoTarget_fps.mk13
-rw-r--r--fpicker/AllLangResTarget_fps_office.mk26
-rw-r--r--fpicker/Library_fps.mk5
-rw-r--r--fpicker/Library_fps_aqua.mk5
-rw-r--r--fpicker/Module_fpicker.mk4
-rw-r--r--fpicker/inc/fpsofficeResMgr.hxx (renamed from fpicker/source/office/fpsofficeResMgr.hxx)25
-rw-r--r--fpicker/inc/strings.hrc40
-rw-r--r--fpicker/source/aqua/resourceprovider.hxx8
-rw-r--r--fpicker/source/aqua/resourceprovider.mm100
-rw-r--r--fpicker/source/office/OfficeFilePicker.hrc19
-rw-r--r--fpicker/source/office/OfficeFilePicker.src92
-rw-r--r--fpicker/source/office/PlacesListBox.cxx2
-rw-r--r--fpicker/source/office/RemoteFilesDialog.hxx6
-rw-r--r--fpicker/source/office/iodlg.cxx24
-rw-r--r--fpicker/source/office/iodlg.hrc38
-rw-r--r--fpicker/source/office/iodlg.src101
-rw-r--r--fpicker/source/office/iodlgimp.cxx35
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx16
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx3
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.cxx10
-rw-r--r--fpicker/source/win32/misc/resourceprovider.cxx60
-rw-r--r--fpicker/source/win32/misc/resourceprovider.hxx13
-rw-r--r--fpicker/uiconfig/ui/explorerfiledialog.ui24
-rw-r--r--fpicker/uiconfig/ui/foldernamedialog.ui8
-rw-r--r--fpicker/uiconfig/ui/remotefilesdialog.ui24
25 files changed, 168 insertions, 533 deletions
diff --git a/fpicker/AllLangMoTarget_fps.mk b/fpicker/AllLangMoTarget_fps.mk
new file mode 100644
index 000000000000..cd4495b0bc66
--- /dev/null
+++ b/fpicker/AllLangMoTarget_fps.mk
@@ -0,0 +1,13 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,fps))
+
+$(eval $(call gb_AllLangMoTarget_set_polocation,fps,fpicker))
+
+# vim: set noet sw=4 ts=4:
diff --git a/fpicker/AllLangResTarget_fps_office.mk b/fpicker/AllLangResTarget_fps_office.mk
deleted file mode 100644
index 6c21e33d7ad5..000000000000
--- a/fpicker/AllLangResTarget_fps_office.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_AllLangResTarget_AllLangResTarget,fps_office))
-
-$(eval $(call gb_AllLangResTarget_set_reslocation,fps_office,fpicker))
-
-$(eval $(call gb_AllLangResTarget_add_srs,fps_office,\
- fps_office/res \
-))
-
-$(eval $(call gb_SrsTarget_SrsTarget,fps_office/res))
-
-$(eval $(call gb_SrsTarget_add_files,fps_office/res,\
- fpicker/source/office/OfficeFilePicker.src \
- fpicker/source/office/iodlg.src \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 2e7f0a17d42a..d6be222b1f19 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -18,6 +18,11 @@ $(eval $(call gb_Library_add_nativeres,fps,fps/Fps))
$(eval $(call gb_Library_set_componentfile,fps,fpicker/source/win32/fps))
+$(eval $(call gb_Library_set_include,fps,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/fpicker/inc \
+))
+
$(eval $(call gb_Library_use_external,fps,boost_headers))
$(eval $(call gb_Library_use_sdk_api,fps))
diff --git a/fpicker/Library_fps_aqua.mk b/fpicker/Library_fps_aqua.mk
index e4b7ef53a097..91e875c44ed9 100644
--- a/fpicker/Library_fps_aqua.mk
+++ b/fpicker/Library_fps_aqua.mk
@@ -12,6 +12,11 @@ $(eval $(call gb_Library_Library,fps_aqua))
$(eval $(call gb_Library_set_componentfile,fps_aqua,fpicker/source/aqua/fps_aqua))
+$(eval $(call gb_Library_set_include,fps_aqua,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/fpicker/inc \
+))
+
$(eval $(call gb_Library_use_external,fps_aqua,boost_headers))
$(eval $(call gb_Library_use_sdk_api,fps_aqua))
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 443d60a65c21..5f4ee86c9c6c 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -12,11 +12,11 @@ $(eval $(call gb_Module_Module,fpicker))
$(eval $(call gb_Module_add_targets,fpicker,\
Library_fps_office \
+ UIConfig_fps \
))
$(eval $(call gb_Module_add_l10n_targets,fpicker,\
- AllLangResTarget_fps_office \
- UIConfig_fps \
+ AllLangMoTarget_fps \
))
ifeq ($(OS),MACOSX)
diff --git a/fpicker/source/office/fpsofficeResMgr.hxx b/fpicker/inc/fpsofficeResMgr.hxx
index 0fcbe4cab629..1e7711d670b5 100644
--- a/fpicker/source/office/fpsofficeResMgr.hxx
+++ b/fpicker/inc/fpsofficeResMgr.hxx
@@ -12,35 +12,32 @@
#include <rtl/instance.hxx>
#include <osl/getglobalmutex.hxx>
#include <tools/resmgr.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
namespace fpicker
{
- struct ResMgrHolder
+ struct ResLocaleHolder
{
- ResMgr * operator ()()
+ std::locale* operator ()()
{
- return ResMgr::CreateResMgr ("fps_office");
+ return new std::locale(Translate::Create("fps", Application::GetSettings().GetUILanguageTag()));
}
- static ResMgr * getOrCreate()
+ static std::locale* getOrCreate()
{
return rtl_Instance<
- ResMgr, ResMgrHolder,
+ std::locale, ResLocaleHolder,
osl::MutexGuard, osl::GetGlobalMutex >::create (
- ResMgrHolder(), osl::GetGlobalMutex());
+ ResLocaleHolder(), osl::GetGlobalMutex());
}
};
-
- struct SvtResId : public ResId
- {
- explicit SvtResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {}
- };
}
-inline OUString FpsResId(sal_uInt16 nId)
+inline OUString FpsResId(const char* pId)
{
- return fpicker::SvtResId(nId);
-}
+ return Translate::get(pId, *fpicker::ResLocaleHolder::getOrCreate());
+};
#endif
diff --git a/fpicker/inc/strings.hrc b/fpicker/inc/strings.hrc
new file mode 100644
index 000000000000..0dc082212e02
--- /dev/null
+++ b/fpicker/inc/strings.hrc
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_STRINGS_HRC
+#define INCLUDED_VCL_INC_STRINGS_HRC
+
+#define NC_(Context, String) (Context "\004" u8##String)
+
+#define STR_EXPLORERFILE_OPEN NC_("STR_EXPLORERFILE_OPEN", "Open")
+#define STR_EXPLORERFILE_SAVE NC_("STR_EXPLORERFILE_SAVE", "Save as")
+#define STR_EXPLORERFILE_BUTTONSAVE NC_("STR_EXPLORERFILE_BUTTONSAVE", "~Save")
+#define STR_PATHNAME NC_("STR_PATHNAME", "~Path:")
+#define STR_PATHSELECT NC_("STR_PATHSELECT", "Select path")
+#define STR_BUTTONSELECT NC_("STR_BUTTONSELECT", "~Select")
+#define STR_PREVIEW NC_("STR_PREVIEW", "File Preview")
+#define STR_DEFAULT_DIRECTORY NC_("STR_DEFAULT_DIRECTORY", "My Documents")
+#define STR_PLACES_TITLE NC_("STR_PLACES_TITLE", "Places")
+#define RID_FILEOPEN_NOTEXISTENTFILE NC_("RID_FILEOPEN_NOTEXISTENTFILE", "The file $name$ does not exist.\nMake sure you have entered the correct file name.")
+#define STR_SVT_NEW_FOLDER NC_("STR_SVT_NEW_FOLDER", "Folder")
+#define STR_SVT_NOREMOVABLEDEVICE NC_("STR_SVT_NOREMOVABLEDEVICE", "No removable storage device detected.\nMake sure it is plugged in properly and try again.")
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/aqua/resourceprovider.hxx b/fpicker/source/aqua/resourceprovider.hxx
index 63fb47e8ad5f..44454c8e0954 100644
--- a/fpicker/source/aqua/resourceprovider.hxx
+++ b/fpicker/source/aqua/resourceprovider.hxx
@@ -38,18 +38,10 @@
#define FILE_PICKER_FILE_TYPE 504
#define FILE_PICKER_OVERWRITE 505
-class CResourceProvider_Impl;
-
class CResourceProvider
{
public:
- CResourceProvider( );
- ~CResourceProvider( );
-
NSString* getResString( sal_Int32 aId );
-
-private:
- std::unique_ptr<CResourceProvider_Impl> m_pImpl;
};
#endif
diff --git a/fpicker/source/aqua/resourceprovider.mm b/fpicker/source/aqua/resourceprovider.mm
index f1c9023a1cfd..6942d0fe9fda 100644
--- a/fpicker/source/aqua/resourceprovider.mm
+++ b/fpicker/source/aqua/resourceprovider.mm
@@ -23,29 +23,31 @@
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx>
-#include <vcl/fpicker.hrc>
+#include <fpicker/fpicker.hrc>
#include <vcl/svapp.hxx>
#include <tools/resmgr.hxx>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <svtools/filedlg2.hrc>
#include "NSString_OOoAdditions.hxx"
-
+#include "fpsofficeResMgr.hxx"
#include "resourceprovider.hxx"
using rtl::OUString;
using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
-static const char* const RES_NAME = "fps_office";
-static const char* const OTHER_RES_NAME = "svt";
-
// we have to translate control ids to resource ids
struct Entry
{
sal_Int32 ctrlId;
+ const char* resId;
+};
+
+struct OldEntry
+{
+ sal_Int32 ctrlId;
sal_Int16 resId;
};
@@ -64,110 +66,48 @@ Entry const CtrlIdToResIdTable[] = {
{ FOLDERPICKER_TITLE, STR_SVT_FOLDERPICKER_DEFAULT_TITLE },
{ FOLDER_PICKER_DEF_DESCRIPTION, STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION },
{ FILE_PICKER_OVERWRITE, STR_SVT_ALREADYEXISTOVERWRITE },
- { LISTBOX_FILTER_LABEL, STR_SVT_FILEPICKER_FILTER_TITLE}
-};
-
-Entry const OtherCtrlIdToResIdTable[] = {
+ { LISTBOX_FILTER_LABEL, STR_SVT_FILEPICKER_FILTER_TITLE},
{ FILE_PICKER_TITLE_OPEN, STR_FILEDLG_OPEN },
{ FILE_PICKER_TITLE_SAVE, STR_FILEDLG_SAVE },
{ FILE_PICKER_FILE_TYPE, STR_FILEDLG_TYPE }
};
const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
-const sal_Int32 OTHER_SIZE_TABLE = SAL_N_ELEMENTS( OtherCtrlIdToResIdTable );
-sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
+const char* CtrlIdToResId(sal_Int32 aControlId)
{
- sal_Int16 aResId = -1;
+ const char *pResId = nullptr;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
{
if ( CtrlIdToResIdTable[i].ctrlId == aControlId )
{
- aResId = CtrlIdToResIdTable[i].resId;
- break;
- }
- }
-
- return aResId;
-}
-
-sal_Int16 OtherCtrlIdToResId( sal_Int32 aControlId )
-{
- sal_Int16 aResId = -1;
-
- for ( sal_Int32 i = 0; i < OTHER_SIZE_TABLE; i++ )
- {
- if ( OtherCtrlIdToResIdTable[i].ctrlId == aControlId )
- {
- aResId = OtherCtrlIdToResIdTable[i].resId;
+ pResId = CtrlIdToResIdTable[i].resId;
break;
}
}
- return aResId;
+ return pResId;
}
-class CResourceProvider_Impl
+namespace CResourceProvider_Impl
{
-public:
- CResourceProvider_Impl( )
- {
- m_ResMgr = ResMgr::CreateResMgr( RES_NAME );
- m_OtherResMgr = ResMgr::CreateResMgr( OTHER_RES_NAME );
- }
-
- ~CResourceProvider_Impl( )
- {
- delete m_ResMgr;
- delete m_OtherResMgr;
- }
-
- NSString* getResString( sal_Int16 aId )
+ NSString* getResString(sal_Int16 aId)
{
OUString aResString;
- const SolarMutexGuard aGuard;
-
- try
- {
- OSL_ASSERT( m_ResMgr && m_OtherResMgr );
-
- // translate the control id to a resource id
- sal_Int16 aResId = CtrlIdToResId( aId );
- if ( aResId > -1 )
- aResString = ResId( aResId, *m_ResMgr );
- else
- {
- aResId = OtherCtrlIdToResId( aId );
- if ( aResId > -1 ) {
- aResString = ResId( aResId, *m_OtherResMgr );
- }
- }
- }
- catch(...)
- {
- }
+ // translate the control id to a resource id
+ const char* pResId = CtrlIdToResId(aId);
+ if (pResId)
+ aResString = FpsResId(pResId);
return [NSString stringWithOUString:aResString];
}
-
-public:
- ResMgr* m_ResMgr;
- ResMgr* m_OtherResMgr;
};
-CResourceProvider::CResourceProvider( ) :
- m_pImpl( o3tl::make_unique<CResourceProvider_Impl>() )
-{
-}
-
-CResourceProvider::~CResourceProvider( )
-{}
-
NSString* CResourceProvider::getResString( sal_Int32 aId )
{
- NSString* sImmutable = m_pImpl->getResString( aId );
+ NSString* sImmutable = CResourceProvider_Impl::getResString(aId);
NSMutableString *sMutableString = [NSMutableString stringWithString:sImmutable];
[sMutableString replaceOccurrencesOfString:@"~" withString:@"" options:0 range:NSMakeRange(0, [sMutableString length])];
diff --git a/fpicker/source/office/OfficeFilePicker.hrc b/fpicker/source/office/OfficeFilePicker.hrc
deleted file mode 100644
index c61593f4193f..000000000000
--- a/fpicker/source/office/OfficeFilePicker.hrc
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-#ifndef INCLUDED_FPICKER_SOURCE_OFFICE_OFFICEFILEPICKER_HRC
-#define INCLUDED_FPICKER_SOURCE_OFFICE_OFFICEFILEPICKER_HRC
-
-#include <vcl/fpicker.hrc>
-
-#define STR_SVT_NEW_FOLDER (RID_FPICKER_START+19)
-#define RID_FILEOPEN_NOTEXISTENTFILE (RID_FPICKER_START+24)
-#define STR_SVT_NOREMOVABLEDEVICE (RID_FPICKER_START+25)
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/OfficeFilePicker.src b/fpicker/source/office/OfficeFilePicker.src
deleted file mode 100644
index 4f6fe4b764b9..000000000000
--- a/fpicker/source/office/OfficeFilePicker.src
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "OfficeFilePicker.hrc"
-
-String STR_SVT_FILEPICKER_AUTO_EXTENSION
-{
- Text [ en-US ] = "~Automatic file name extension" ;
-};
-
-String STR_SVT_FILEPICKER_PASSWORD
-{
- Text [ en-US ] = "Save with pass~word" ;
-};
-
-String STR_SVT_FILEPICKER_FILTER_OPTIONS
-{
- Text [ en-US ] = "~Edit filter settings";
-};
-
-String STR_SVT_FILEPICKER_READONLY
-{
- Text [ en-US ] = "~Read-only" ;
-};
-
-String STR_SVT_FILEPICKER_INSERT_AS_LINK
-{
- Text [ en-US ] = "~Link" ;
-};
-
-String STR_SVT_FILEPICKER_SHOW_PREVIEW
-{
- Text [ en-US ] = "Pr~eview" ;
-};
-
-String STR_SVT_FILEPICKER_PLAY
-{
- Text [ en-US ] = "~Play" ;
-};
-
-String STR_SVT_FILEPICKER_VERSION
-{
- Text [ en-US ] = "~Version:";
-};
-
-String STR_SVT_FILEPICKER_TEMPLATES
-{
- Text [ en-US ] = "S~tyles:" ;
-};
-
-String STR_SVT_FILEPICKER_IMAGE_TEMPLATE
-{
- Text [ en-US ] = "Style:";
-};
-
-String STR_SVT_FILEPICKER_SELECTION
-{
- Text [ en-US ] = "~Selection" ;
-};
-
-String STR_SVT_FILEPICKER_FILTER_TITLE
-{
- Text [ en-US ] = "File ~type:" ;
-};
-
-String STR_SVT_FOLDERPICKER_DEFAULT_TITLE
-{
- Text [ en-US ] = "Select Path" ;
-};
-
-String STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION
-{
- Text [ en-US ] = "Please select a folder.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index f42a0440154a..c0bbc68235eb 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <iodlg.hrc>
+#include <strings.hrc>
#include <PlacesListBox.hxx>
#include <svtools/PlaceEditDialog.hxx>
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx
index 36dbe624ccb1..1b92732e3239 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -20,12 +20,11 @@
#include <svtools/fileview.hxx>
#include <vcl/errinf.hxx>
-#include <tools/resid.hxx>
#include <unotools/viewoptions.hxx>
#include <vcl/button.hxx>
-#include <vcl/fpicker.hrc>
+#include <fpicker/fpicker.hrc>
#include <vcl/menubtn.hxx>
#include <vcl/dialog.hxx>
#include <vcl/vclptr.hxx>
@@ -42,9 +41,8 @@
#include "fpdialogbase.hxx"
#include "fpsofficeResMgr.hxx"
-#include "OfficeFilePicker.hrc"
#include "QueryFolderName.hxx"
-#include "iodlg.hrc"
+#include "strings.hrc"
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::task;
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index df21d5f00d7f..3415f2e2d06c 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -42,10 +42,10 @@
#include "svtools/treelistentry.hxx"
#include <toolkit/helper/vclunohelper.hxx>
+#include "fpicker/fpicker.hrc"
#include "svtools/helpid.hrc"
-#include <svtools/svtools.hrc>
-#include "OfficeFilePicker.hrc"
-#include "iodlg.hrc"
+#include <svtools/strings.hrc>
+#include "strings.hrc"
#include "bitmaps.hlst"
#include "asyncfilepicker.hxx"
#include "iodlgimp.hxx"
@@ -646,26 +646,26 @@ void SvtFileDialog::Init_Impl
AddControls_Impl( );
// adjust the labels to the mode
- sal_uInt16 nResId = STR_EXPLORERFILE_OPEN;
- sal_uInt16 nButtonResId = 0;
+ const char* pResId = STR_EXPLORERFILE_OPEN;
+ const char* pButtonResId = nullptr;
if ( nStyle & PickerFlags::SaveAs )
{
- nResId = STR_EXPLORERFILE_SAVE;
- nButtonResId = STR_EXPLORERFILE_BUTTONSAVE;
+ pResId = STR_EXPLORERFILE_SAVE;
+ pButtonResId = STR_EXPLORERFILE_BUTTONSAVE;
}
if ( nStyle & PickerFlags::PathDialog )
{
pImpl->_pFtFileName->SetText( FpsResId( STR_PATHNAME ) );
- nResId = STR_PATHSELECT;
- nButtonResId = STR_BUTTONSELECT;
+ pResId = STR_PATHSELECT;
+ pButtonResId = STR_BUTTONSELECT;
}
- SetText( FpsResId( nResId ) );
+ SetText( FpsResId( pResId ) );
- if ( nButtonResId )
- pImpl->_pBtnFileOpen->SetText( FpsResId( nButtonResId ) );
+ if ( pButtonResId )
+ pImpl->_pBtnFileOpen->SetText( FpsResId( pButtonResId ) );
if ( FILEDLG_TYPE_FILEDLG != pImpl->_eDlgType )
{
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
deleted file mode 100644
index 467114efb2f9..000000000000
--- a/fpicker/source/office/iodlg.hrc
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FPICKER_SOURCE_OFFICE_IODLG_HRC
-#define INCLUDED_FPICKER_SOURCE_OFFICE_IODLG_HRC
-
-#include "svtools/helpid.hrc"
-#include <vcl/fpicker.hrc>
-
-#define STR_EXPLORERFILE_OPEN (RID_FPICKER_START+31)
-#define STR_EXPLORERFILE_SAVE (RID_FPICKER_START+32)
-#define STR_EXPLORERFILE_BUTTONSAVE (RID_FPICKER_START+33)
-#define STR_PATHNAME (RID_FPICKER_START+34)
-#define STR_PATHSELECT (RID_FPICKER_START+35)
-#define STR_BUTTONSELECT (RID_FPICKER_START+36)
-#define STR_PREVIEW (RID_FPICKER_START+38)
-#define STR_DEFAULT_DIRECTORY (RID_FPICKER_START+39)
-#define STR_PLACES_TITLE (RID_FPICKER_START+40)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
deleted file mode 100644
index 74408ad7aaac..000000000000
--- a/fpicker/source/office/iodlg.src
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "svtools/helpid.hrc"
-#include "svtools/svtools.hrc"
-#include "iodlg.hrc"
-#include "OfficeFilePicker.hrc"
-
-// strings *******************************************************************
-
-String STR_EXPLORERFILE_OPEN
-{
- Text [ en-US ] = "Open" ;
-};
-String STR_EXPLORERFILE_SAVE
-{
- Text [ en-US ] = "Save as" ;
-};
-String STR_EXPLORERFILE_BUTTONSAVE
-{
- Text [ en-US ] = "~Save" ;
-};
-String STR_PATHNAME
-{
- Text [ en-US ] = "~Path:" ;
-};
-String STR_PATHSELECT
-{
- Text [ en-US ] = "Select path" ;
-};
-String STR_BUTTONSELECT
-{
- Text [ en-US ] = "~Select";
-};
-String STR_PREVIEW
-{
- Text [ en-US ] = "File Preview";
-};
-String STR_DEFAULT_DIRECTORY
-{
- Text [ en-US ] = "My Documents" ;
-};
-String STR_PLACES_TITLE
-{
- Text [ en-US ] = "Places" ;
-};
-
-String RID_FILEOPEN_NOTEXISTENTFILE
-{
- Text [ en-US ] = "The file $name$ does not exist.\nMake sure you have entered the correct file name.";
-};
-
-String STR_FILTERNAME_ALL
-{
- Text [ en-US ] = "All files" ;
-};
-
-String STR_SVT_ALREADYEXISTOVERWRITE
-{
- Text [ en-US ] = "A file named \"$filename$\" already exists.\n\nDo you want to replace it?" ;
-};
-
-String STR_SVT_DELETESERVICE
-{
- Text [ en-US ] = "Are you sure you want to delete the service?\n\"$servicename$\"" ;
-};
-
-String STR_SVT_ROOTLABEL
-{
- Text [ en-US ] = "Root" ;
-};
-
-String STR_SVT_NEW_FOLDER
-{
- Text [ en-US ] = "Folder" ;
-};
-
-String STR_SVT_NOREMOVABLEDEVICE
-{
- Text [ en-US ] = "No removable storage device detected.\nMake sure it is plugged in properly and try again." ;
-};
-
-//******************************************************************** EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index e45764e7782e..9ee48838fc54 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -20,6 +20,7 @@
#include "iodlgimp.hxx"
#include "svtools/headbar.hxx"
#include <tools/debug.hxx>
+#include <tools/resmgr.hxx>
#include <tools/urlobj.hxx>
#include <vcl/menu.hxx>
#include <vcl/msgbox.hxx>
@@ -31,45 +32,17 @@
#include "svtools/fileview.hxx"
#include "svtools/inettbc.hxx"
#include "iodlg.hxx"
-#include "iodlg.hrc"
+#include "strings.hrc"
#include "bitmaps.hlst"
#include "svtools/imagemgr.hxx"
#include <unotools/localfilehelper.hxx>
#include "unotools/useroptions.hxx"
-#include "rtl/instance.hxx"
-#include <osl/getglobalmutex.hxx>
#include <svl/svl.hrc>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::utl;
-
-// ResMgrHolder / SvtSimpleResId
-
-namespace
-{
- struct ResMgrHolder
- {
- ResMgr * operator ()()
- {
- return ResMgr::CreateResMgr ("svl");
- }
- static ResMgr * getOrCreate()
- {
- return rtl_Instance<
- ResMgr, ResMgrHolder,
- osl::MutexGuard, osl::GetGlobalMutex >::create (
- ResMgrHolder(), osl::GetGlobalMutex());
- }
- };
-
- struct SvtSimpleResId : public ResId
- {
- explicit SvtSimpleResId (sal_uInt16 nId) : ResId (nId, *ResMgrHolder::getOrCreate()) {}
- };
-}
-
SvtFileDialogFilter_Impl::SvtFileDialogFilter_Impl( const OUString& rName, const OUString& rType )
:m_aName( rName )
,m_aType( rType )
@@ -171,13 +144,13 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
if ( nCount == 1 )
{
// adjust the title of the top level entry (the workspace)
- _pMenu->SetItemText( --nItemId, SvtSimpleResId(STR_SVT_MIMETYPE_CNT_FSYSBOX).toString() );
+ std::locale loc = Translate::Create("svl", Application::GetSettings().GetUILanguageTag());
+ _pMenu->SetItemText(--nItemId, Translate::get(STR_SVT_MIMETYPE_CNT_FSYSBOX, loc));
}
--nCount;
}
}
-
void SvtUpButton_Impl::Select()
{
sal_uInt16 nId = GetCurItemId();
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index e7a6697d4fb8..c3ce95a8054b 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -491,9 +491,9 @@ static const ::sal_Int32 GROUP_IMAGETEMPLATE = 3;
static const ::sal_Int32 GROUP_CHECKBOXES = 4;
-static void setLabelToControl(CResourceProvider& rResourceProvider, TFileDialogCustomize iCustom, sal_uInt16 nControlId)
+static void setLabelToControl(TFileDialogCustomize iCustom, sal_uInt16 nControlId)
{
- OUString aLabel = rResourceProvider.getResString(nControlId);
+ OUString aLabel = CResourceProvider::getResString(nControlId);
aLabel = SOfficeToWindowsLabel(aLabel);
iCustom->SetControlLabel(nControlId, reinterpret_cast<PCWSTR>(aLabel.getStr()) );
}
@@ -577,42 +577,42 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION;
iCustom->AddCheckButton (nControlId, L"Auto Extension", true);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
if ((nFeatures & FEATURE_PASSWORD) == FEATURE_PASSWORD)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PASSWORD;
iCustom->AddCheckButton (nControlId, L"Password", false);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
if ((nFeatures & FEATURE_READONLY) == FEATURE_READONLY)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_READONLY;
iCustom->AddCheckButton (nControlId, L"Readonly", false);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
if ((nFeatures & FEATURE_FILTEROPTIONS) == FEATURE_FILTEROPTIONS)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS;
iCustom->AddCheckButton (nControlId, L"Filter Options", false);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
if ((nFeatures & FEATURE_LINK) == FEATURE_LINK)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK;
iCustom->AddCheckButton (nControlId, L"Link", false);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
if ((nFeatures & FEATURE_SELECTION) == FEATURE_SELECTION)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION;
iCustom->AddCheckButton (nControlId, L"Selection", false);
- setLabelToControl(m_ResProvider, iCustom, nControlId);
+ setLabelToControl(iCustom, nControlId);
}
/* can be ignored ... new COM dialog supports preview native now !
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index b7ea4de5fc0e..70272ad8c1c0 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -316,9 +316,6 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
OUString m_sFilename;
-
- // Resource provider
- CResourceProvider m_ResProvider;
};
} // namespace vista
diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx
index 43908c947020..5e5de9f612c4 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.cxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.cxx
@@ -138,14 +138,8 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
m_bi.lpfn = CMtaFolderPicker::FolderPickerCallback;
m_bi.lParam = reinterpret_cast< LPARAM >( this );
-
- // read the default strings for title and
- // description from a resource file
-
- CResourceProvider ResProvider;
-
- m_dialogTitle = ResProvider.getResString(FOLDERPICKER_TITLE);
- m_Description = ResProvider.getResString(FOLDER_PICKER_DEF_DESCRIPTION);
+ m_dialogTitle = CResourceProvider::getResString(FOLDERPICKER_TITLE);
+ m_Description = CResourceProvider::getResString(FOLDER_PICKER_DEF_DESCRIPTION);
// signals that the thread was successfully set up
m_hEvtThrdReady = CreateEventA(
diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx
index 12a733ec01d1..118d7ab932f5 100644
--- a/fpicker/source/win32/misc/resourceprovider.cxx
+++ b/fpicker/source/win32/misc/resourceprovider.cxx
@@ -25,13 +25,14 @@
#include <rtl/ustrbuf.hxx>
#include "resourceprovider.hxx"
#include <osl/mutex.hxx>
-#include <vcl/fpicker.hrc>
+#include <fpicker/fpicker.hrc>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
-#include <tools/simplerm.hxx>
+#include <tools/resmgr.hxx>
#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
+#include "fpsofficeResMgr.hxx"
using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
@@ -44,7 +45,7 @@ using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
struct Entry
{
sal_Int32 ctrlId;
- sal_Int16 resId;
+ const char* resId;
};
Entry const CtrlIdToResIdTable[] = {
@@ -65,68 +66,33 @@ Entry const CtrlIdToResIdTable[] = {
const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
-sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
+const char* CtrlIdToResId( sal_Int32 aControlId )
{
- sal_Int16 aResId = -1;
+ const char* pResId = nullptr;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
{
if ( CtrlIdToResIdTable[i].ctrlId == aControlId )
{
- aResId = CtrlIdToResIdTable[i].resId;
+ pResId = CtrlIdToResIdTable[i].resId;
break;
}
}
- return aResId;
+ return pResId;
}
-class CResourceProvider_Impl
+namespace CResourceProvider
{
-public:
-
-
- CResourceProvider_Impl( )
- {
- const SolarMutexGuard aGuard;
- m_ResMgr = o3tl::make_unique<SimpleResMgr>(
- "fps_office", Application::GetSettings().GetUILanguageTag());
- }
-
OUString getResString( sal_Int16 aId )
{
OUString aResOUString;
-
- try
- {
- // translate the control id to a resource id
- sal_Int16 aResId = CtrlIdToResId( aId );
-
- if ( aResId > -1 )
- aResOUString = m_ResMgr->ReadString( aResId );
- }
- catch(...)
- {
- }
-
+ // translate the control id to a resource id
+ const char *pResId = CtrlIdToResId(aId);
+ if (pResId)
+ aResOUString = FpsResId(pResId);
return aResOUString;
}
-
-public:
- std::unique_ptr<SimpleResMgr> m_ResMgr;
-};
-
-CResourceProvider::CResourceProvider( ) :
- m_pImpl( o3tl::make_unique<CResourceProvider_Impl>() )
-{
-}
-
-CResourceProvider::~CResourceProvider( )
-{}
-
-OUString CResourceProvider::getResString( sal_Int16 aId )
-{
- return m_pImpl->getResString( aId );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/misc/resourceprovider.hxx b/fpicker/source/win32/misc/resourceprovider.hxx
index 8d515cbeb20b..a611d1aaf195 100644
--- a/fpicker/source/win32/misc/resourceprovider.hxx
+++ b/fpicker/source/win32/misc/resourceprovider.hxx
@@ -29,18 +29,9 @@
#include <rtl/ustring.hxx>
-class CResourceProvider_Impl;
-
-class CResourceProvider
+namespace CResourceProvider
{
-public:
- CResourceProvider( );
- ~CResourceProvider( );
-
- OUString getResString( sal_Int16 aId );
-
-private:
- std::unique_ptr<CResourceProvider_Impl> m_pImpl;
+ OUString getResString(sal_Int16 aId);
};
#endif
diff --git a/fpicker/uiconfig/ui/explorerfiledialog.ui b/fpicker/uiconfig/ui/explorerfiledialog.ui
index 04c4f824d692..58b268fcc423 100644
--- a/fpicker/uiconfig/ui/explorerfiledialog.ui
+++ b/fpicker/uiconfig/ui/explorerfiledialog.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
-<interface>
+<interface domain="fps">
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkDialog" id="ExplorerFileDialog">
@@ -69,16 +69,16 @@
</child>
<child>
<object class="GtkButton" id="connect_to_server">
- <property name="label" translatable="yes">Servers...</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|connect_to_server">Servers...</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Connect To Server</property>
+ <property name="tooltip_text" translatable="yes" context="explorerfiledialog|connect_to_server|tooltip_text">Connect To Server</property>
<child internal-child="accessible">
<object class="AtkObject" id="connect_to_server-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Connect To Server</property>
+ <property name="AtkObject::accessible-name" translatable="yes" context="explorerfiledialog|connect_to_server-atkobject">Connect To Server</property>
</object>
</child>
</object>
@@ -110,10 +110,10 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Create New Folder</property>
+ <property name="tooltip_text" translatable="yes" context="explorerfiledialog|new_folder|tooltip_text">Create New Folder</property>
<child internal-child="accessible">
<object class="AtkObject" id="new_folder-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes">Create New Folder</property>
+ <property name="AtkObject::accessible-name" translatable="yes" context="explorerfiledialog|new_folder-atkobject">Create New Folder</property>
</object>
</child>
</object>
@@ -249,7 +249,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
- <property name="label" translatable="yes">File _name:</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|file_name_label">File _name:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">file_name</property>
</object>
@@ -274,7 +274,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
- <property name="label" translatable="yes">File _type:</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|file_type_label">File _type:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">file_type</property>
</object>
@@ -370,7 +370,7 @@
</child>
<child>
<object class="GtkCheckButton" id="readonly">
- <property name="label" translatable="yes">_Read-only</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|readonly">_Read-only</property>
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -394,7 +394,7 @@
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="password">
- <property name="label" translatable="yes">Save with password</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|password">Save with password</property>
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -408,7 +408,7 @@
</child>
<child>
<object class="GtkCheckButton" id="extension">
- <property name="label" translatable="yes">_Automatic file name extension</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|extension">_Automatic file name extension</property>
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -423,7 +423,7 @@
</child>
<child>
<object class="GtkCheckButton" id="options">
- <property name="label" translatable="yes">Edit _filter settings</property>
+ <property name="label" translatable="yes" context="explorerfiledialog|options">Edit _filter settings</property>
<property name="use_action_appearance">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/fpicker/uiconfig/ui/foldernamedialog.ui b/fpicker/uiconfig/ui/foldernamedialog.ui
index d6e171203366..11fb27a728c5 100644
--- a/fpicker/uiconfig/ui/foldernamedialog.ui
+++ b/fpicker/uiconfig/ui/foldernamedialog.ui
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<interface>
+<interface domain="fps">
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="FolderNameDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Folder Name ?</property>
+ <property name="title" translatable="yes" context="foldernamedialog|FolderNameDialog">Folder Name ?</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -81,7 +81,7 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Na_me</property>
+ <property name="label" translatable="yes" context="foldernamedialog|label2">Na_me</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">entry</property>
</object>
@@ -112,7 +112,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Create New Folder</property>
+ <property name="label" translatable="yes" context="foldernamedialog|label1">Create New Folder</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui b/fpicker/uiconfig/ui/remotefilesdialog.ui
index bcb3cd2a6013..5b1b736424a7 100644
--- a/fpicker/uiconfig/ui/remotefilesdialog.ui
+++ b/fpicker/uiconfig/ui/remotefilesdialog.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
-<interface>
+<interface domain="fps">
<requires lib="gtk+" version="3.12"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
@@ -15,7 +15,7 @@
<object class="GtkDialog" id="RemoteFilesDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Remote Files</property>
+ <property name="title" translatable="yes" context="remotefilesdialog|RemoteFilesDialog">Remote Files</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -102,7 +102,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Service:</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|label1">Service:</property>
<accessibility>
<relation type="label-for" target="services_lb"/>
</accessibility>
@@ -129,7 +129,7 @@
</child>
<child>
<object class="GtkButton" id="add_service_btn:service_edit_menu">
- <property name="label" translatable="yes">Add service</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|add_service_btn">Add service</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -174,7 +174,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">List view</property>
+ <property name="tooltip_text" translatable="yes" context="remotefilesdialog|list_view|tooltip_text">List view</property>
<property name="image">image2</property>
</object>
<packing>
@@ -189,7 +189,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Icon view</property>
+ <property name="tooltip_text" translatable="yes" context="remotefilesdialog|icon_view|tooltip_text">Icon view</property>
<property name="image">image1</property>
</object>
<packing>
@@ -207,7 +207,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="tooltip_text" translatable="yes">Create New Folder</property>
+ <property name="tooltip_text" translatable="yes" context="remotefilesdialog|new_folder|tooltip_text">Create New Folder</property>
<property name="margin_left">6</property>
</object>
<packing>
@@ -252,7 +252,7 @@
<object class="GtkLabel" id="filterLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Filter</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|filterLabel">Filter</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -264,7 +264,7 @@
<object class="GtkLabel" id="nameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">File name</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|nameLabel">File name</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -315,7 +315,7 @@
<object class="GtkMenuItem" id="edit_service">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Edit service</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|edit_service">_Edit service</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -323,7 +323,7 @@
<object class="GtkMenuItem" id="delete_service">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Delete service</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|delete_service">_Delete service</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -331,7 +331,7 @@
<object class="GtkMenuItem" id="change_password">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Change password</property>
+ <property name="label" translatable="yes" context="remotefilesdialog|change_password">_Change password</property>
<property name="use_underline">True</property>
</object>
</child>