aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2013-01-10 11:11:24 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2013-01-10 11:11:24 (GMT)
commit06655f6d7ff2af0626d37f083b927af2af1be529 (patch)
tree484f8d0ab80e642b2b2a3bef02b6a045903e564e
parent79fe2fca1de5140f538e68f6981b27cf7f917e7a (diff)
downloadfluxbox-06655f6d7ff2af0626d37f083b927af2af1be529.zip
fluxbox-06655f6d7ff2af0626d37f083b927af2af1be529.tar.bz2
Optional removal of SystemTray tool
Added the option to remove the SystemTray tool completely from fluxbox.
-rw-r--r--configure.ac14
-rw-r--r--src/Makefile.am8
-rw-r--r--src/Screen.cc4
-rw-r--r--src/ToolFactory.cc4
-rw-r--r--src/main.cc6
5 files changed, 31 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 226510d..cd6816f 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"
265AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") 265AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes")
266 266
267 267
268
269dnl Check for Systemtray options
270AC_MSG_CHECKING([whether to include SystemTray])
271AC_ARG_ENABLE(systray,
272 AS_HELP_STRING([--enable-systray],[include SystemTray (default=yes)]),,[enable_systray=yes])
273AC_MSG_RESULT([$enable_systray])
274AS_IF(test "x$enable_systray" = "xyes",[AC_DEFINE(USE_SYSTRAY, 1, " compile with systemtray")],[])
275AM_CONDITIONAL(SYSTRAY_SRC, test "x$enable_systray" = "xyes")
276
268dnl Check for Toolbar options 277dnl Check for Toolbar options
269AC_MSG_CHECKING([whether to include Toolbar]) 278AC_MSG_CHECKING([whether to include Toolbaddr])
270AC_ARG_ENABLE(toolbar, 279AC_ARG_ENABLE(toolbar,
271 AS_HELP_STRING([--enable-toolbar],[include Toolbar (default=yes)]),,[enable_toolbar=yes]) 280 AS_HELP_STRING([--enable-toolbar],[include Toolbar (default=yes)]),,[enable_toolbar=yes])
272AC_MSG_RESULT([$enable_toolbar]) 281AC_MSG_RESULT([$enable_toolbar])
282AS_IF(test "x$enable_systray" = "xyes" -a "x$enable_toolbar" != "xyes",[
283 AC_MSG_RESULT([disabled toolbar, but enabled systray => reenable toolbar])
284 AS_VAR_SET(enable_toolbar, "yes")],[])
273AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[]) 285AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[])
274AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes") 286AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes")
275 287
diff --git a/src/Makefile.am b/src/Makefile.am
index 235193d..257bdbb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -106,11 +106,14 @@ TOOLBAR_SOURCE = Toolbar.hh Toolbar.cc \
106 WorkspaceNameTool.hh WorkspaceNameTool.cc WorkspaceNameTheme.hh \ 106 WorkspaceNameTool.hh WorkspaceNameTool.cc WorkspaceNameTheme.hh \
107 IconbarTool.hh IconbarTool.cc \ 107 IconbarTool.hh IconbarTool.cc \
108 ToolTheme.hh ToolTheme.cc \ 108 ToolTheme.hh ToolTheme.cc \
109 SystemTray.hh SystemTray.cc \
110 GenericTool.hh GenericTool.cc \ 109 GenericTool.hh GenericTool.cc \
111 ButtonTool.hh ButtonTool.cc ButtonTheme.hh ButtonTheme.cc \ 110 ButtonTool.hh ButtonTool.cc ButtonTheme.hh ButtonTheme.cc \
112 ToolFactory.hh ToolFactory.cc 111 ToolFactory.hh ToolFactory.cc
112if SYSTRAY_SRC
113TOOLBAR_SOURCE += SystemTray.hh SystemTray.cc
113endif 114endif
115endif
116
114 117
115if SLIT_SRC 118if SLIT_SRC
116SLIT_SOURCE = Slit.cc Slit.hh SlitTheme.hh SlitTheme.cc SlitClient.hh SlitClient.cc 119SLIT_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 \
174 ${SLIT_SOURCE} \ 177 ${SLIT_SOURCE} \
175 ${TOOLBAR_SOURCE} 178 ${TOOLBAR_SOURCE}
176 179
177 180LDADD=FbTk/libFbTk.a defaults.$(OBJEXT)
178LDADD=FbTk/libFbTk.a FbTk/LogicCommands.o defaults.$(OBJEXT)
diff --git a/src/Screen.cc b/src/Screen.cc
index 7992a19..637bd82 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -55,7 +55,9 @@
55#include "HeadArea.hh" 55#include "HeadArea.hh"
56#include "RectangleUtil.hh" 56#include "RectangleUtil.hh"
57#include "FbCommands.hh" 57#include "FbCommands.hh"
58#ifdef USE_SYSTRAY
58#include "SystemTray.hh" 59#include "SystemTray.hh"
60#endif
59#include "Debug.hh" 61#include "Debug.hh"
60 62
61#include "FbTk/I18n.hh" 63#include "FbTk/I18n.hh"
@@ -1212,7 +1214,7 @@ bool BScreen::addKdeDockapp(Window client) {
1212 FbTk::EventManager *evm = FbTk::EventManager::instance(); 1214 FbTk::EventManager *evm = FbTk::EventManager::instance();
1213 1215
1214 AtomHandler* handler = 0; 1216 AtomHandler* handler = 0;
1215#if USE_TOOLBAR 1217#if USE_SYSTRAY
1216 handler = Fluxbox::instance()->getAtomHandler(SystemTray::getNetSystemTrayAtom(screenNumber())); 1218 handler = Fluxbox::instance()->getAtomHandler(SystemTray::getNetSystemTrayAtom(screenNumber()));
1217#endif 1219#endif
1218 if (handler == 0) { 1220 if (handler == 0) {
diff --git a/src/ToolFactory.cc b/src/ToolFactory.cc
index ee4666e..5da2777 100644
--- a/src/ToolFactory.cc
+++ b/src/ToolFactory.cc
@@ -24,7 +24,9 @@
24// Tools 24// Tools
25#include "ButtonTool.hh" 25#include "ButtonTool.hh"
26#include "ClockTool.hh" 26#include "ClockTool.hh"
27#ifdef USE_SYSTRAY
27#include "SystemTray.hh" 28#include "SystemTray.hh"
29#endif
28#include "IconbarTool.hh" 30#include "IconbarTool.hh"
29#include "WorkspaceNameTool.hh" 31#include "WorkspaceNameTool.hh"
30#include "ArrowButton.hh" 32#include "ArrowButton.hh"
@@ -87,7 +89,9 @@ ToolbarItem *ToolFactory::create(const std::string &name, const FbTk::FbWindow &
87 } else if (name == "iconbar") { 89 } else if (name == "iconbar") {
88 item = new IconbarTool(parent, m_iconbar_theme, m_focused_iconbar_theme, m_unfocused_iconbar_theme, screen(), tbar.menu()); 90 item = new IconbarTool(parent, m_iconbar_theme, m_focused_iconbar_theme, m_unfocused_iconbar_theme, screen(), tbar.menu());
89 } else if (name == "systemtray") { 91 } else if (name == "systemtray") {
92#ifdef USE_SYSTRAY
90 item = new SystemTray(parent, dynamic_cast<ButtonTheme &>(*m_systray_theme), screen()); 93 item = new SystemTray(parent, dynamic_cast<ButtonTheme &>(*m_systray_theme), screen());
94#endif
91 } else if (name == "clock") { 95 } else if (name == "clock") {
92 item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu()); 96 item = new ClockTool(parent, m_clock_theme, screen(), tbar.menu());
93 } else { 97 } else {
diff --git a/src/main.cc b/src/main.cc
index 74a3373..a8d4608 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -187,6 +187,12 @@ static void showInfo(ostream &ostr) {
187#endif // SLIT 187#endif // SLIT
188 "SLIT" << endl << 188 "SLIT" << endl <<
189 189
190#ifndef USE_SYSTRAY
191 NOT <<
192#endif
193 "SYSTEMTRAY" << endl <<
194
195
190#ifndef USE_TOOLBAR 196#ifndef USE_TOOLBAR
191 NOT << 197 NOT <<
192#endif // USE_TOOLBAR 198#endif // USE_TOOLBAR