From 2a08e33735bea68dd0232d0f00775768069bbf12 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 25 Jun 2003 13:07:34 +0000 Subject: compile time option for toolbar --- configure.in | 22 ++++++++++++++++++++-- src/Makefile.am | 9 ++++----- src/fluxbox.cc | 19 +++++++------------ 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/configure.in b/configure.in index df9e325..49a0d6e 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ dnl configure.in for Fluxbox - created from configure.in Blackbox 0.61.1 dnl Initialize autoconf and automake AC_INIT(src/main.cc) AC_PREREQ(2.52) -AM_INIT_AUTOMAKE(fluxbox,0.9.3,no-define) +AM_INIT_AUTOMAKE(fluxbox,cvs-2003-06-25,no-define) dnl Determine default prefix test x$prefix = "xNONE" && prefix="$ac_default_prefix" @@ -142,10 +142,28 @@ AC_ARG_ENABLE( ) AM_CONDITIONAL(REMEMBER_SRC, test x$REMEMBER_SRC = xtrue) +dnl Check for Toolbar options +AC_MSG_CHECKING([whether to include Toolbar]) +AC_ARG_ENABLE( + toolbar, [ --enable-toolbar include code for Toolbar [default=yes]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar") + TOOLBAR_SRC=true + else + AC_MSG_RESULT([no]) + TOOLBAR_SRC=false + fi, + AC_MSG_RESULT([yes]) + AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar") + TOOLBAR_SRC=true +) +AM_CONDITIONAL(TOOLBAR_SRC, test x$TOOLBAR_SRC = xtrue) + AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) AC_ARG_ENABLE( regexp, -[ --enable-regexp regular expression support [default=yes]], +[ --enable-regexp regular expression support [default=yes]], if test x$enableval = "xyes"; then AC_EGREP_HEADER([regex_t],regex.h, AC_DEFINE(USE_REGEXP, 1, "Regular Expression support") diff --git a/src/Makefile.am b/src/Makefile.am index bc4377d..4781bd8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,6 +53,9 @@ if REGEXP_SRC REGEXP_SOURCE = RegExp.hh RegExp.cc ClientPattern.hh ClientPattern.cc endif endif +if TOOLBAR_SRC +TOOLBAR_SOURCE = Toolbar.hh Toolbar.cc ToolbarHandler.hh ToolbarHandler.cc ToolbarTheme.hh ToolbarTheme.cc IconBar.hh IconBar.cc +endif fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ BoolMenuItem.hh \ @@ -60,7 +63,6 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ FbAtoms.hh FbAtoms.cc FbWinFrame.hh FbWinFrame.cc \ FbWinFrameTheme.hh FbWinFrameTheme.cc \ fluxbox.cc fluxbox.hh ${gnome_SOURCE} \ - IconBar.cc IconBar.hh \ I18n.cc I18n.hh \ Keys.cc Keys.hh main.cc \ Netizen.cc Netizen.hh \ @@ -69,9 +71,6 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ Screen.cc Screen.hh \ Slit.cc Slit.hh SlitTheme.hh SlitClient.hh SlitClient.cc \ TextButton.hh TextButton.cc \ - Toolbar.cc Toolbar.hh \ - ToolbarHandler.cc ToolbarHandler.hh \ - ToolbarTheme.hh ToolbarTheme.cc \ WinButton.hh WinButton.cc \ WinButtonTheme.hh WinButtonTheme.cc \ Window.cc Window.hh \ @@ -82,7 +81,7 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ Strut.hh \ Xinerama.hh \ Xutil.hh Xutil.cc \ - ${REMEMBER_SOURCE} ${REGEXP_SOURCE} + ${REMEMBER_SOURCE} ${REGEXP_SOURCE} ${TOOLBAR_SOURCE} LDADD=FbTk/libFbTk.a diff --git a/src/fluxbox.cc b/src/fluxbox.cc index d2cfe8d..b4c056f 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,13 +22,12 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.163 2003/06/25 06:02:53 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.164 2003/06/25 13:06:04 fluxgen Exp $ #include "fluxbox.hh" #include "I18n.hh" #include "Screen.hh" -#include "Toolbar.hh" #include "Window.hh" #include "Workspace.hh" #include "StringUtil.hh" @@ -41,7 +40,6 @@ #include "WinClient.hh" #include "Keys.hh" #include "FbAtoms.hh" -#include "ToolbarHandler.hh" //Use GNU extensions #ifndef _GNU_SOURCE @@ -64,6 +62,10 @@ #ifdef REMEMBER #include "Remember.hh" #endif // REMEMBER +#ifdef USE_TOOLBAR +#include "Toolbar.hh" +#include "ToolbarHandler.hh" +#endif // USE_TOOLBAR // X headers #include @@ -524,7 +526,9 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile #endif // HAVE_RANDR m_screen_list.push_back(screen); +#ifdef USE_TOOLBAR m_atomhandler.push_back(new ToolbarHandler(*screen)); +#endif // USE_TOOLBAR // attach screen signals to this screen->currentWorkspaceSig().attach(this); @@ -1808,15 +1812,6 @@ void Fluxbox::save_rc() { BScreen *screen = *it; int screen_number = screen->screenNumber(); - /* -#ifdef SLIT - #ifdef XINERAMA - sprintf(rc_string, "session.screen%d.slit.onHead: %d", screen_number, - screen->getSlitOnHead()); - XrmPutLineResource(&new_blackboxrc, rc_string); - #endif // XINERAMA -#endif // SLIT - */ sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? "LeftToRight" : "RightToLeft")); -- cgit v0.11.2