Optional removal of SystemTray tool Added the option to remove the SystemTray tool completely from fluxbox.
Mathias Gumz akira at fluxbox dot org
5 files changed,
31 insertions(+),
5 deletions(-)
M
configure.ac
→
configure.ac
@@ -265,11 +265,23 @@ AS_IF(test "x$enable_slit" = "xyes",[AC_DEFINE(USE_SLIT, 1, " compile with slit")],[])
AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") + +dnl Check for Systemtray options +AC_MSG_CHECKING([whether to include SystemTray]) +AC_ARG_ENABLE(systray, + AS_HELP_STRING([--enable-systray],[include SystemTray (default=yes)]),,[enable_systray=yes]) +AC_MSG_RESULT([$enable_systray]) +AS_IF(test "x$enable_systray" = "xyes",[AC_DEFINE(USE_SYSTRAY, 1, " compile with systemtray")],[]) +AM_CONDITIONAL(SYSTRAY_SRC, test "x$enable_systray" = "xyes") + dnl Check for Toolbar options -AC_MSG_CHECKING([whether to include Toolbar]) +AC_MSG_CHECKING([whether to include Toolbaddr]) AC_ARG_ENABLE(toolbar, AS_HELP_STRING([--enable-toolbar],[include Toolbar (default=yes)]),,[enable_toolbar=yes]) AC_MSG_RESULT([$enable_toolbar]) +AS_IF(test "x$enable_systray" = "xyes" -a "x$enable_toolbar" != "xyes",[ + AC_MSG_RESULT([disabled toolbar, but enabled systray => reenable toolbar]) + AS_VAR_SET(enable_toolbar, "yes")],[]) AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[]) AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes")
M
src/Makefile.am
→
src/Makefile.am
@@ -106,11 +106,14 @@ ClockTool.hh ClockTool.cc \
WorkspaceNameTool.hh WorkspaceNameTool.cc WorkspaceNameTheme.hh \ IconbarTool.hh IconbarTool.cc \ ToolTheme.hh ToolTheme.cc \ - SystemTray.hh SystemTray.cc \ GenericTool.hh GenericTool.cc \ ButtonTool.hh ButtonTool.cc ButtonTheme.hh ButtonTheme.cc \ ToolFactory.hh ToolFactory.cc +if SYSTRAY_SRC +TOOLBAR_SOURCE += SystemTray.hh SystemTray.cc endif +endif + if SLIT_SRC SLIT_SOURCE = Slit.cc Slit.hh SlitTheme.hh SlitTheme.cc SlitClient.hh SlitClient.cc@@ -174,5 +177,4 @@ ${REMEMBER_SOURCE} \
${SLIT_SOURCE} \ ${TOOLBAR_SOURCE} - -LDADD=FbTk/libFbTk.a FbTk/LogicCommands.o defaults.$(OBJEXT) +LDADD=FbTk/libFbTk.a defaults.$(OBJEXT)
M
src/Screen.cc
→
src/Screen.cc
@@ -55,7 +55,9 @@ #include "AtomHandler.hh"
#include "HeadArea.hh" #include "RectangleUtil.hh" #include "FbCommands.hh" +#ifdef USE_SYSTRAY #include "SystemTray.hh" +#endif #include "Debug.hh" #include "FbTk/I18n.hh"@@ -1212,7 +1214,7 @@ FbTk::EventHandler *evh = 0;
FbTk::EventManager *evm = FbTk::EventManager::instance(); AtomHandler* handler = 0; -#if USE_TOOLBAR +#if USE_SYSTRAY handler = Fluxbox::instance()->getAtomHandler(SystemTray::getNetSystemTrayAtom(screenNumber())); #endif if (handler == 0) {
M
src/ToolFactory.cc
→
src/ToolFactory.cc
@@ -24,7 +24,9 @@
// Tools #include "ButtonTool.hh" #include "ClockTool.hh" +#ifdef USE_SYSTRAY #include "SystemTray.hh" +#endif #include "IconbarTool.hh" #include "WorkspaceNameTool.hh" #include "ArrowButton.hh"@@ -87,7 +89,9 @@ item = witem;
} else if (name == "iconbar") { item = new IconbarTool(parent, m_iconbar_theme, m_focused_iconbar_theme, m_unfocused_iconbar_theme, screen(), tbar.menu()); } else if (name == "systemtray") { +#ifdef USE_SYSTRAY item = new SystemTray(parent, dynamic_cast<ButtonTheme &>(*m_systray_theme), screen()); +#endif } else if (name == "clock") { item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu()); } else {
M
src/main.cc
→
src/main.cc
@@ -187,6 +187,12 @@ NOT <<
#endif // SLIT "SLIT" << endl << +#ifndef USE_SYSTRAY + NOT << +#endif + "SYSTEMTRAY" << endl << + + #ifndef USE_TOOLBAR NOT << #endif // USE_TOOLBAR