all repos — tint2 @ abeb6d384d84500afab1cab7ed055fdb9553eb45

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

*add* include svn revision in the VERSION_STRING if building with cmake


git-svn-id: http://tint2.googlecode.com/svn/trunk@475 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
Andreas.Fink85 Andreas.Fink85@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

abeb6d384d84500afab1cab7ed055fdb9553eb45

parent

f8889fdbe00075ded0536f1a9dfc3985d29eeeb4

5 files changed, 41 insertions(+), 5 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -16,7 +16,8 @@ if( NOT IMLIB_BUILD_WITH_X )

message( FATAL_ERROR "Imlib is not build with x support" ) endif( NOT IMLIB_BUILD_WITH_X ) -include_directories( src +include_directories( ${PROJECT_BINARY_DIR} + src src/battery src/clock src/systray

@@ -55,7 +56,9 @@ add_definitions( -DENABLE_BATTERY )

endif( ENABLE_BATTERY ) if( ENABLE_TINT2CONF ) + add_definitions( -DBUILD_CMAKE ) add_subdirectory( src/tint2conf ) + add_dependencies( tint2conf version ) endif( ENABLE_TINT2CONF )

@@ -63,6 +66,8 @@ set( MANDIR ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "Directory for man pages" )

set( DATADIR ${CMAKE_INSTALL_PREFIX}/share CACHE PATH "Directory for shared data" ) set( SYSCONFDIR /etc CACHE PATH "Directory for configuration files" ) set( DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc/tint2 CACHE PATH "Directory for documentation files" ) + +add_custom_target( version ALL "${PROJECT_SOURCE_DIR}/get_svnrev.sh" "\"${PROJECT_SOURCE_DIR}\"" ) add_executable(tint2 ${SOURCES}) link_directories( ${X11_LIBRARY_DIRS}

@@ -82,6 +87,7 @@ ${GOBJECT2_LIBRARIES}

${IMLIB2_LIBRARIES} rt ) +add_dependencies(tint2 version) set_target_properties(tint2 PROPERTIES COMPILE_FLAGS -Wall) set_target_properties(tint2 PROPERTIES LINK_FLAGS -Wl,--as-needed)
A get_svnrev.sh

@@ -0,0 +1,28 @@

+#!/bin/bash + +FALLBACK="0.10-svn" + +if [[ $# -eq 0 ]]; then + DIR=. +else + DIR=$1 +fi + +if [[ -f version.h ]]; then + REV_OLD=$(cat version.h | cut -d" " -f3) +else + REV_OLD="" +fi + +if [[ -x "$(which svnversion 2>/dev/null)" && -d "${DIR}/.svn" ]] ; then + REV=\"$(svnversion -n ${DIR})\" +else + REV=${FALLBACK} +fi + +if [[ ${REV_OLD} != ${REV} ]]; then + echo "Building new version.h" + echo "#define VERSION_STRING "${REV}"" > version.h +fi + +
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -436,7 +436,6 @@ e.xclient.data.l[4] = 0;

XSendEvent(server.dsp, id, False, 0xFFFFFF, &e); } - printf("Adding systray with window: %d\n", id); traywin = g_new0(TrayWindow, 1); traywin->id = parent_window; traywin->tray_id = id;

@@ -477,7 +476,6 @@ void remove_icon(TrayWindow *traywin)

{ XErrorHandler old; - printf("Removing systray with window: %d\n", traywin->tray_id); // remove from our list systray.list_icons = g_slist_remove(systray.list_icons, traywin); systray.area.resize = 1;
M src/tint.csrc/tint.c

@@ -31,7 +31,7 @@ #include <X11/extensions/Xdamage.h>

#include <Imlib2.h> #include <signal.h> -#include "version.h" +#include <version.h> #include "server.h" #include "window.h" #include "config.h"
M src/tint2conf/main.csrc/tint2conf/main.c

@@ -28,7 +28,11 @@ #include <glib.h>

#include <glib/gstdio.h> #include <glib/gi18n.h> -#include "../version.h" +#ifdef BUILD_CMAKE + #include "version.h" +#else + #include "../version.h" +#endif #include "common.h" #include "theme_view.h"