diff --git a/configure.ac b/configure.ac index 226510d1..cd6816f9 100644 --- a/configure.ac +++ b/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") diff --git a/src/Makefile.am b/src/Makefile.am index 235193dc..257bdbbb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -106,11 +106,14 @@ TOOLBAR_SOURCE = Toolbar.hh Toolbar.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 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ ${SLIT_SOURCE} \ ${TOOLBAR_SOURCE} - -LDADD=FbTk/libFbTk.a FbTk/LogicCommands.o defaults.$(OBJEXT) +LDADD=FbTk/libFbTk.a defaults.$(OBJEXT) diff --git a/src/Screen.cc b/src/Screen.cc index 7992a193..637bd829 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -55,7 +55,9 @@ #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 @@ bool BScreen::addKdeDockapp(Window client) { 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) { diff --git a/src/ToolFactory.cc b/src/ToolFactory.cc index ee4666ec..5da2777c 100644 --- a/src/ToolFactory.cc +++ b/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 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow & } 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(*m_systray_theme), screen()); +#endif } else if (name == "clock") { item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu()); } else { diff --git a/src/main.cc b/src/main.cc index 74a3373b..a8d4608e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -187,6 +187,12 @@ static void showInfo(ostream &ostr) { #endif // SLIT "SLIT" << endl << +#ifndef USE_SYSTRAY + NOT << +#endif + "SYSTEMTRAY" << endl << + + #ifndef USE_TOOLBAR NOT << #endif // USE_TOOLBAR