Enable notifications with cmake.

This commit is contained in:
Mark de Wever 2009-08-10 17:50:37 +00:00
parent cc9b60941d
commit 243ee4ff51
3 changed files with 13 additions and 0 deletions

View file

@ -88,6 +88,10 @@ if(NOT MSVC)
option(ENABLE_POT_UPDATE_TARGET "Enables the tools to update the pot files and manuals. This target has extra dependencies." OFF)
endif(NOT MSVC)
if(UNIX AND NOT APPLE AND NOT CYGWIN)
option(ENABLE_NOTIFICATIONS "Enable Window manager notification messages" OFF)
endif(UNIX AND NOT APPLE AND NOT CYGWIN)
set(BINARY_SUFFIX "" CACHE STRING "Suffix behind all binaries")
set(BINARY_PREFIX "" CACHE STRING "Prefix in front of all binaries")
@ -199,6 +203,11 @@ if(ENABLE_GAME)
message("Could not find FriBiDi. Disabling FriBiDi support.")
endif()
if(ENABLE_NOTIFICATIONS)
pkg_check_modules(LIBDBUS REQUIRED dbus-1)
add_definitions(-DHAVE_LIBDBUS)
endif(ENABLE_NOTIFICATIONS)
endif(ENABLE_GAME)
# get languages

View file

@ -10,6 +10,7 @@ include_directories( ${SDL_INCLUDE_DIR} )
include_directories( ${PANGOCAIRO_INCLUDE_DIRS} )
include_directories( ${FONTCONFIG_INCLUDE_DIRS} )
include_directories( ${GETTEXT_INCLUDE_DIR} )
include_directories( ${LIBDBUS_INCLUDE_DIRS} )
#optional dependencies
if(SDLIMAGE_INCLUDE_DIR)
@ -58,6 +59,7 @@ set( game-external-libs
${PANGOCAIRO_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${LUA_LIBRARIES}
${LIBDBUS_LIBRARIES}
)
set( server-external-libs

View file

@ -217,6 +217,8 @@ void tscrollbar_::recalculate()
assert(available_length > 0);
std::cerr << "LB " << item_count_ << ' ' << visible_items_ << '\n';
// All visible.
if(item_count_ <= visible_items_) {
positioner_offset_ = offset_before();