[Libreoffice-commits] core.git: Branch 'feature/gengal' - 5 commits - config_host/config_vclplug.h.in configure.ac desktop/Library_sofficeapp.mk desktop/source extras/source include/svx solenv/bin svx/source sysui/CustomTarget_share.mk sysui/desktop vcl/unx
Michael Meeks
michael.meeks at suse.com
Mon May 13 03:17:19 PDT 2013
config_host/config_vclplug.h.in | 2
configure.ac | 2
desktop/Library_sofficeapp.mk | 1
desktop/source/app/appinit.cxx | 43 ++++----
extras/source/gallery/galleries.ulf | 2
include/svx/gallery1.hxx | 33 +-----
solenv/bin/desktop-translate.pl | 155 +++++++++++++++++++++++++++++
svx/source/gallery2/gallery1.cxx | 32 -----
svx/source/gallery2/galtheme.cxx | 2
sysui/CustomTarget_share.mk | 29 +++--
sysui/desktop/menus/base.desktop | 4
sysui/desktop/menus/calc.desktop | 4
sysui/desktop/menus/draw.desktop | 4
sysui/desktop/menus/impress.desktop | 4
sysui/desktop/menus/math.desktop | 4
sysui/desktop/menus/startcenter.desktop | 2
sysui/desktop/menus/writer.desktop | 4
sysui/desktop/menus/xsltfilter.desktop | 2
sysui/desktop/share/brand.pl | 16 ++
sysui/desktop/share/translate.pl | 149 ---------------------------
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 4
vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 4
22 files changed, 251 insertions(+), 251 deletions(-)
New commits:
commit 5a6060d0d90a268a5febd15383c2b3f872810329
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 13 11:07:47 2013 +0100
gallery: remove obsolete GalleryImportThemeEntry
Change-Id: I024bfa537360339befdc67a2fa2b51b15d9c3611
diff --git a/extras/source/gallery/galleries.ulf b/extras/source/gallery/galleries.ulf
new file mode 100644
index 0000000..7e1c915
--- /dev/null
+++ b/extras/source/gallery/galleries.ulf
@@ -0,0 +1,2 @@
+[sounds]
+en-US = "Sounds"
diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
index 2be6b78..912e337 100644
--- a/include/svx/gallery1.hxx
+++ b/include/svx/gallery1.hxx
@@ -80,24 +80,6 @@ public:
typedef ::std::vector< GalleryThemeEntry* > GalleryThemeList;
-// ---------------------------
-// - GalleryImportThemeEntry -
-// ---------------------------
-
-struct GalleryImportThemeEntry
-{
- OUString aThemeName;
- OUString aUIName;
- INetURLObject aURL;
-};
-
-typedef ::std::vector< GalleryImportThemeEntry* > GalleryImportThemeList;
-
-// -----------------------------------------------------------------------------
-
-SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry );
-SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry );
-
// -----------
// - Gallery -
// -----------
@@ -110,14 +92,13 @@ class Gallery : public SfxBroadcaster
{
// only for gengal utility!
friend Gallery* createGallery( const OUString& );
- friend void disposeGallery( Gallery* );
+ friend void disposeGallery( Gallery* );
typedef std::vector<GalleryThemeCacheEntry*> GalleryCacheThemeList;
private:
GalleryThemeList aThemeList;
- GalleryImportThemeList aImportList;
GalleryCacheThemeList aThemeCache;
INetURLObject aRelURL;
INetURLObject aUserURL;
@@ -145,12 +126,12 @@ public:
{ return nPos < aThemeList.size() ? aThemeList[ nPos ] : NULL; }
const GalleryThemeEntry* GetThemeInfo( const String& rThemeName ) { return ImplGetThemeEntry( rThemeName ); }
- SVX_DLLPUBLIC sal_Bool HasTheme( const String& rThemeName );
- OUString GetThemeName( sal_uIntPtr nThemeId ) const;
+ SVX_DLLPUBLIC sal_Bool HasTheme( const String& rThemeName );
+ OUString GetThemeName( sal_uIntPtr nThemeId ) const;
- SVX_DLLPUBLIC sal_Bool CreateTheme( const String& rThemeName );
- sal_Bool RenameTheme( const String& rOldName, const String& rNewName );
- SVX_DLLPUBLIC sal_Bool RemoveTheme( const String& rThemeName );
+ SVX_DLLPUBLIC sal_Bool CreateTheme( const String& rThemeName );
+ sal_Bool RenameTheme( const String& rOldName, const String& rNewName );
+ SVX_DLLPUBLIC sal_Bool RemoveTheme( const String& rThemeName );
SVX_DLLPUBLIC GalleryTheme* AcquireTheme( const String& rThemeName, SfxListener& rListener );
SVX_DLLPUBLIC void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener );
@@ -160,7 +141,7 @@ public:
const INetURLObject& GetUserURL() const { return aUserURL; }
const INetURLObject& GetRelativeURL() const { return aRelURL; }
- sal_Bool IsMultiPath() const { return bMultiPath; }
+ sal_Bool IsMultiPath() const { return bMultiPath; }
};
#endif // _SVX_GALLERY1_HXX_
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 9d005a1..8455318 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -116,33 +116,6 @@ void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName )
bThemeNameFromResource = ( nId && bResetThemeName );
}
-// ---------------------------
-// - GalleryImportThemeEntry -
-// ---------------------------
-
-SvStream& operator<<( SvStream& rOut, const GalleryImportThemeEntry& rEntry )
-{
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rEntry.aThemeName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, rEntry.aUIName, RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, (rEntry.aURL.GetMainURL( INetURLObject::NO_DECODE )), RTL_TEXTENCODING_UTF8);
- write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, OUString(), RTL_TEXTENCODING_UTF8); //aImportName
-
- write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOut, OString());
- return rOut;
-}
-
-// ------------------------------------------------------------------------
-
-SvStream& operator>>( SvStream& rIn, GalleryImportThemeEntry& rEntry )
-{
- rEntry.aThemeName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
- rEntry.aUIName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
- rEntry.aURL = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8);
- read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIn, RTL_TEXTENCODING_UTF8); //aImportName
- read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIn);
- return rIn;
-}
-
// --------------------------
// - GalleryThemeCacheEntry -
// --------------------------
@@ -183,11 +156,6 @@ Gallery::~Gallery()
for ( size_t i = 0, n = aThemeList.size(); i < n; ++i )
delete aThemeList[ i ];
aThemeList.clear();
-
- // Import-Liste loeschen
- for ( size_t i = 0, n = aImportList.size(); i < n; ++i )
- delete aImportList[ i ];
- aImportList.clear();
}
// ------------------------------------------------------------------------
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index c140aeb..81668bd 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -703,7 +703,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa
{
String aThemeName;
sal_uInt16 nVersion;
- sal_Bool bThemeNameFromResource = sal_False;
+ sal_Bool bThemeNameFromResource = sal_False;
*pIStm >> nVersion;
commit 5c37e2139d4981c5704f16eabe163cda1d2cdb9d
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon May 13 10:35:51 2013 +0100
move desktop translation tool to solenv.
Change-Id: I6e119f79a9293fa204904459c75ff97e5d3b5be6
diff --git a/sysui/desktop/share/translate.pl b/solenv/bin/desktop-translate.pl
similarity index 95%
rename from sysui/desktop/share/translate.pl
rename to solenv/bin/desktop-translate.pl
index 48742b7..ad2a07c 100644
--- a/sysui/desktop/share/translate.pl
+++ b/solenv/bin/desktop-translate.pl
@@ -20,6 +20,12 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
+#
+# Translates multiple .desktop files at once with strings from .ulf
+# files; if you add new translateable .ulf files please add them to
+# l10ntools/source/localize.cxx
+#
+
my ($prefix, $ext, $key);
my $productname = "LibreOffice";
my $workdir = ".";
diff --git a/sysui/CustomTarget_share.mk b/sysui/CustomTarget_share.mk
index 4115de3..121005e 100644
--- a/sysui/CustomTarget_share.mk
+++ b/sysui/CustomTarget_share.mk
@@ -20,6 +20,8 @@ endif
share_WORKDIR := $(call gb_CustomTarget_get_workdir,sysui/share)
share_SRCDIR := $(SRCDIR)/sysui/desktop
+share_TRANSLATE := $(SOLARENV)/bin/desktop-translate.pl
+
LAUNCHERLIST_APPS := writer calc draw impress math base startcenter
LAUNCHERLIST := $(LAUNCHERLIST_APPS) qstart xsltfilter
LAUNCHERS := $(foreach launcher,$(LAUNCHERLIST),$(share_SRCDIR)/menus/$(launcher).desktop)
@@ -147,22 +149,22 @@ $(share_WORKDIR)/%/openoffice.org.xml: $(share_WORKDIR)/documents.ulf $(MIMEDESK
$(share_WORKDIR)/%/openoffice.keys: \
$(share_SRCDIR)/mimetypes/openoffice.mime $(MIMEKEYS) $(share_SRCDIR)/share/brand.pl \
- $(share_SRCDIR)/share/translate.pl $(share_WORKDIR)/documents.ulf
+ $(share_TRANSLATE) $(share_WORKDIR)/documents.ulf
mkdir -p $(dir $@)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(PERL) $(share_SRCDIR)/share/brand.pl -p $* -u $(UNIXFILENAME.$*) \
--iconprefix $(UNIXFILENAME.$*) $^ $(share_WORKDIR)/$*
- $(PERL) $(share_SRCDIR)/share/translate.pl -p $* -d $(share_WORKDIR)/$* \
+ $(PERL) $(share_TRANSLATE) -p $* -d $(share_WORKDIR)/$* \
--ext "keys" --key "description" $(share_WORKDIR)/documents.ulf
cat $(MIMEKEYS) > $@
$(share_WORKDIR)/%/mimelnklist: $(MIMEDESKTOPS) $(share_SRCDIR)/share/brand.pl \
- $(share_SRCDIR)/share/translate.pl $(share_WORKDIR)/documents.ulf
+ $(share_TRANSLATE) $(share_WORKDIR)/documents.ulf
mkdir -p $(dir $@)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(PERL) $(share_SRCDIR)/share/brand.pl -p $* -u $(UNIXFILENAME.$*) \
--iconprefix $(UNIXFILENAME.$*) $^ $(share_WORKDIR)/$*
- $(PERL) $(share_SRCDIR)/share/translate.pl -p $* -d $(share_WORKDIR)/$* \
+ $(PERL) $(share_TRANSLATE) -p $* -d $(share_WORKDIR)/$* \
--ext "desktop" --key "Comment" $(share_WORKDIR)/documents.ulf
echo "$(MIMEDESKTOPS)" > $@
@@ -207,17 +209,17 @@ $(share_WORKDIR)/%/openoffice.applications: $(share_SRCDIR)/mimetypes/openoffice
cat $< | tr -d "\015" | sed -e "s/OFFICENAME/$(UNIXFILENAME.$*)/" -e "s/%PRODUCTNAME/$(PRODUCTNAME.$*) $(PRODUCTVERSION.$*)/" > $@
$(share_WORKDIR)/%/build.flag: $(share_SRCDIR)/share/brand.pl $(LAUNCHERS) \
- $(share_SRCDIR)/share/translate.pl $(addprefix $(share_WORKDIR)/,$(ULFS))
+ $(share_TRANSLATE) $(addprefix $(share_WORKDIR)/,$(ULFS))
mkdir -p $(dir $@)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(PERL) $(share_SRCDIR)/share/brand.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -u '$$(UNIXPRODUCTNAME)$$(BRANDPACKAGEVERSION)' \
$(brand_URIPARAM) \
--iconprefix '$$(UNIXBASISROOTNAME)' $^ $(share_WORKDIR)/$*
- $(PERL) $(share_SRCDIR)/share/translate.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
+ $(PERL) $(share_TRANSLATE) -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
--ext "desktop" --key "Comment" $(share_WORKDIR)/launcher_comment.ulf
- $(PERL) $(share_SRCDIR)/share/translate.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
+ $(PERL) $(share_TRANSLATE) -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
--ext "desktop" --key "GenericName" $(share_WORKDIR)/launcher_genericname.ulf
- $(PERL) $(share_SRCDIR)/share/translate.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
+ $(PERL) $(share_TRANSLATE) -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
--ext "desktop" --key "UnityQuickList" $(share_WORKDIR)/launcher_unityquicklist.ulf
touch $@
commit af104b34066022551bf7c97a0a24d52b04ca1a28
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat May 11 17:52:26 2013 +0100
fdo#64311 - fix pre-processor conditionals & don't bail-out without gnome-vfs.
Change-Id: Ia7a805c95625b52fc99face000587692de21461e
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 6396996..451c1d8 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Library_use_sdk_api,sofficeapp))
$(eval $(call gb_Library_add_defs,sofficeapp,\
-DDESKTOP_DLLIMPLEMENTATION \
- $(if $(filter TRUE,$(ENABLE_GNOMEVFS)),-DGNOME_VFS_ENABLED) \
$(if $(filter WNT,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter MACOSX,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter TRUE,$(ENABLE_SYSTRAY_GTK)),-DENABLE_QUICKSTART_APPLET) \
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 05b3b30..de9299b 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -20,6 +20,8 @@
#include <algorithm>
+#include <config_vclplug.h>
+
#include "app.hxx"
#include "cmdlineargs.hxx"
#include "desktopresid.hxx"
@@ -73,25 +75,32 @@ static void configureUcb()
// createInstance w/o args directly to obtain an instance:
UniversalContentBroker::create(comphelper::getProcessComponentContext());
-#ifdef GNOME_VFS_ENABLED
- // Instantiate GNOME-VFS UCP in the thread that initialized GNOME in order
- // to avoid a deadlock that may occure in case the UCP gets initialized from
- // a different thread (which may happen when calling remotely via UNO); this
- // is not a fix, just a workaround:
- Reference< XCurrentContext > xCurrentContext(getCurrentContext());
- Any aValue(xCurrentContext->getValueByName("system.desktop-environment"));
- OUString aDesktopEnvironment;
- if ((aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME")
+#if ENABLE_GNOME_VFS
+ try {
+ // Instantiate GNOME-VFS UCP in the thread that initialized GNOME in order
+ // to avoid a deadlock that may occure in case the UCP gets initialized from
+ // a different thread (which may happen when calling remotely via UNO); this
+ // is not a fix, just a workaround:
+ Reference< XCurrentContext > xCurrentContext(getCurrentContext());
+ Any aValue(xCurrentContext->getValueByName("system.desktop-environment"));
+ OUString aDesktopEnvironment;
+ if ((aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME")
+ {
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ UniversalContentBroker::create(xContext)
+ ->registerContentProvider(
+ Reference<XContentProvider>(
+ xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.ucb.GnomeVFSContentProvider", xContext),
+ UNO_QUERY_THROW),
+ ".*", false);
+ }
+ }
+ catch ( const uno::Exception & )
{
- Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- UniversalContentBroker::create(xContext)
- ->registerContentProvider(
- Reference<XContentProvider>(
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.ucb.GnomeVFSContentProvider", xContext),
- UNO_QUERY_THROW),
- ".*", false);
+ SAL_WARN( "desktop", "missing gnome-vfs component to initialize thread workaround" );
}
-#endif // GNOME_VFS_ENABLED
+#endif // ENABLE_GNOME_VFS
}
void Desktop::InitApplicationServiceManager()
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index b1b2d60..102e16e 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -140,7 +140,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
-#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO)
+#if ENABLE_GNOME_VFS || ENABLE_GIO
gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
#endif
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index 7c87906..f9adefc 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -59,7 +59,7 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentCon
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, (char *)NULL );
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
-#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO)
+#if ENABLE_GNOME_VFS || ENABLE_GIO
gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
#endif
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
commit 5b12cf71c627344f3785d25f6dd1f0d0bba4af29
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat May 11 17:35:04 2013 +0100
fdo#64311 - don't encourage the fpicker to give us URLs we can't handle.
Change-Id: Ide7d833801e96a3375909238d036687082f34605
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index 8eecf34..4daf383 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -11,5 +11,7 @@ Settings about which X11 desktops have support enabled.
#define ENABLE_KDE 0
#define ENABLE_KDE4 0
#define ENABLE_TDE 0
+#define ENABLE_GNOME_VFS 0
+#define ENABLE_GIO 0
#endif
diff --git a/configure.ac b/configure.ac
index 9871f4c..4087cca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9355,6 +9355,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" -
ENABLE_GNOMEVFS="TRUE"
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
+ AC_DEFINE(ENABLE_GNOME_VFS)
else
AC_MSG_RESULT([no])
fi
@@ -9494,6 +9495,7 @@ if test "$test_gtk" = "yes"; then
ENABLE_GIO="TRUE"
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES( GIO, gio-2.0 )
+ AC_DEFINE(ENABLE_GIO)
else
AC_MSG_RESULT([no])
fi
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 5672b03..b1b2d60 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -23,6 +23,8 @@
#undef _LINUX_SOURCE_COMPAT
#endif
+#include <config_vclplug.h>
+
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -138,7 +140,9 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
+#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO)
gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
+#endif
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
m_pVBox = gtk_vbox_new( sal_False, 0 );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index e08fdf7..7c87906 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -23,6 +23,8 @@
#undef _LINUX_SOURCE_COMPAT
#endif
+#include <config_vclplug.h>
+
#include <com/sun/star/awt/Toolkit.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -57,7 +59,9 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentCon
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, (char *)NULL );
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
+#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO)
gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
+#endif
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False );
}
commit eee747b6d788ef74d4383c79a8e154b10a0f9037
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat May 11 17:25:11 2013 +0100
fdo#64311 - .desktop files: use %U for URLs only if we have gvfs or gio.
Change-Id: I52c75432eb30a46b2c6a597211df09fdbb08056c
diff --git a/sysui/CustomTarget_share.mk b/sysui/CustomTarget_share.mk
index 7c2eb89..4115de3 100644
--- a/sysui/CustomTarget_share.mk
+++ b/sysui/CustomTarget_share.mk
@@ -7,6 +7,16 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
+ifeq ($(ENABLE_GIO),TRUE)
+ brand_URIPARAM := --urls
+else
+ifeq ($(ENABLE_GNOMEVFS),TRUE)
+ brand_URIPARAM := --urls
+else
+ brand_URIPARAM :=
+endif
+endif
+
share_WORKDIR := $(call gb_CustomTarget_get_workdir,sysui/share)
share_SRCDIR := $(SRCDIR)/sysui/desktop
@@ -201,6 +211,7 @@ $(share_WORKDIR)/%/build.flag: $(share_SRCDIR)/share/brand.pl $(LAUNCHERS) \
mkdir -p $(dir $@)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
$(PERL) $(share_SRCDIR)/share/brand.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -u '$$(UNIXPRODUCTNAME)$$(BRANDPACKAGEVERSION)' \
+ $(brand_URIPARAM) \
--iconprefix '$$(UNIXBASISROOTNAME)' $^ $(share_WORKDIR)/$*
$(PERL) $(share_SRCDIR)/share/translate.pl -p $(PRODUCTNAME.$*)$(PRODUCTVERSION) -d $(share_WORKDIR)/$* \
--ext "desktop" --key "Comment" $(share_WORKDIR)/launcher_comment.ulf
diff --git a/sysui/desktop/menus/base.desktop b/sysui/desktop/menus/base.desktop
index db3a04e..5756260 100755
--- a/sysui/desktop/menus/base.desktop
+++ b/sysui/desktop/menus/base.desktop
@@ -21,7 +21,7 @@ Terminal=false
Icon=base
Type=Application
Categories=Office;Database;X-Red-Hat-Base;X-MandrivaLinux-MoreApplications-Databases;
-Exec=${UNIXBASISROOTNAME} --base %U
+Exec=${UNIXBASISROOTNAME} --base %%FILE%%
MimeType=application/vnd.oasis.opendocument.database;application/vnd.sun.xml.base;
Name=%PRODUCTNAME Base
GenericName=Database Development
@@ -33,5 +33,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Database
-Exec=libreoffice --base %U
+Exec=libreoffice --base %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/calc.desktop b/sysui/desktop/menus/calc.desktop
index d693593..81be9a8 100755
--- a/sysui/desktop/menus/calc.desktop
+++ b/sysui/desktop/menus/calc.desktop
@@ -21,7 +21,7 @@ Terminal=false
Icon=calc
Type=Application
Categories=Office;Spreadsheet;X-Red-Hat-Base;X-MandrivaLinux-Office-Spreadsheets;
-Exec=${UNIXBASISROOTNAME} --calc %U
+Exec=${UNIXBASISROOTNAME} --calc %%FILE%%
MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;text/spreadsheet;application/csv;application/excel;application/tab-separated-values;application/vnd.lotus-1-2-3;application/vnd.oasis.opendocument.chart;application/vnd.oasis.opendocument.chart-template;application/x-dbase;application/x-dos_ms_excel;application/x-excel;application/x-msexcel;application/x-ms-excel;application/x-quattropro;application/x-123;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv
;
Name=%PRODUCTNAME Calc
GenericName=Spreadsheet
@@ -33,5 +33,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Spreadsheet
-Exec=libreoffice --calc %U
+Exec=libreoffice --calc %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/draw.desktop b/sysui/desktop/menus/draw.desktop
index 297925c..7de198b 100755
--- a/sysui/desktop/menus/draw.desktop
+++ b/sysui/desktop/menus/draw.desktop
@@ -21,7 +21,7 @@ Terminal=false
Icon=draw
Type=Application
Categories=Office;FlowChart;Graphics;2DGraphics;VectorGraphics;X-Red-Hat-Base;X-MandrivaLinux-Office-Drawing;
-Exec=${UNIXBASISROOTNAME} --draw %U
+Exec=${UNIXBASISROOTNAME} --draw %%FILE%%
MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.visio;application/x-wpg;
Name=%PRODUCTNAME Draw
GenericName=Drawing Program
@@ -33,5 +33,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Drawing
-Exec=libreoffice --draw %U
+Exec=libreoffice --draw %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/impress.desktop b/sysui/desktop/menus/impress.desktop
index c6e3a40..10c9cec 100755
--- a/sysui/desktop/menus/impress.desktop
+++ b/sysui/desktop/menus/impress.desktop
@@ -21,7 +21,7 @@ Terminal=false
Icon=impress
Type=Application
Categories=Office;Presentation;X-Red-Hat-Base;X-MandrivaLinux-Office-Presentations;
-Exec=${UNIXBASISROOTNAME} --impress %U
+Exec=${UNIXBASISROOTNAME} --impress %%FILE%%
MimeType=application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;
Name=%PRODUCTNAME Impress
GenericName=Presentation
@@ -33,5 +33,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Presentation
-Exec=libreoffice --impress %U
+Exec=libreoffice --impress %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/math.desktop b/sysui/desktop/menus/math.desktop
index a12a7a7..2e0d344 100755
--- a/sysui/desktop/menus/math.desktop
+++ b/sysui/desktop/menus/math.desktop
@@ -22,7 +22,7 @@ NoDisplay=true
Icon=math
Type=Application
Categories=Office;Education;Science;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other;
-Exec=${UNIXBASISROOTNAME} --math %U
+Exec=${UNIXBASISROOTNAME} --math %%FILE%%
MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.oasis.opendocument.formula-template;text/mathml;
Name=%PRODUCTNAME Math
GenericName=Formula Editor
@@ -34,5 +34,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Formula
-Exec=libreoffice --math %U
+Exec=libreoffice --math %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/startcenter.desktop b/sysui/desktop/menus/startcenter.desktop
index 889205c..d8b0f1a 100755
--- a/sysui/desktop/menus/startcenter.desktop
+++ b/sysui/desktop/menus/startcenter.desktop
@@ -22,7 +22,7 @@ NoDisplay=true
Icon=startcenter
Type=Application
Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other;
-Exec=${UNIXBASISROOTNAME} %U
+Exec=${UNIXBASISROOTNAME} %%FILE%%
MimeType=application/vnd.openofficeorg.extension;
Name=%PRODUCTNAME
GenericName=Office
diff --git a/sysui/desktop/menus/writer.desktop b/sysui/desktop/menus/writer.desktop
index 72fcaff..1eef64e 100755
--- a/sysui/desktop/menus/writer.desktop
+++ b/sysui/desktop/menus/writer.desktop
@@ -21,7 +21,7 @@ Terminal=false
Icon=writer
Type=Application
Categories=Office;WordProcessor;X-Red-Hat-Base;X-MandrivaLinux-Office-Wordprocessors;
-Exec=${UNIXBASISROOTNAME} --writer %U
+Exec=${UNIXBASISROOTNAME} --writer %%FILE%%
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/x-hwp;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.lotus-wordpro;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.ms-works;application/vnd.stardivision.writer-global;application/x-extension-txt;application/x-t602;text/plain;
Name=%PRODUCTNAME Writer
GenericName=Word Processor
@@ -33,5 +33,5 @@ InitialPreference=5
X-Ayatana-Desktop-Shortcuts=X-New
[X-New Shortcut Group]
UnityQuicklist=New Document
-Exec=libreoffice --writer %U
+Exec=libreoffice --writer %%FILE%%
TargetEnvironment=Unity
diff --git a/sysui/desktop/menus/xsltfilter.desktop b/sysui/desktop/menus/xsltfilter.desktop
index 8439fec..ad623dc 100644
--- a/sysui/desktop/menus/xsltfilter.desktop
+++ b/sysui/desktop/menus/xsltfilter.desktop
@@ -2,7 +2,7 @@
Version=1.0
Terminal=false
Type=Application
-Exec=${UNIXBASISROOTNAME} %U
+Exec=${UNIXBASISROOTNAME} %%FILE%%
MimeType=application/vnd.oasis.opendocument.text-flat-xml;application/vnd.oasis.opendocument.spreadsheet-flat-xml;application/vnd.oasis.opendocument.graphics-flat-xml;application/vnd.oasis.opendocument.presentation-flat-xml;
Name=%PRODUCTNAME XSLT based filters
GenericName=XSLT based filters
diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl
index f10e99d..ae2911b 100644
--- a/sysui/desktop/share/brand.pl
+++ b/sysui/desktop/share/brand.pl
@@ -20,10 +20,9 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-
-#*********************************************************************
#
-# main
+# This tool is used to re-write and substitute variables
+# into Unix .desktop, mimelnk, .keys files etc.
#
$destdir = pop @ARGV;
@@ -31,6 +30,7 @@ mkdir $destdir,0777;
$productname = "LibreOffice";
$productfilename = "libreoffice";
+$urls = 0;
$prefix = "";
$iconprefix = "";
@@ -57,6 +57,10 @@ while ($_ = $ARGV[0], /^-/) {
$category = $ARGV[0];
shift;
}
+ # Whether we can handle URLs on the command-line
+ if (/^--urls/) {
+ $urls = 1;
+ }
}
@@ -110,6 +114,12 @@ while (<>) {
# replace %PRODUCTNAME placeholders
s/%PRODUCTNAME/$productname/g;
+ if ( $urls ) {
+ s/%%FILE%%/%U/g;
+ } else {
+ s/%%FILE%%/%F/g;
+ }
+
print OUTFILE "$_\n";
}
More information about the Libreoffice-commits
mailing list