Kaydet (Commit) 3e9c908b authored tarafından Rene Engelhard's avatar Rene Engelhard Kaydeden (comit) Michael Stahl

remove Linux ("UNX") systray "Quickstarter"

Change-Id: Ie0e8b8b7ad59ee640d6b195dfae1a7cf745056fd
Reviewed-on: https://gerrit.libreoffice.org/54543Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst 5c6c6ebd
......@@ -289,7 +289,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,gnome, \
$(if $(ENABLE_EVOAB2),evoab) \
$(if $(ENABLE_GTK),vclplug_gtk) \
$(if $(ENABLE_GTK3),vclplug_gtk3) \
$(if $(ENABLE_SYSTRAY_GTK),qstart_gtk) \
$(if $(ENABLE_GIO),losessioninstall) \
$(if $(ENABLE_GIO),ucpgio1) \
))
......
......@@ -171,7 +171,6 @@ export ENABLE_SDREMOTE=@ENABLE_SDREMOTE@
export ENABLE_SDREMOTE_BLUETOOTH=@ENABLE_SDREMOTE_BLUETOOTH@
export ENABLE_SILENT_MSI=@ENABLE_SILENT_MSI@
export ENABLE_SYMBOLS=@ENABLE_SYMBOLS@
export ENABLE_SYSTRAY_GTK=@ENABLE_SYSTRAY_GTK@
export ENABLE_VALGRIND=@ENABLE_VALGRIND@
export ENABLE_VLC=@ENABLE_VLC@
export ENABLE_WERROR=@ENABLE_WERROR@
......
......@@ -672,7 +672,6 @@ darwin*) # Mac OS X or iOS
INSTROOTCONTENTSUFFIX=/Contents
SDKDIRNAME=AC_PACKAGE_NAME${PRODUCTVERSION}_SDK
fi
enable_systray=no
# See comment above the case "$host_os"
LINKFLAGSSHL="-dynamiclib -single_module"
......@@ -1197,11 +1196,6 @@ libo_FUZZ_ARG_ENABLE(gtk3,
[Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
,test "${enable_gtk3+set}" = set || enable_gtk3=yes)
libo_FUZZ_ARG_ENABLE(systray,
AS_HELP_STRING([--disable-systray],
[Determines whether to build the systray quickstarter.]),
,test "${enable_systray+set}" = set || enable_systray=yes)
AC_ARG_ENABLE(split-app-modules,
AS_HELP_STRING([--enable-split-app-modules],
[Split file lists for app modules, e.g. base, calc.
......@@ -10111,7 +10105,6 @@ dnl ===================================================================
GTK_CFLAGS=""
GTK_LIBS=""
ENABLE_SYSTRAY_GTK=""
if test "$test_gtk" = "yes"; then
if test "$ENABLE_GTK" = "TRUE"; then
......@@ -10125,10 +10118,6 @@ if test "$test_gtk" = "yes"; then
FilterLibs "${GTHREAD_LIBS}"
GTHREAD_LIBS="${filteredlibs}"
if test "x$enable_systray" = "xyes"; then
ENABLE_SYSTRAY_GTK="TRUE"
fi
AC_MSG_CHECKING([whether to enable Gtk print dialog support])
PKG_CHECK_MODULES([GTK_PRINT], [gtk+-unix-print-2.0 >= 2.10.0],
[ENABLE_GTK_PRINT="TRUE"],
......@@ -10156,7 +10145,6 @@ fi
AC_SUBST(ENABLE_GIO)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
AC_SUBST(ENABLE_SYSTRAY_GTK)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTHREAD_CFLAGS)
......
......@@ -49,7 +49,6 @@ $(eval $(call gb_Library_add_defs,sofficeapp,\
-DDESKTOP_DLLIMPLEMENTATION \
$(if $(filter WNT,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter MACOSX,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter TRUE,$(ENABLE_SYSTRAY_GTK)),-DENABLE_QUICKSTART_APPLET) \
))
$(eval $(call gb_Library_set_precompiled_header,sofficeapp,$(SRCDIR)/desktop/inc/pch/precompiled_sofficeapp))
......
......@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
--disable-systray
--without-export-validation
--without-helppack-integration
--without-junit
......
......@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
--disable-systray
--without-export-validation
--without-helppack-integration
--without-junit
......@@ -4,7 +4,6 @@
--disable-gstreamer-0-10
--disable-gstreamer-1-0
--disable-randr
--disable-systray
--without-export-validation
--without-helppack-integration
--without-junit
......
--disable-breakpad
--disable-firebird-sdbc
--disable-online-update
--disable-systray
--without-export-validation
--without-helppack-integration
......
......@@ -21,7 +21,6 @@ $(eval $(call gb_InstallModule_use_auto_install_libs,scp2/ooo,\
))
$(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
ENABLE_SYSTRAY_GTK \
ENABLE_MACOSX_SANDBOX \
ENABLE_ONLINE_UPDATE \
SYSTEM_CURL \
......
......@@ -236,17 +236,6 @@ File gid_Brand_File_Share_Xdg_Math
End
#endif
#if defined UNX && ! defined MACOSX
#ifdef ENABLE_SYSTRAY_GTK
File gid_Brand_File_Share_Xdg_QStart
TXT_FILE_BODY;
Dir = gid_Brand_Dir_Share_Xdg;
Styles = (PACKED,SCPZIP_REPLACE);
Name = "qstart.desktop";
End
#endif
#endif
#if defined UNX && ! defined MACOSX
File gid_Brand_File_Share_Xdg_Writer
TXT_FILE_BODY;
......
# -*- 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/.
#
# 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 .
#
$(eval $(call gb_Library_Library,qstart_gtk))
$(eval $(call gb_Library_set_include,qstart_gtk,\
$$(INCLUDE) \
-I$(SRCDIR)/sfx2/inc \
))
$(eval $(call gb_Library_use_sdk_api,qstart_gtk))
$(eval $(call gb_Library_add_defs,qstart_gtk,-DENABLE_QUICKSTART_APPLET))
ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
$(eval $(call gb_Library_add_defs,qstart_gtk,-DENABLE_SYSTRAY_GTK))
endif
$(eval $(call gb_Library_use_libraries,qstart_gtk,\
comphelper \
cppu \
cppuhelper \
fwe \
i18nlangtag \
sal \
sax \
sb \
sot \
svl \
svt \
tk \
tl \
ucbhelper \
utl \
vcl \
sfx \
))
$(eval $(call gb_Library_use_externals,qstart_gtk,\
boost_headers \
gio \
gtk \
libxml2 \
))
$(eval $(call gb_Library_add_exception_objects,qstart_gtk,\
sfx2/source/appl/shutdowniconunx \
))
# vim: set noet sw=4 ts=4:
......@@ -44,14 +44,6 @@ $(eval $(call gb_Library_add_defs,sfx,\
$(if $(filter TRUE,$(ENABLE_CUPS)),-DENABLE_CUPS) \
))
ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
$(eval $(call gb_Library_add_defs,sfx,\
-DENABLE_QUICKSTART_APPLET \
-DENABLE_SYSTRAY_GTK \
-DPLUGIN_NAME=libqstart_gtk$(gb_Library_OOOEXT) \
))
endif
$(eval $(call gb_Library_use_libraries,sfx,\
basegfx \
comphelper \
......
......@@ -51,14 +51,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sfx2,\
))
endif
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD SOLARIS, $(OS)))
ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
$(eval $(call gb_Module_add_targets,sfx2,\
Library_qstart_gtk \
))
endif
endif
#todo: clean up quickstarter stuff in both libraries
#todo: move standard pool to svl
......
......@@ -78,12 +78,6 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::sfx2;
#ifdef ENABLE_QUICKSTART_APPLET
# if !defined(_WIN32) && !defined(MACOSX)
extern "C" { static void thisModule() {} }
# endif
#endif
class SfxNotificationListener_Impl : public cppu::WeakImplHelper< XDispatchResultListener >
{
public:
......@@ -143,27 +137,7 @@ bool LoadModule()
pInitSystray = aqua_init_systray;
pDeInitSystray = aqua_shutdown_systray;
loaded = true;
# else // UNX
osl::Module plugin;
oslGenericFunction pTmpInit = nullptr;
oslGenericFunction pTmpDeInit = nullptr;
if ( plugin.loadRelative( &thisModule, "libqstart_gtklo.so" ) )
{
pTmpInit = plugin.getFunctionSymbol( "plugin_init_sys_tray" );
pTmpDeInit = plugin.getFunctionSymbol( "plugin_shutdown_sys_tray" );
}
if ( !pTmpInit || !pTmpDeInit )
{
loaded = false;
}
else
{
plugin.release();
pInitSystray = pTmpInit;
pDeInitSystray = pTmpDeInit;
loaded = true;
}
# endif // UNX
# endif // MACOSX
#endif // ENABLE_QUICKSTART_APPLET
}
assert(!boost::logic::indeterminate(loaded));
......@@ -637,56 +611,15 @@ void ShutdownIcon::LeaveModalMode()
#else
bool ShutdownIcon::IsQuickstarterInstalled()
{
#ifndef ENABLE_QUICKSTART_APPLET
return false;
#else // !ENABLE_QUICKSTART_APPLET
#ifdef UNX
return LoadModule();
#endif // UNX
#endif // !ENABLE_QUICKSTART_APPLET
}
#endif // !WNT
#if defined (ENABLE_QUICKSTART_APPLET) && defined (UNX)
/**
* Return the XDG autostart directory.
* http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
* Available in Unix and with Quickstart enabled.
* @param bCreate Create the directory if it does not exist yet.
* @return OUString containing the autostart directory path.
*/
static OUString getAutostartDir( bool bCreate )
{
OUString aShortcut;
const char *pConfigHome;
if( (pConfigHome = getenv("XDG_CONFIG_HOME") ) )
aShortcut = OStringToOUString( OString( pConfigHome ),
RTL_TEXTENCODING_UTF8 );
else
{
OUString aHomeURL;
osl::Security().getHomeDir( aHomeURL );
::osl::File::getSystemPathFromFileURL( aHomeURL, aShortcut );
aShortcut += "/.config";
}
aShortcut += "/autostart";
if (bCreate)
{
OUString aShortcutUrl;
osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
osl::Directory::createPath( aShortcutUrl );
}
return aShortcut;
}
#endif
#ifdef ENABLE_QUICKSTART_APPLET
#ifndef MACOSX
OUString ShutdownIcon::getShortcutName()
{
#ifndef ENABLE_QUICKSTART_APPLET
return OUString();
#else
#ifdef _WIN32
OUString aShortcutName(SfxResId(STR_QUICKSTART_LNKNAME));
aShortcutName += ".lnk";
......@@ -694,13 +627,11 @@ OUString ShutdownIcon::getShortcutName()
OUString aShortcut(GetAutostartFolderNameW32());
aShortcut += "\\";
aShortcut += aShortcutName;
#else // UNX
OUString aShortcut = getAutostartDir(false);
aShortcut += "/qstart.desktop";
#endif // UNX
return aShortcut;
#endif // ENABLE_QUICKSTART_APPLET
#endif // _WIN32
}
#endif
#endif
bool ShutdownIcon::GetAutostart( )
{
......@@ -727,48 +658,22 @@ bool ShutdownIcon::GetAutostart( )
void ShutdownIcon::SetAutostart( bool bActivate )
{
#ifdef ENABLE_QUICKSTART_APPLET
#ifndef MACOSX
OUString aShortcut( getShortcutName() );
#endif
if( bActivate && IsQuickstarterInstalled() )
{
#ifdef _WIN32
EnableAutostartW32( aShortcut );
#else // UNX
getAutostartDir( true );
OUString aPath( "${BRAND_BASE_DIR}/" LIBO_SHARE_FOLDER "/xdg/qstart.desktop" );
rtl::Bootstrap::expandMacros( aPath );
OUString aDesktopFile;
::osl::File::getSystemPathFromFileURL( aPath, aDesktopFile );
OString aDesktopFileUnx = OUStringToOString( aDesktopFile,
osl_getThreadTextEncoding() );
OString aShortcutUnx = OUStringToOString( aShortcut,
osl_getThreadTextEncoding() );
if ((0 != symlink(aDesktopFileUnx.getStr(), aShortcutUnx.getStr())) && (errno == EEXIST))
{
unlink(aShortcutUnx.getStr());
(void) symlink(aDesktopFileUnx.getStr(), aShortcutUnx.getStr());
//deliberately ignore return value, it's non-critical if it fails
}
ShutdownIcon *pIcon = ShutdownIcon::createInstance();
if( pIcon )
pIcon->initSystray();
#endif // UNX
#endif
}
else
{
#ifndef MACOSX
OUString aShortcutUrl;
::osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
::osl::File::remove( aShortcutUrl );
#ifdef UNX
if (pShutdownIcon)
{
ShutdownIcon *pIcon = getInstance();
pIcon->deInitSystray();
}
#endif
}
#else
......
This diff is collapsed.
......@@ -26,7 +26,7 @@ share_SRCDIR := $(SRCDIR)/sysui/desktop
share_TRANSLATE := $(SRCDIR)/solenv/bin/desktop-translate.pl
LAUNCHERLIST_APPS := writer calc draw impress math base startcenter
LAUNCHERLIST := $(LAUNCHERLIST_APPS) qstart xsltfilter
LAUNCHERLIST := $(LAUNCHERLIST_APPS) xsltfilter
LAUNCHERS := $(foreach launcher,$(LAUNCHERLIST),$(share_SRCDIR)/menus/$(launcher).desktop)
MIMELIST := \
......@@ -177,7 +177,7 @@ $(share_WORKDIR)/%/create_tree.sh: $(share_SRCDIR)/share/create_tree.sh \
$(share_WORKDIR)/%/launcherlist: $(LAUNCHERS)
mkdir -p $(dir $@)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
echo "$(addsuffix .desktop,$(filter-out qstart,$(LAUNCHERLIST)))" > $@
echo "$(addsuffix .desktop,$(LAUNCHERLIST))" > $@
$(share_WORKDIR)/%/openoffice.applications: $(share_SRCDIR)/mimetypes/openoffice.applications
......
#
# 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 .
#
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Categories=Office;
Exec=${UNIXBASISROOTNAME} --quickstart --nologo --nodefault
NoDisplay=true
Name=%PRODUCTNAME Quickstarter
Comment=Hook for quickstarter startup
X-GIO-NoFuse=true
X-KDE-Protocols=file,http,ftp,webdav,webdavs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment