grim/guifications2

Parents e34f4e2dcb6e08e042ef7587
Children
flow: Merged 'autotools_mingw_cleanup' to ('develop').
--- a/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-EXTRA_DIST = \
- AUTHORS \
- ChangeLog \
- ChangeLog.l18n \
- COPYING \
- gf_config.h.mingw \
- pidgin-guifications.spec \
- guifications-installer.nsi \
- INSTALL \
- INSTALL.WIN32 \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- Makefile.mingw \
- NEWS \
- README \
- VERSION \
- VERSION.in \
- po/AUTHORS \
- po/Makefile.mingw
-
-DISTCLEANFILES = \
- gf_config.h \
- intltool-extract \
- intltool-update \
- intltool-merge
-
-if INSTALL_I18N
-PO_DIR=po
-endif
-
-SUBDIRS = doc nsis pixmaps $(PO_DIR) src themes
-
-BUILT_SOURCES = gf_config.h
-
-$(OBJECTS): $(BUILT_SOURCES)
-
-signatures: dist
- echo $(DIST_ARCHIVES) | xargs -n 1 gpg -a -b
-
-gf_config.h: pre_config.h
- cp -f po/Makefile po/.tmp-Makefile
- sed -e "s#localedir = .*#localedir = $(PIDGIN_DATADIR)/locale#g" < po/.tmp-Makefile > po/Makefile
- rm -f po/.tmp-Makefile
- $(sedpath) 's/\#define PACKAGE/\#define GF_PACKAGE/g' pre_config.h > $@
-
--- a/Makefile.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Makefile.mingw
-#
-# Description: Makefile for win32 (mingw) guifications 2
-#
-
-#
-# PATHS
-#
-
-GF_SRC := ./src
-GF_PIXMAPS := ./pixmaps
-GF_THEMES := ./themes
-GF_PO := ./po
-
-GF_TOP := .
--include $(GF_TOP)/local.mak
-
-PIDGIN_TREE_TOP ?= ../../..
-include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
-
-##
-## VARIABLE DEFINITIONS
-##
-
-GF_VERSION := $(shell cat ./VERSION)
-
-PIDGIN_VERSION := $(shell cat $(PIDGIN_TREE_TOP)/VERSION)
-
-.PHONY: all install installer clean
-
-all:
- $(MAKE) -C $(GF_SRC) -f Makefile.mingw
- $(MAKE) -C $(GF_PO) -f Makefile.mingw
-
-gf_config.h: gf_config.h.mingw
- cp gf_config.h.mingw gf_config.h
-
-install: all
- $(MAKE) -C $(GF_PIXMAPS) -f Makefile.mingw install
- $(MAKE) -C $(GF_THEMES) -f Makefile.mingw install
- $(MAKE) -C $(GF_SRC) -f Makefile.mingw install
- $(MAKE) -C $(GF_PO) -f Makefile.mingw install
-
-installer: all
- $(MAKENSIS) -DGUIFICATIONS_VERSION="$(GF_VERSION)" -DPIDGIN_VERSION="$(PIDGIN_VERSION)" -DPIDGIN_TREE_TOP="$(PIDGIN_TREE_TOP)" guifications-installer.nsi
-
-clean:
- $(MAKE) -C $(GF_SRC) -f Makefile.mingw clean
- rm -f gf_config.h guifications-*.exe
--- a/autogen.sh Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-#! /bin/sh
-# Guifications - The end-all, be-all notification framework
-# Copyright (C) 2003-2007 Gary Kramlich <grim@reaperworld.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-###############################################################################
-# Usage
-###############################################################################
-# This script uses a config file that can be used to stash common arguments
-# passed to configure or environment variables that need to be set before
-# configure is called. The configuration file is a simple shell script that
-# gets sourced.
-#
-# By default, the config file that is used is named 'autogen.args'. This can
-# be configured below.
-#
-# Available options that are handled are as follow:
-# ACLOCAL_FLAGS - command line arguments to pass to aclocal
-# AUTOCONF_FLAGS - command line arguments to pass to autoconf
-# AUTOHEADER_FLAGS - command line arguments to pass to autoheader
-# AUTOMAKE_FLAGS - command line arguments to pass to automake flags
-# CONFIGURE_FLAGS - command line arguments to pass to configure
-# INTLTOOLIZE_FLAGS - command line arguments to pass to intltoolize
-# LIBTOOLIZE_FLAGS - command line arguments to pass to libtoolize
-#
-# Other helpfull notes:
-# If you're using a different c compiler, you can override the environment
-# variable in 'autogen.args'. For example, say you're using distcc, just add
-# the following to 'autogen.args':
-#
-# CC="distcc"
-#
-# This will work for any influential environment variable to configure.
-###############################################################################
-PACKAGE="Guifications"
-ARGS_FILE="autogen.args"
-
-set -e
-
-###############################################################################
-# Some helper functions
-###############################################################################
-check () {
- CMD=$1
-
- printf "checking for ${CMD}... "
- BIN=`which ${CMD}`
-
- if [ x"${BIN}" = x"" ] ; then
- printf "not found.\n"
- printf "${CMD} is required to build ${PACKAGE}!\n"
- exit 1;
- fi
-
- echo "${BIN}"
-}
-
-run_or_die () { # beotch
- CMD=$1
- shift
-
- OUTPUT=`mktemp autogen-XXXXXX`
-
- ARGS="${@}"
- if [ x"${ARGS}" != x"" ] ; then
- ARGS=" ${ARGS}"
- fi
-
- printf "running '${CMD}${ARGS}' ... "
- ${CMD} ${@} >${OUTPUT} 2>&1
-
- if [ $? != 0 ] ; then
- echo "failed."
- cat ${OUTPUT}
- rm -f ${OUTPUT}
- exit 1
- else
- echo "done."
- cat ${OUTPUT}
- rm -f ${OUTPUT}
- fi
-}
-
-cleanup () {
- rm -f autogen-??????
- echo
- exit 2
-}
-
-###############################################################################
-# We really start here, yes, very sneaky!
-###############################################################################
-trap cleanup 2
-
-FIGLET=`which figlet`
-if [ x"${FIGLET}" != x"" ] ; then
- ${FIGLET} -f small ${PACKAGE}
- echo "build system is being generated"
-else
- echo "autogenerating build system for '${PACKAGE}'"
-fi
-
-###############################################################################
-# Look for our args file
-###############################################################################
-printf "checking for ${ARGS_FILE}: "
-if [ -f ${ARGS_FILE} ] ; then
- printf "found.\n"
- printf "sourcing ${ARGS_FILE}: "
- . "`dirname "$0"`"/${ARGS_FILE}
- printf "done.\n"
-else
- printf "not found.\n"
-fi
-
-###############################################################################
-# Check for our required helpers
-###############################################################################
-check "libtoolize"; LIBTOOLIZE=${BIN};
-check "intltoolize"; INTLTOOLIZE=${BIN};
-check "aclocal"; ACLOCAL=${BIN};
-check "autoheader"; AUTOHEADER=${BIN};
-check "automake"; AUTOMAKE=${BIN};
-check "autoconf"; AUTOCONF=${BIN};
-
-###############################################################################
-# Run all of our helpers
-###############################################################################
-run_or_die ${LIBTOOLIZE} -c -f --automake ${LIBTOOLIZE_FLAGS}
-run_or_die ${INTLTOOLIZE} -c -f --automake ${INTLTOOLIZE_FLAGS}
-run_or_die ${ACLOCAL} ${ACLOCAL_FLAGS}
-run_or_die ${AUTOHEADER} ${AUTOHEADER_FLAGS}
-run_or_die ${AUTOMAKE} -a -c -f --gnu ${AUTOMAKE_FLAGS}
-run_or_die ${AUTOCONF} -f ${AUTOCONF_FLAGS}
-
-###############################################################################
-# Run configure
-###############################################################################
-echo "running ./configure ${CONFIGURE_FLAGS} $@"
-./configure ${CONFIGURE_FLAGS} $@
-
-exit 0
-
--- a/configure.ac Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-AC_INIT([pidgin-guifications], [2.17dev], [guifications-devel@lists.guifications.org])
-AC_CANONICAL_SYSTEM
-AM_CONFIG_HEADER(pre_config.h)
-
-AM_INIT_AUTOMAKE([1.11 gnu dist-bzip2 dist-zip dist-xz])
-AM_SILENT_RULES([yes])
-
-AC_PREREQ([2.50])
-
-AC_PATH_PROG(sedpath, sed)
-AC_DISABLE_STATIC
-
-# Make sure we have pkg-config
-PKG_PROG_PKG_CONFIG()
-
-# Setup libtool
-LT_INIT
-LT_LANG([C])
-LIBTOOL="$LIBTOOL --silent"
-
-# I'm lazy and figured config.h is the best place for this ;)
-AC_DEFINE_UNQUOTED(GF_WEBSITE, "https://www.guifications.org/projects/gf2", [Guifications Website])
-
-# Our header
-AH_TOP([ /* our header */
-#ifndef _GF_CONFIG_H
-#define _GF_CONFIG_H
-])
-AH_BOTTOM([
-#endif /* _GF_CONFIG_H */
-])
-
-# Good o' gettext
-AC_PROG_INTLTOOL
-
-GETTEXT_PACKAGE=guifications
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used.])
-
-ALL_LINGUAS="bn cs de en_AU en_GB es fr gl he hu it ja mk nl no pt pt_BR ru sk sr sr@Latn sv uk zh_CN zh_TW"
-AM_GLIB_GNU_GETTEXT
-
-# Look for the C compiler
-CFLAGS_save="$CFLAGS"
-AC_PROG_CC
-CFLAGS="$CFLAGS_save"
-
-AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[compile with debugging support]),,enable_debug=no)
-AC_ARG_ENABLE(deprecated,AS_HELP_STRING([--disable-deprecated],[compile without deprecated API usage]),,enable_deprecated=yes)
-
-if test "x$enable_debug" = "xyes" ; then
- AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
-fi
-
-if test "x$enable_deprecated" = "xno"; then
- DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
-fi
-AC_SUBST(DEBUG_CFLAGS)
-
-if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -Wall -g -g3"
-fi
-AC_SUBST(CFLAGS)
-
-###############################################################################
-# Dependencies
-###############################################################################
-
-# purple
-PKG_CHECK_MODULES(PURPLE, purple-3)
-AC_SUBST(PURPLE_CFLAGS)
-AC_SUBST(PURPLE_LIBS)
-
-# pidgin
-PKG_CHECK_MODULES(PIDGIN, pidgin-3)
-AC_SUBST(PIDGIN_CFLAGS)
-AC_SUBST(PIDGIN_LIBS)
-
-# if the user has given as a prefix, we use that, otherwise we install to the
-# prefix that pidgin was installed with
-if test x"$prefix" = x"NONE" ; then
- PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
- PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
-else
- PIDGIN_LIBDIR="$libdir"
- PIDGIN_DATADIR="$datadir"
-fi
-AC_SUBST(PIDGIN_LIBDIR)
-AC_SUBST(PIDGIN_DATADIR)
-
-# glib
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.14])
-AC_SUBST(GLIB_LIBS)
-AC_SUBST(GLIB_CFLAGS)
-
-# gtk
-PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.14])
-AC_SUBST(GTK_LIBS)
-AC_SUBST(GTK_CFLAGS)
-
-# cairo
-PKG_CHECK_MODULES(CAIRO, [cairo])
-AC_SUBST(CAIRO_LIBS)
-AC_SUBST(CAIRO_CFLAGS)
-
-# freetype 2
-PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= 1.1.0,
-[
- AC_DEFINE(HAVE_PANGOFT2, 1, [Define if we have found pangoft2.])
-])
-AC_SUBST(PANGOFT2_CFLAGS)
-AC_SUBST(PANGOFT2_LIBS)
-
-# this is a hack since the win32 build doesn't use autotools
-AM_CONDITIONAL(USE_X11, true)
-AM_CONDITIONAL(USE_WIN32, false)
-
-dnl #######################################################################
-dnl # Disable installation of translation files
-dnl #######################################################################
-AC_ARG_ENABLE(nls,AS_HELP_STRING([--enable-nls],[enable installation of translation files]),enable_i18n="$enableval",enable_i18n=yes)
-
-AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
-
-#
-# Version stuff
-#
-AC_CONFIG_COMMANDS_PRE([
- if test -e VERSION; then
- cp -p VERSION VERSION.ac-save
- fi
-])
-
-AC_CONFIG_COMMANDS_POST([
- cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION
- rm -f VERSION.ac-save
-])
-
-#
-# Finish up
-#
-AC_OUTPUT([Makefile
- VERSION
- pidgin-guifications.spec
- doc/Makefile
- nsis/Makefile
- nsis/translations/Makefile
- pixmaps/Makefile
- po/Makefile.in
- src/Makefile
- src/win32/Makefile
- src/x11/Makefile
- themes/Makefile
- ])
-
-cat << EOF
-
-Configuration complete
-
-Debugging enabled..............: $enable_debug
-Deprecated API enabled.........: $enable_deprecated
-
-Type make to compile
-
-Thank you for using Guifications!
-
-EOF
--- a/doc/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXTRA_DIST = \
- flow.dia \
- flow.png \
- gf_object.dia \
- gf_object.png \
- QUOTES
--- a/gf_config.h.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +0,0 @@
-/* pre_config.h. Generated by configure. */
-/* pre_config.h.in. Generated from configure.ac by autoheader. */
-
- /* our header */
-#ifndef _GF_CONFIG_H
-#define _GF_CONFIG_H
-
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define to 1 if using `alloca.c'. */
-/* #undef C_ALLOCA */
-
-/* Define if debugging is enabled. */
-#define DEBUG 1
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#define ENABLE_NLS 1
-
-/* Guifications Website */
-#define GF_WEBSITE "http://pidgin.guifications.org"
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#define HAVE_ALLOCA_H 1
-
-/* Define to 1 if you have the <argz.h> header file. */
-#define HAVE_ARGZ_H 1
-
-/* Define to 1 if you have the `asprintf' function. */
-#define HAVE_ASPRINTF 1
-
-/* Define if the GNU dcgettext() function is already present or preinstalled.
- */
-#define HAVE_DCGETTEXT 1
-
-/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_FEOF_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FGETS_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_GETC_UNLOCKED 1
-
-/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
- don't. */
-#define HAVE_DECL__SNPRINTF 0
-
-/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
- don't. */
-#define HAVE_DECL__SNWPRINTF 0
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the `fwprintf' function. */
-#define HAVE_FWPRINTF 1
-
-/* Define if we've found pidgin. */
-#define HAVE_PIDGIN 1
-
-/* Define to 1 if you have the `getcwd' function. */
-#define HAVE_GETCWD 1
-
-/* Define to 1 if you have the `getegid' function. */
-#define HAVE_GETEGID 1
-
-/* Define to 1 if you have the `geteuid' function. */
-#define HAVE_GETEUID 1
-
-/* Define to 1 if you have the `getgid' function. */
-#define HAVE_GETGID 1
-
-/* Define to 1 if you have the `getpagesize' function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#define HAVE_GETTEXT 1
-
-/* Define to 1 if you have the `getuid' function. */
-#define HAVE_GETUID 1
-
-/* Define if you have the iconv() function. */
-#define HAVE_ICONV 1
-
-/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
-#define HAVE_INTMAX_T 1
-
-/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
- declares uintmax_t. */
-#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-/* #define HAVE_LANGINFO_CODESET 1 */
-
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#define HAVE_LC_MESSAGES 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the 'long double' type. */
-#define HAVE_LONG_DOUBLE 1
-
-/* Define if you have the 'long long' type. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mempcpy' function. */
-#define HAVE_MEMPCPY 1
-
-/* Define to 1 if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define to 1 if you have the `munmap' function. */
-#define HAVE_MUNMAP 1
-
-/* Define to 1 if you have the <nl_types.h> header file. */
-#define HAVE_NL_TYPES_H 1
-
-/* Define if we've found pangoft2. */
-#define HAVE_PANGOFT2 1
-
-/* Define if your printf() function supports format strings with positions. */
-#define HAVE_POSIX_PRINTF 1
-
-/* Define to 1 if you have the `putenv' function. */
-#define HAVE_PUTENV 1
-
-/* Define to 1 if you have the `setenv' function. */
-#define HAVE_SETENV 1
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
- uintmax_t. */
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `stpcpy' function. */
-#define HAVE_STPCPY 1
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#define HAVE_STRCASECMP 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strtoul' function. */
-#define HAVE_STRTOUL 1
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the `tsearch' function. */
-#define HAVE_TSEARCH 1
-
-/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
-#define HAVE_UINTMAX_T 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the 'unsigned long long' type. */
-#define HAVE_UNSIGNED_LONG_LONG 1
-
-/* Define if you have the 'wchar_t' type. */
-#define HAVE_WCHAR_T 1
-
-/* Define to 1 if you have the `wcslen' function. */
-#define HAVE_WCSLEN 1
-
-/* Define if you have the 'wint_t' type. */
-#define HAVE_WINT_T 1
-
-/* Define to 1 if you have the `__argz_count' function. */
-#define HAVE___ARGZ_COUNT 1
-
-/* Define to 1 if you have the `__argz_next' function. */
-#define HAVE___ARGZ_NEXT 1
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#define HAVE___ARGZ_STRINGIFY 1
-
-/* Define to 1 if you have the `__fsetlocking' function. */
-#define HAVE___FSETLOCKING 1
-
-/* Define as const if the declaration of iconv() needs const. */
-#define ICONV_CONST
-
-/* Define if integer division by zero raises signal SIGFPE. */
-#define INTDIV0_RAISES_SIGFPE 1
-
-/* Name of package */
-#define GF_PACKAGE "guifications"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define GF_PACKAGE_BUGREPORT "guifications-devel@lists.sourceforge.net"
-
-/* Define to the full name of this package. */
-#define GF_PACKAGE_NAME "guifications"
-
-/* Define to the full name and version of this package. */
-/*#define GF_PACKAGE_STRING "guifications2 2.0cvs"*/
-
-/* Define to the one symbol short name of this package. */
-/*#define GF_PACKAGE_TARNAME "guifications2"*/
-
-/* Define to the version of this package. */
-/*#define GF_PACKAGE_VERSION "2.0cvs"*/
-
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-/* #undef PRI_MACROS_BROKEN */
-
-/* Define as the maximum value of type 'size_t', if the system doesn't define
- it. */
-/* #undef SIZE_MAX */
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-/* #undef STACK_DIRECTION */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Version number of package */
-/* #define VERSION */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to `long' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define as the type of the result of subtracting two pointers, if the system
- doesn't define it. */
-/* #undef ptrdiff_t */
-
-/* Define to empty if the C compiler doesn't support this keyword. */
-/* #undef signed */
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define to unsigned long or unsigned long long if <stdint.h> and
- <inttypes.h> don't define. */
-/* #undef uintmax_t */
-
-
-#endif /* _GF_CONFIG_H */
-
--- a/nsis/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-SUBDIRS = translations
-
-EXTRA_DIST = \
- header.bmp \
- install.ico
--- a/nsis/translations/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXTRA_DIST = \
- ChangeLog \
- english.nsh \
- french.nsh \
- italian.nsh \
- spanish.nsh
--- a/pixmaps/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-conf_images = \
- item_icon_size_big.png \
- item_icon_size_huge.png \
- item_icon_size_large.png \
- item_icon_size_little.png \
- item_icon_size_normal.png \
- item_icon_size_small.png \
- item_icon_size_tiny.png \
- item_position_center.png \
- item_position_east.png \
- item_position_north_east.png \
- item_position_north.png \
- item_position_north_west.png \
- item_position_south_east.png \
- item_position_south.png \
- item_position_south_west.png \
- item_position_west.png \
- item_text_clipping_ellipsis_end.png \
- item_text_clipping_ellipsis_middle.png \
- item_text_clipping_ellipsis_start.png \
- item_text_clipping_truncate.png \
- window_position_north_east.png \
- window_position_north_west.png \
- window_position_south_east.png \
- window_position_south_west.png
-
-EXTRA_DIST = \
- defaults.xcf \
- Makefile.mingw \
- $(conf_images)
-
-guificationsconfpixdir = $(PIDGIN_DATADIR)/pixmaps/pidgin/guifications/conf
-guificationsconfpix_DATA = $(conf_images)
--- a/pixmaps/Makefile.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#
-# Makefile.mingw
-#
-# Description: Makefile for guifications pixmaps
-#
-
-GF_TOP := ..
-
--include $(GF_TOP)/local.mak
-
-PIDGIN_TREE_TOP ?= ../../../..
-include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
-
-PIDGIN_DATADIR = $(PIDGIN_INSTALL_DIR)
-include ./Makefile.am
-
-.PHONY: install
-
-install:
- if test '$(guificationsconfpix_DATA)'; then \
- mkdir -p $(guificationsconfpixdir); \
- cp $(guificationsconfpix_DATA) $(guificationsconfpixdir); \
- fi;
- if test '$(guificationsbackgroundspix_DATA)'; then \
- mkdir -p $(guificationsbackgroundspixdir); \
- cp $(guificationsbackgroundspix_DATA) $(guificationsbackgroundspixdir); \
- fi;
--- a/po/Makefile.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-# Makefile.mingw
-#
-# Description: Makefile to generate mo files
-#
-
-GF_TOP := ..
--include $(GF_TOP)/local.mak
-
-PIDGIN_TREE_TOP ?= ../../../..
-include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
-
-PACKAGE = guifications
-
-.SUFFIXES:
-.SUFFIXES: .po .gmo
-
-##
-## SOURCES, OBJECTS
-##
-
-CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po))
-
-##
-## RULES
-##
-
-.po.gmo:
- rm -f $@ && $(GMSGFMT) --statistics -o $@ $<
-
-##
-## TARGETS
-##
-
-.PHONY: all install clean
-
-all: $(CATALOGS)
-
-install: all $(PURPLE_INSTALL_PO_DIR)
- @catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed 's/\.gmo$$//'`; \
- dir=$(PURPLE_INSTALL_PO_DIR)/$$lang/LC_MESSAGES; \
- mkdir -p $$dir; \
- cp $$cat $$dir/$(PACKAGE).mo; \
- echo "installing $$cat as $$dir/$(PACKAGE).mo"; \
- done
-
-clean:
- rm -f *.gmo
-
-include $(PIDGIN_COMMON_TARGETS)
--- a/src/CMakeLists.txt Thu May 23 05:31:31 2013 -0500
+++ b/src/CMakeLists.txt Thu May 23 23:48:19 2013 -0500
@@ -48,6 +48,12 @@
guifications.c
)
+if(WIN32)
+ list(APPEND SOURCES gf_win32_display.c)
+else(WIN32)
+ list(APPEND SOURCES gf_x11_display.c)
+endif(WIN32)
+
add_library(guifications MODULE
${HEADERS}
${SOURCES}
--- a/src/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-SUBDIRS =
-DIST_SUBDIRS = win32 x11
-
-EXTRA_DIST = \
- gf_action.h \
- gf_blist.h \
- gf_display.h \
- gf_event.h \
- gf_event_info.h \
- gf_file.h \
- gf_gtk_utils.h \
- gf_internal.h \
- gf_item.h \
- gf_item_icon.h \
- gf_item_image.h \
- gf_item_offset.h \
- gf_item_text.h \
- gf_menu.h \
- gf_notification.h \
- gf_preferences.h \
- gf_stock.h \
- gf_theme.h \
- gf_theme_editor.h \
- gf_theme_info.h \
- gf_theme_ops.h \
- gf_utils.h \
- Makefile.mingw
-
-gfdir = $(PIDGIN_LIBDIR)/pidgin
-
-guifications_la_LDFLAGS = -module -avoid-version
-
-gf_LTLIBRARIES = guifications.la
-
-guifications_la_SOURCES = \
- gf_action.c \
- gf_blist.c \
- gf_display.c \
- gf_event.c \
- gf_event_info.c \
- gf_file.c \
- gf_gtk_utils.c \
- gf_item.c \
- gf_item_icon.c \
- gf_item_image.c \
- gf_item_offset.c \
- gf_item_text.c \
- gf_menu.c \
- gf_notification.c \
- gf_preferences.c \
- gf_stock.c \
- gf_theme.c \
- gf_theme_editor.c \
- gf_theme_info.c \
- gf_theme_ops.c \
- gf_utils.c \
- guifications.c
-
-guifications_la_LIBADD = \
- $(BINRELOC_LIBS) \
- $(CAIRO_LIBS) \
- $(GTK_LIBS) \
- $(GLIB_LIBS) \
- $(PANGOFT2_LIBS) \
- $(PIDGIN_LIBS) \
- $(PURPLE_LIBS)
-
-if USE_X11
-guifications_la_LIBADD += x11/libguifications-x11.la
-SUBDIRS += x11
-endif
-
-if USE_WIN32
-guifications_la_LIBADD += win32/libguifications-win32.la
-SUBDIRS += win32
-endif
-
-AM_CPPFLAGS = \
- -DVERSION=\"$(VERSION)\" \
- -DDATADIR=\"$(PIDGIN_DATADIR)\" \
- -DLOCALEDIR=\"$(PIDGIN_DATADIR)/locale\" \
- $(BINRELOC_CFLAGS) \
- $(CAIRO_CFLAGS) \
- $(DEBUG_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(PANGOFT2_CFLAGS) \
- $(PIDGIN_CFLAGS) \
- $(PURPLE_CFLAGS)
-
--- a/src/Makefile.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-#
-# Makefile.mingw
-#
-# Description: Makefile for guifications plugin.
-#
-
-#
-# PATHS
-#
-
-GF_TOP := ..
--include $(GF_TOP)/local.mak
-PIDGIN_TREE_TOP ?= ../../../..
-include $(PIDGIN_TREE_TOP)/libpurple/win32/global.mak
-
-GF_VERSION := $(shell cat ${GF_TOP}/VERSION)
-
-##
-## VARIABLE DEFINITIONS
-##
-
-GF = guifications
-
-# Compiler Options
-
-#CFLAGS =
-
-DEFINES = -DGF_VERSION=\"$(GF_VERSION)\" -DGETTEXT_PACKAGE=\"$(GF)\" -DHAVE_CONFIG_H
-
-#LDFLAGS =
-
-#-mwindows
-
-##
-## INCLUDE PATHS
-##
-
-INCLUDE_PATHS += -I. \
- -I$(PIDGIN_TREE_TOP) \
- -I$(PURPLE_TOP) \
- -I$(PURPLE_TOP)/win32 \
- -I$(PIDGIN_TOP) \
- -I$(PIDGIN_TOP)/win32 \
- -I$(GTK_TOP)/include \
- -I$(GTK_TOP)/include/gtk-2.0 \
- -I$(GTK_TOP)/include/glib-2.0 \
- -I$(GTK_TOP)/include/pango-1.0 \
- -I$(GTK_TOP)/include/atk-1.0 \
- -I$(GTK_TOP)/include/freetype2 \
- -I$(GTK_TOP)/lib/glib-2.0/include \
- -I$(GTK_TOP)/lib/gtk-2.0/include \
- -I$(PIDGIN_TREE_TOP)
-
-
-LIB_PATHS = \
- -L$(PURPLE_TOP) \
- -L$(PIDGIN_TOP) \
- -L$(GTK_TOP)/lib
-
-
-##
-## SOURCES, OBJECTS
-##
-
-GF_SRC = \
- gf_action.c \
- gf_blist.c \
- gf_display.c \
- gf_event.c \
- gf_event_info.c \
- gf_file.c \
- gf_gtk_utils.c \
- gf_item.c \
- gf_item_icon.c \
- gf_item_image.c \
- gf_item_offset.c \
- gf_item_text.c \
- gf_menu.c \
- gf_notification.c \
- gf_preferences.c \
- gf_stock.c \
- gf_theme.c \
- gf_theme_editor.c \
- gf_theme_info.c \
- gf_theme_ops.c \
- gf_utils.c \
- guifications.c
-
-
-GF_OBJ = $(GF_SRC:%.c=%.o)
-
-##
-## LIBRARIES
-##
-
-PLUGIN_LIBS = \
- -lgtk-win32-2.0 \
- -lglib-2.0 \
- -lpango-1.0 \
- -lpangoft2-1.0 \
- -lgdk-win32-2.0 \
- -lgdk_pixbuf-2.0 \
- -lgobject-2.0 \
- -lws2_32 \
- -lintl \
- -lpurple \
- -lpidgin
-
-include $(PIDGIN_COMMON_RULES)
-
-##
-## TARGET DEFINITIONS
-##
-
-.PHONY: all clean install
-
-all: $(GF).dll
-
-install: all $(PIDGIN_INSTALL_PLUGINS_DIR)
- cp $(GF).dll $(PIDGIN_INSTALL_PLUGINS_DIR)
-
-$(GF_OBJ): $(GF_TOP)/gf_config.h $(PURPLE_VERSION_H)
-
-$(GF_TOP)/gf_config.h: $(GF_TOP)/gf_config.h.mingw
- $(MAKE) -C $(GF_TOP) -f Makefile.mingw gf_config.h
-
-##
-## BUILD DLL
-##
-
-$(GF).dll: $(PIDGIN_DLL).a $(GF_OBJ)
- $(CC) -shared $(GF_OBJ) $(LIB_PATHS) $(PLUGIN_LIBS) $(DLL_LD_FLAGS) -o $(GF).dll
-
-
-##
-## CLEAN RULES
-##
-
-clean:
- rm -f *.o
- rm -f $(GF).dll
-
-include $(PIDGIN_COMMON_TARGETS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gf_win32_display.c Thu May 23 23:48:19 2013 -0500
@@ -0,0 +1,159 @@
+/*
+ * Guifications - The end all, be all, toaster popup plugin
+ * Copyright (C) 2003-2011 Gary Kramlich
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
+ */
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
+#ifndef WINVER
+# define WINVER 0x0500 /* This is Windows 2000 */
+#endif /* WINVER */
+
+#include <windows.h>
+typedef HMONITOR WINAPI GF_MonitorFromRect(LPCRECT,DWORD);
+typedef BOOL WINAPI GF_GetMonitorInfo(HMONITOR,LPMONITORINFO);
+
+/*******************************************************************************
+ * Uses _NET_WORKAREA or SPI_GETWORKAREA to get the geometry of a screen
+ ******************************************************************************/
+static gboolean
+win32_get_workarea_fallback(GdkRectangle *rect) {
+ RECT rcWork;
+ if (SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWork, FALSE)) {
+ rect->x = rcWork.left;
+ rect->y = rcWork.top;
+ rect->width = rcWork.right - rcWork.left;
+ rect->height = rcWork.bottom - rcWork.top;
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/**
+ * This will only work on Win98+ and Win2K+
+ */
+static gboolean
+win32_adjust_workarea_multi_monitor(GdkRectangle *rect) {
+ GF_GetMonitorInfo *the_GetMonitorInfo;
+ GF_MonitorFromRect *the_MonitorFromRect;
+ HMODULE hmod;
+ HMONITOR monitor;
+ MONITORINFO info;
+ RECT monitorRect;
+ gint virtual_screen_x, virtual_screen_y;
+
+ monitorRect.left = rect->x;
+ monitorRect.right = rect->x + rect->width;
+ monitorRect.top = rect->y;
+ monitorRect.bottom = rect->y + rect->height;
+
+ /* Convert the coordinates so that 0, 0 is the top left of the Primary
+ * Monitor, not the top left of the virtual screen
+ */
+ virtual_screen_x = GetSystemMetrics(SM_XVIRTUALSCREEN);
+ virtual_screen_y = GetSystemMetrics(SM_YVIRTUALSCREEN);
+
+ if (virtual_screen_x != 0) {
+ monitorRect.left += virtual_screen_x;
+ monitorRect.right += virtual_screen_x;
+ }
+
+ if (virtual_screen_y != 0) {
+ monitorRect.top += virtual_screen_y;
+ monitorRect.bottom += virtual_screen_y;
+ }
+
+ if (!(hmod = GetModuleHandle("user32"))) {
+ return FALSE;
+ }
+
+ if (!(the_MonitorFromRect = (GF_MonitorFromRect*)
+ GetProcAddress(hmod, "MonitorFromRect"))) {
+ return FALSE;
+ }
+
+ if (!(the_GetMonitorInfo = (GF_GetMonitorInfo*)
+ GetProcAddress(hmod, "GetMonitorInfoA"))) {
+ return FALSE;
+ }
+
+ monitor = the_MonitorFromRect(&monitorRect, MONITOR_DEFAULTTONEAREST);
+
+ info.cbSize = sizeof(info);
+ if (!the_GetMonitorInfo(monitor, &info)) {
+ return FALSE;
+ }
+
+ rect->x = info.rcWork.left;
+ rect->y = info.rcWork.top;
+ rect->width = info.rcWork.right - info.rcWork.left;
+ rect->height = info.rcWork.bottom - info.rcWork.top;
+
+ /** Convert the coordinates so that 0, 0 is the top left of the virtual screen,
+ * not the top left of the primary monitor */
+ if (virtual_screen_x != 0) {
+ rect->x += -virtual_screen_x;
+ }
+ if (virtual_screen_y != 0) {
+ rect->y += -virtual_screen_y;
+ }
+
+ return TRUE;
+}
+
+static void
+win32_adjust_workarea(GdkRectangle *rect) {
+ if(!win32_adjust_workarea_multi_monitor(rect)) {
+ if(!win32_get_workarea_fallback(rect)) {
+ /* I don't think this will ever happen */
+ rect->x = 0;
+ rect->y = 0;
+ rect->height = GetSystemMetrics(SM_CXSCREEN);
+ rect->width = GetSystemMetrics(SM_CYSCREEN);
+ }
+ }
+}
+
+gboolean
+gf_display_get_workarea(GdkRectangle *rect) {
+ GdkDisplay *display = NULL;
+ GdkScreen *screen = NULL;
+
+ display = gdk_display_get_default();
+ screen = gdk_display_get_screen(display, disp_screen);
+ gdk_screen_get_monitor_geometry(screen, disp_monitor, rect);
+
+ win32_adjust_workarea(rect);
+
+ return TRUE;
+}
+
+gboolean
+gf_display_screen_saver_is_running(void) {
+ gboolean ret = FALSE;
+
+ if(!SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, (unsigned int) NULL,
+ &ret, FALSE))
+ {
+ ret = FALSE;
+ }
+
+ return ret;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gf_x11_display.c Thu May 23 23:48:19 2013 -0500
@@ -0,0 +1,164 @@
+/*
+ * Guifications - The end all, be all, toaster popup plugin
+ * Copyright (C) 2003-2011 Gary Kramlich
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
+ */
+#include <glib.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+
+#include "gf_display.h"
+
+gboolean
+gf_display_get_workarea(GdkRectangle *rect) {
+ GdkDisplay *g_display = NULL;
+ GdkScreen *g_screen = NULL;
+ Screen *x_screen = NULL;
+ Atom xa_desktops, xa_current, xa_workarea, xa_type;
+ Display *x_display = NULL;
+ Window x_root;
+ guint32 current = 0;
+ gulong *workareas, len, fill;
+ guchar *data;
+ gint format;
+
+ /* get the gdk display */
+ g_display = gdk_display_get_default();
+ if(!g_display)
+ return FALSE;
+
+ /* get the x display from the gdk display */
+ x_display = gdk_x11_display_get_xdisplay(g_display);
+ if(!x_display)
+ return FALSE;
+
+ /* get the screen according to the prefs */
+ g_screen = gdk_display_get_screen(g_display, gf_display_get_screen());
+ if(!g_screen)
+ return FALSE;
+
+ /* get the x screen from the gdk screen */
+ x_screen = gdk_x11_screen_get_xscreen(g_screen);
+ if(!x_screen)
+ return FALSE;
+
+ /* get the root window from the screen */
+ x_root = XRootWindowOfScreen(x_screen);
+
+ /* find the _NET_NUMBER_OF_DESKTOPS atom */
+ xa_desktops = XInternAtom(x_display, "_NET_NUMBER_OF_DESKTOPS", True);
+ if(xa_desktops == None)
+ return FALSE;
+
+ /* find the _NET_CURRENT_DESKTOP atom */
+ xa_current = XInternAtom(x_display, "_NET_CURRENT_DESKTOP", True);
+ if(xa_current == None)
+ return FALSE;
+
+ /* get the current desktop */
+ if(XGetWindowProperty(x_display, x_root, xa_current, 0, 1, False,
+ XA_CARDINAL, &xa_type, &format, &len, &fill,
+ &data) != Success)
+ {
+ return FALSE;
+ }
+
+ if(!data)
+ return FALSE;
+
+ current = *(guint32 *)data;
+ XFree(data);
+
+ /* find the _NET_WORKAREA atom */
+ xa_workarea = XInternAtom(x_display, "_NET_WORKAREA", True);
+ if(xa_workarea == None)
+ return FALSE;
+
+ if(XGetWindowProperty(x_display, x_root, xa_workarea, 0, (glong)(4 * 32),
+ False, AnyPropertyType, &xa_type, &format, &len,
+ &fill, &data) != Success)
+ {
+ return FALSE;
+ }
+
+ /* make sure the type and format are good */
+ if(xa_type == None || format == 0)
+ return FALSE;
+
+ /* make sure we don't have any leftovers */
+ if(fill)
+ return FALSE;
+
+ /* make sure len divides evenly by 4 */
+ if(len % 4 != 0)
+ return FALSE;
+
+ /* it's good, lets use it */
+ workareas = (gulong *)(guint32 *)data;
+
+ rect->x = (guint32)workareas[current * 4];
+ rect->y = (guint32)workareas[current * 4 + 1];
+ rect->width = (guint32)workareas[current * 4 + 2];
+ rect->height = (guint32)workareas[current * 4 + 3];
+
+ /* clean up our memory */
+ XFree(data);
+
+ return TRUE;
+}
+
+gboolean
+gf_display_screen_saver_is_running(void) {
+ GdkDisplay *g_display = NULL;
+ Display *x_display = NULL;
+ static Atom xss, locked, blanked;
+ static gboolean init = FALSE;
+ Atom ratom;
+ gint rtatom;
+ guchar *data = NULL;
+ gulong items, padding;
+ gboolean ret = FALSE;
+
+ g_display = gdk_display_get_default();
+ x_display = gdk_x11_display_get_xdisplay(g_display);
+
+ if(!init) {
+ xss = XInternAtom(x_display,"_SCREENSAVER_STATUS", FALSE);
+ locked = XInternAtom(x_display, "LOCK", FALSE);
+ blanked = XInternAtom(x_display, "BLANK", FALSE);
+ init = TRUE;
+ }
+
+ if(XGetWindowProperty(x_display, GDK_ROOT_WINDOW(), xss, 0, 999, FALSE,
+ XA_INTEGER, &ratom, &rtatom, &items, &padding, &data)
+ == Success)
+ {
+ if(ratom == XA_INTEGER || items >= 3) {
+ guint *item_data = (guint *)data;
+
+ if(item_data[0] == locked || item_data[0] == blanked)
+ ret = TRUE;
+ }
+
+ XFree(data);
+ }
+ return ret;
+
+}
+
--- a/src/win32/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-AM_CPPFLAGS = \
- $(DEBUG_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GLIB_CFLAGS)
-
-noinst_LTLIBRARIES = libguifications-win32.la
-
-libguifications_win32_la_SOURCES = \
- gf_win32_display.c
-
-
--- a/src/win32/gf_win32_display.c Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
- * Guifications - The end all, be all, toaster popup plugin
- * Copyright (C) 2003-2011 Gary Kramlich
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <gdk/gdk.h>
-
-#ifndef WINVER
-# define WINVER 0x0500 /* This is Windows 2000 */
-#endif /* WINVER */
-
-#include <windows.h>
-typedef HMONITOR WINAPI GF_MonitorFromRect(LPCRECT,DWORD);
-typedef BOOL WINAPI GF_GetMonitorInfo(HMONITOR,LPMONITORINFO);
-
-/*******************************************************************************
- * Uses _NET_WORKAREA or SPI_GETWORKAREA to get the geometry of a screen
- ******************************************************************************/
-static gboolean
-win32_get_workarea_fallback(GdkRectangle *rect) {
- RECT rcWork;
- if (SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWork, FALSE)) {
- rect->x = rcWork.left;
- rect->y = rcWork.top;
- rect->width = rcWork.right - rcWork.left;
- rect->height = rcWork.bottom - rcWork.top;
-
- return TRUE;
- }
- return FALSE;
-}
-
-/**
- * This will only work on Win98+ and Win2K+
- */
-static gboolean
-win32_adjust_workarea_multi_monitor(GdkRectangle *rect) {
- GF_GetMonitorInfo *the_GetMonitorInfo;
- GF_MonitorFromRect *the_MonitorFromRect;
- HMODULE hmod;
- HMONITOR monitor;
- MONITORINFO info;
- RECT monitorRect;
- gint virtual_screen_x, virtual_screen_y;
-
- monitorRect.left = rect->x;
- monitorRect.right = rect->x + rect->width;
- monitorRect.top = rect->y;
- monitorRect.bottom = rect->y + rect->height;
-
- /* Convert the coordinates so that 0, 0 is the top left of the Primary
- * Monitor, not the top left of the virtual screen
- */
- virtual_screen_x = GetSystemMetrics(SM_XVIRTUALSCREEN);
- virtual_screen_y = GetSystemMetrics(SM_YVIRTUALSCREEN);
-
- if (virtual_screen_x != 0) {
- monitorRect.left += virtual_screen_x;
- monitorRect.right += virtual_screen_x;
- }
-
- if (virtual_screen_y != 0) {
- monitorRect.top += virtual_screen_y;
- monitorRect.bottom += virtual_screen_y;
- }
-
- if (!(hmod = GetModuleHandle("user32"))) {
- return FALSE;
- }
-
- if (!(the_MonitorFromRect = (GF_MonitorFromRect*)
- GetProcAddress(hmod, "MonitorFromRect"))) {
- return FALSE;
- }
-
- if (!(the_GetMonitorInfo = (GF_GetMonitorInfo*)
- GetProcAddress(hmod, "GetMonitorInfoA"))) {
- return FALSE;
- }
-
- monitor = the_MonitorFromRect(&monitorRect, MONITOR_DEFAULTTONEAREST);
-
- info.cbSize = sizeof(info);
- if (!the_GetMonitorInfo(monitor, &info)) {
- return FALSE;
- }
-
- rect->x = info.rcWork.left;
- rect->y = info.rcWork.top;
- rect->width = info.rcWork.right - info.rcWork.left;
- rect->height = info.rcWork.bottom - info.rcWork.top;
-
- /** Convert the coordinates so that 0, 0 is the top left of the virtual screen,
- * not the top left of the primary monitor */
- if (virtual_screen_x != 0) {
- rect->x += -virtual_screen_x;
- }
- if (virtual_screen_y != 0) {
- rect->y += -virtual_screen_y;
- }
-
- return TRUE;
-}
-
-static void
-win32_adjust_workarea(GdkRectangle *rect) {
- if(!win32_adjust_workarea_multi_monitor(rect)) {
- if(!win32_get_workarea_fallback(rect)) {
- /* I don't think this will ever happen */
- rect->x = 0;
- rect->y = 0;
- rect->height = GetSystemMetrics(SM_CXSCREEN);
- rect->width = GetSystemMetrics(SM_CYSCREEN);
- }
- }
-}
-
-gboolean
-gf_display_get_workarea(GdkRectangle *rect) {
- GdkDisplay *display = NULL;
- GdkScreen *screen = NULL;
-
- display = gdk_display_get_default();
- screen = gdk_display_get_screen(display, disp_screen);
- gdk_screen_get_monitor_geometry(screen, disp_monitor, rect);
-
- win32_adjust_workarea(rect);
-
- return TRUE;
-}
-
-gboolean
-gf_display_screen_saver_is_running(void) {
- gboolean ret = FALSE;
-
- if(!SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, (unsigned int) NULL,
- &ret, FALSE))
- {
- ret = FALSE;
- }
-
- return ret;
-}
-
--- a/src/x11/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-
-noinst_LTLIBRARIES = libguifications-x11.la
-
-libguifications_x11_la_SOURCES = \
- gf_x11_display.c
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/src \
- $(DEBUG_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(PIDGIN_CFLAGS) \
- $(PURPLE_CFLAGS)
-
--- a/src/x11/gf_x11_display.c Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * Guifications - The end all, be all, toaster popup plugin
- * Copyright (C) 2003-2011 Gary Kramlich
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA.
- */
-#include <glib.h>
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-
-#include "gf_display.h"
-
-gboolean
-gf_display_get_workarea(GdkRectangle *rect) {
- GdkDisplay *g_display = NULL;
- GdkScreen *g_screen = NULL;
- Screen *x_screen = NULL;
- Atom xa_desktops, xa_current, xa_workarea, xa_type;
- Display *x_display = NULL;
- Window x_root;
- guint32 current = 0;
- gulong *workareas, len, fill;
- guchar *data;
- gint format;
-
- /* get the gdk display */
- g_display = gdk_display_get_default();
- if(!g_display)
- return FALSE;
-
- /* get the x display from the gdk display */
- x_display = gdk_x11_display_get_xdisplay(g_display);
- if(!x_display)
- return FALSE;
-
- /* get the screen according to the prefs */
- g_screen = gdk_display_get_screen(g_display, gf_display_get_screen());
- if(!g_screen)
- return FALSE;
-
- /* get the x screen from the gdk screen */
- x_screen = gdk_x11_screen_get_xscreen(g_screen);
- if(!x_screen)
- return FALSE;
-
- /* get the root window from the screen */
- x_root = XRootWindowOfScreen(x_screen);
-
- /* find the _NET_NUMBER_OF_DESKTOPS atom */
- xa_desktops = XInternAtom(x_display, "_NET_NUMBER_OF_DESKTOPS", True);
- if(xa_desktops == None)
- return FALSE;
-
- /* find the _NET_CURRENT_DESKTOP atom */
- xa_current = XInternAtom(x_display, "_NET_CURRENT_DESKTOP", True);
- if(xa_current == None)
- return FALSE;
-
- /* get the current desktop */
- if(XGetWindowProperty(x_display, x_root, xa_current, 0, 1, False,
- XA_CARDINAL, &xa_type, &format, &len, &fill,
- &data) != Success)
- {
- return FALSE;
- }
-
- if(!data)
- return FALSE;
-
- current = *(guint32 *)data;
- XFree(data);
-
- /* find the _NET_WORKAREA atom */
- xa_workarea = XInternAtom(x_display, "_NET_WORKAREA", True);
- if(xa_workarea == None)
- return FALSE;
-
- if(XGetWindowProperty(x_display, x_root, xa_workarea, 0, (glong)(4 * 32),
- False, AnyPropertyType, &xa_type, &format, &len,
- &fill, &data) != Success)
- {
- return FALSE;
- }
-
- /* make sure the type and format are good */
- if(xa_type == None || format == 0)
- return FALSE;
-
- /* make sure we don't have any leftovers */
- if(fill)
- return FALSE;
-
- /* make sure len divides evenly by 4 */
- if(len % 4 != 0)
- return FALSE;
-
- /* it's good, lets use it */
- workareas = (gulong *)(guint32 *)data;
-
- rect->x = (guint32)workareas[current * 4];
- rect->y = (guint32)workareas[current * 4 + 1];
- rect->width = (guint32)workareas[current * 4 + 2];
- rect->height = (guint32)workareas[current * 4 + 3];
-
- /* clean up our memory */
- XFree(data);
-
- return TRUE;
-}
-
-gboolean
-gf_display_screen_saver_is_running(void) {
- GdkDisplay *g_display = NULL;
- Display *x_display = NULL;
- static Atom xss, locked, blanked;
- static gboolean init = FALSE;
- Atom ratom;
- gint rtatom;
- guchar *data = NULL;
- gulong items, padding;
- gboolean ret = FALSE;
-
- g_display = gdk_display_get_default();
- x_display = gdk_x11_display_get_xdisplay(g_display);
-
- if(!init) {
- xss = XInternAtom(x_display,"_SCREENSAVER_STATUS", FALSE);
- locked = XInternAtom(x_display, "LOCK", FALSE);
- blanked = XInternAtom(x_display, "BLANK", FALSE);
- init = TRUE;
- }
-
- if(XGetWindowProperty(x_display, GDK_ROOT_WINDOW(), xss, 0, 999, FALSE,
- XA_INTEGER, &ratom, &rtatom, &items, &padding, &data)
- == Success)
- {
- if(ratom == XA_INTEGER || items >= 3) {
- guint *item_data = (guint *)data;
-
- if(item_data[0] == locked || item_data[0] == blanked)
- ret = TRUE;
- }
-
- XFree(data);
- }
- return ret;
-
-}
-
--- a/themes/Makefile.am Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-THEMES_DIR = $(PIDGIN_DATADIR)/pixmaps/pidgin/guifications/themes
-
-# default
-defaultdir = $(THEMES_DIR)/default
-default_DATA = \
- default/background.png \
- default/theme.xml
-
-# hbons
-hbonsdir = $(THEMES_DIR)/hbons
-hbons_DATA = \
- hbons/available.png \
- hbons/away.png \
- hbons/im.png \
- hbons/offline.png \
- hbons/theme.xml
-
-# mini
-minidir = $(THEMES_DIR)/mini
-mini_DATA = \
- mini/background.png \
- mini/theme.xml
-
-# Penguins
-penguinsdir = $(THEMES_DIR)/Penguins
-penguins_DATA = \
- Penguins/penguin.png
- Penguins/theme.xml
-
-EXTRA_DIST = \
- Makefile.mingw \
- $(default_DATA) \
- $(hbons_DATA) \
- $(mini_DATA) \
- $(penguins_DATA)
-
--- a/themes/Makefile.mingw Thu May 23 05:31:31 2013 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#
-# Makefile.mingw
-#
-# Description: Makefile for guifications themes
-#
-
-DEFAULT_THEME = ./default
-MINI_THEME = ./mini
-PENGUINS_THEME = ./Penguins
-
-.PHONY: install
-
-install:
- $(MAKE) -C $(DEFAULT_THEME) -f Makefile.mingw install
- $(MAKE) -C $(MINI_THEME) -f Makefile.mingw install
- $(MAKE) -C $(PENGUINS_THEME) -f Makefile.mingw install