Enable notifications with cmake.
This commit is contained in:
parent
cc9b60941d
commit
243ee4ff51
3 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue