aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-08 20:35:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-08 20:35:53 +0800
commit0637683a2f89087f49fa0d91e44b04ed26d72ba3 (patch)
tree7f0d367d965831cc45b3091d28b7fdee8ebb011f
parent526cac765322aa7516d46d735fc9b5f1c4f2c228 (diff)
parent6b1d4251dc32cf7c75871002a1f8163af9775f65 (diff)
downloadgsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar.gz
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar.bz2
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar.lz
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar.xz
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.tar.zst
gsoc2013-empathy-0637683a2f89087f49fa0d91e44b04ed26d72ba3.zip
Merge branch 'gtk3-621753'
-rw-r--r--configure.ac168
-rw-r--r--extensions/Makefile.am2
-rw-r--r--libempathy-gtk/Makefile.am8
-rw-r--r--libempathy-gtk/empathy-notify-manager.h2
-rw-r--r--libempathy/Makefile.am4
-rw-r--r--nautilus-sendto-plugin/Makefile.am3
-rw-r--r--nautilus-sendto-plugin/empathy-nautilus-sendto.c17
-rw-r--r--src/Makefile.am6
-rw-r--r--src/empathy-call-window.c4
-rw-r--r--tests/interactive/Makefile.am4
10 files changed, 131 insertions, 87 deletions
diff --git a/configure.ac b/configure.ac
index 6f965737e..7e71bd96f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,33 +29,36 @@ AC_COPYRIGHT([
])
# Minimal version required
+
+# Hardp deps
+GCONF_REQUIRED=1.2.0
GLIB_REQUIRED=2.25.9
GTK_REQUIRED=2.21.2
-GCONF_REQUIRED=1.2.0
+KEYRING_REQUIRED=2.22
+LIBCANBERRA_GTK_REQUIRED=0.4
+LIBNOTIFY_REQUIRED=0.4.4
+LIBNOTIFY_REQUIRED_GTK3=0.5.1
TELEPATHY_GLIB_REQUIRED=0.11.7
TELEPATHY_LOGGER=0.1.2
+UNIQUE_REQUIRED=1.1.2
+
+# Optionnal deps
+CLUTTER_GTK_REQUIRED=0.10
ENCHANT_REQUIRED=1.2.0
+GEOCLUE_REQUIRED=0.11
ISO_CODES_REQUIRED=0.35
-LIBNOTIFY_REQUIRED=0.4.4
-LIBCANBERRA_GTK_REQUIRED=0.4
-LIBCHAMPLAIN_REQUIRED=0.4
LIBCHAMPLAIN_GTK_REQUIRED=0.4
-CLUTTER_GTK_REQUIRED=0.10
-GEOCLUE_REQUIRED=0.11
-WEBKIT_REQUIRED=1.1.15
-KEYRING_REQUIRED=2.22
-NETWORK_MANAGER_REQUIRED=0.7.0
+LIBCHAMPLAIN_REQUIRED=0.4
NAUTILUS_SENDTO_REQUIRED=2.28.1
-UNIQUE_REQUIRED=1.1.2
+NAUTILUS_SENDTO_REQUIRED_GTK3=2.90.0
+NETWORK_MANAGER_REQUIRED=0.7.0
+WEBKIT_REQUIRED=1.1.15
# Use --enable-maintainer-mode to disable deprecated symbols,
# disable single include and enable GSEAL. If this is not a released empathy,
# maintainer mode is forced
ifelse(empathy_released, 1, [], [enable_maintainer_mode="yes"])
GNOME_MAINTAINER_MODE_DEFINES
-if test $USE_MAINTAINER_MODE = yes; then
- AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors])
-fi
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
@@ -139,70 +142,59 @@ AC_SUBST(ERROR_CFLAGS)
# Pkg-Config dependency checks
# -----------------------------------------------------------
-PKG_CHECK_MODULES(LIBEMPATHY,
+PKG_CHECK_MODULES(EMPATHY,
[
- glib-2.0 >= $GLIB_REQUIRED
- gobject-2.0
+ dbus-glib-1
+ farsight2-0.10
+ gconf-2.0 >= $GCONF_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
gio-unix-2.0 >= $GLIB_REQUIRED
- libxml-2.0
- telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
- telepathy-farsight
- farsight2-0.10
- gstreamer-0.10
- telepathy-logger-0.1 >= $TELEPATHY_LOGGER
-])
-
-PKG_CHECK_MODULES(LIBEMPATHYGTK,
-[
- glib-2.0 >= $GLIB_REQUIRED
+ gnome-keyring-1 >= $KEYRING_REQUIRED
gobject-2.0
- gio-2.0 >= $GLIB_REQUIRED
- gconf-2.0 >= $GCONF_REQUIRED
- x11
- gtk+-2.0 >= $GTK_REQUIRED
- libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
- telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
- farsight2-0.10
gstreamer-0.10
gstreamer-interfaces-0.10
- telepathy-logger-0.1 >= $TELEPATHY_LOGGER
-])
-
-PKG_CHECK_MODULES(EMPATHY,
-[
- glib-2.0 >= $GLIB_REQUIRED
- gobject-2.0
- gio-2.0 >= $GLIB_REQUIRED
- gdk-x11-2.0
- gtk+-2.0 >= $GTK_REQUIRED
libebook-1.2
- dbus-glib-1
- telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
+ libxml-2.0
telepathy-farsight
- farsight2-0.10
- gstreamer-0.10
- unique-1.0 >= $UNIQUE_REQUIRED
- gnome-keyring-1 >= $KEYRING_REQUIRED
- telepathy-logger-0.1 >= $TELEPATHY_LOGGER
-])
-
-PKG_CHECK_MODULES(LIBEMPATHY_ACCOUNTS_PANEL,
-[
- glib-2.0 >= $GLIB_REQUIRED
- gobject-2.0
- gio-2.0 >= $GLIB_REQUIRED
- gdk-x11-2.0
- gtk+-2.0 >= $GTK_REQUIRED
- libebook-1.2
- dbus-glib-1
telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
- unique-1.0 >= $UNIQUE_REQUIRED
- gnome-keyring-1 >= $KEYRING_REQUIRED
telepathy-logger-0.1 >= $TELEPATHY_LOGGER
+ x11
])
-PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
+# -----------------------------------------------------------
+# GTK+
+# -----------------------------------------------------------
+AC_ARG_ENABLE(gtk3,
+ AS_HELP_STRING([--enable-gtk3=@<:@no/yes/auto@:>@],
+ [build with GTK+3]), ,
+ enable_gtk3=auto)
+
+# Try to use GTK+3 if available
+if test "x$enable_gtk3" != "xno"; then
+ PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_REQUIRED],
+ enable_gtk3="yes", enable_gtk3="no")
+
+ # GTK3 specific deps
+ PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED)
+ PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED_GTK3)
+ PKG_CHECK_MODULES(UNIQUE, unique-3.0 >= $UNIQUE_REQUIRED)
+fi
+
+# ...if not use GTK+2
+if test "x$enable_gtk3" == "xno"; then
+ enable_gtk3=no
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
+
+ # GTK2 specific deps
+ PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED)
+ PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
+ PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
+
+ # Enable GSEAL checks if needed
+ if test $USE_MAINTAINER_MODE = yes; then
+ AC_DEFINE(GSEAL_ENABLE, [], [Seal public structs to force usage of accessors])
+ fi
+fi
# -----------------------------------------------------------
# Enable debug
@@ -293,10 +285,14 @@ AC_ARG_ENABLE(webkit,
enable_webkit=auto)
if test "x$enable_webkit" != "xno"; then
- PKG_CHECK_MODULES(WEBKIT,
- [
- webkit-1.0 >= $WEBKIT_REQUIRED
- ], have_webkit="yes", have_webkit="no")
+
+ if test "x$enable_gtk3" == "xno"; then
+ PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= $WEBKIT_REQUIRED],
+ have_webkit="yes", have_webkit="no")
+ else
+ PKG_CHECK_MODULES(WEBKIT, [webkitgtk-3.0 >= $WEBKIT_REQUIRED],
+ have_webkit="yes", have_webkit="no")
+ fi
if test "x$have_webkit" = "xyes"; then
AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
@@ -357,17 +353,23 @@ AC_ARG_ENABLE(map,
enable_map=auto)
if test "x$enable_map" != "xno"; then
- PKG_CHECK_MODULES(LIBCHAMPLAIN,
- [
- champlain-0.4 >= $LIBCHAMPLAIN_REQUIRED,
- champlain-gtk-0.4 >= $LIBCHAMPLAIN_GTK_REQUIRED
- clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
- ], have_libchamplain="yes", have_libchamplain="no")
+
+ if test "x$enable_gtk3" == "xno"; then
+ PKG_CHECK_MODULES(LIBCHAMPLAIN,
+ [
+ champlain-0.4 >= $LIBCHAMPLAIN_REQUIRED,
+ champlain-gtk-0.4 >= $LIBCHAMPLAIN_GTK_REQUIRED
+ clutter-gtk-0.10 >= $CLUTTER_GTK_REQUIRED
+ ], have_libchamplain="yes", have_libchamplain="no")
+ else
+ have_libchamplain="no"
+ fi
if test "x$have_libchamplain" = "xyes"; then
AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
fi
else
+ # FIXME: check deps once clutter-gtk and champlain have been ported to GTK3
have_libchamplain=no
fi
@@ -444,10 +446,17 @@ AC_ARG_ENABLE(nautilus-sendto,
enable_nautilus_sendto=auto)
if test "x$enable_nautilus_sendto" != "xno"; then
- PKG_CHECK_MODULES(NST,
- [
- nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
- ], have_nst="yes", have_nst="no")
+ if test "x$enable_gtk3" == "xno"; then
+ # Newer NST requires GTK+3 so we can't use it
+ PKG_CHECK_MODULES(NST,[nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED
+ nautilus-sendto < 2.90.0],
+ have_nst="yes", have_nst="no")
+
+ AC_DEFINE(HAVE_OLD_NST, [], [Legacy compat mode with old nautilus-sendto] )
+ else
+ PKG_CHECK_MODULES(NST,[nautilus-sendto >= $NAUTILUS_SENDTO_REQUIRED_GTK3],
+ have_nst="yes", have_nst="no")
+ fi
else
have_nst=no
fi
@@ -524,6 +533,7 @@ Configure summary:
Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS}
Prefix......................: ${prefix}
Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
+ Use GTK+3...................: ${enable_gtk3}
Features:
Spell checking (enchant)....: ${have_enchant}
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index 8ea05ae6b..a60994b70 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -6,7 +6,7 @@ AM_CFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(WARN_CFLAGS) \
- $(LIBEMPATHY_CFLAGS)
+ $(EMPATHY_CFLAGS)
EXTRA_DIST = \
all.xml \
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am
index 43763d56c..6fa8202dd 100644
--- a/libempathy-gtk/Makefile.am
+++ b/libempathy-gtk/Makefile.am
@@ -6,8 +6,10 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-DDATADIR=\""$(datadir)"\" \
-DPKGDATADIR=\""$(pkgdatadir)"\" \
- $(LIBEMPATHYGTK_CFLAGS) \
+ $(EMPATHY_CFLAGS) \
+ $(GTK_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
+ $(CANBERRA_CFLAGS) \
$(ENCHANT_CFLAGS) \
$(LIBCHAMPLAIN_CFLAGS) \
$(GEOCLUE_CFLAGS) \
@@ -129,8 +131,10 @@ nodist_libempathy_gtk_la_SOURCES =\
$(BUILT_SOURCES)
libempathy_gtk_la_LIBADD = \
- $(LIBEMPATHYGTK_LIBS) \
+ $(EMPATHY_LIBS) \
+ $(GTK_LIBS) \
$(LIBNOTIFY_LIBS) \
+ $(CANBERRA_LIBS) \
$(ENCHANT_LIBS) \
$(LIBCHAMPLAIN_LIBS) \
$(GEOCLUE_LIBS) \
diff --git a/libempathy-gtk/empathy-notify-manager.h b/libempathy-gtk/empathy-notify-manager.h
index ff62a872a..f7c5e4c5a 100644
--- a/libempathy-gtk/empathy-notify-manager.h
+++ b/libempathy-gtk/empathy-notify-manager.h
@@ -23,6 +23,8 @@
#include <glib-object.h>
+#include <libempathy/empathy-contact.h>
+
G_BEGIN_DECLS
#define EMPATHY_NOTIFY_MANAGER_CAP_ACTIONS "actions"
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am
index d44d8afef..746803e05 100644
--- a/libempathy/Makefile.am
+++ b/libempathy/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
-DDATADIR=\""$(datadir)"\" \
-DLOCALEDIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"empathy\" \
- $(LIBEMPATHY_CFLAGS) \
+ $(EMPATHY_CFLAGS) \
$(GEOCLUE_CFLAGS) \
$(NETWORK_MANAGER_CFLAGS) \
$(CONNMAN_CFLAGS) \
@@ -100,7 +100,7 @@ nodist_libempathy_la_SOURCES =\
libempathy_la_LIBADD = \
$(top_builddir)/extensions/libemp-extensions.la \
- $(LIBEMPATHY_LIBS) \
+ $(EMPATHY_LIBS) \
$(GEOCLUE_LIBS) \
$(NETWORK_MANAGER_LIBS) \
$(CONNMAN_LIBS)
diff --git a/nautilus-sendto-plugin/Makefile.am b/nautilus-sendto-plugin/Makefile.am
index adc9bfb67..03564fe02 100644
--- a/nautilus-sendto-plugin/Makefile.am
+++ b/nautilus-sendto-plugin/Makefile.am
@@ -7,7 +7,8 @@ INCLUDES = \
$(NST_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED) \
- $(EMPATHY_CFLAGS)
+ $(EMPATHY_CFLAGS) \
+ $(GTK_CFLAGS)
plugin_LTLIBRARIES = libnstempathy.la
diff --git a/nautilus-sendto-plugin/empathy-nautilus-sendto.c b/nautilus-sendto-plugin/empathy-nautilus-sendto.c
index 503e51808..346624aff 100644
--- a/nautilus-sendto-plugin/empathy-nautilus-sendto.c
+++ b/nautilus-sendto-plugin/empathy-nautilus-sendto.c
@@ -235,6 +235,8 @@ destroy (NstPlugin *plugin)
return TRUE;
}
+/* Legacy from old versions (< 2.90.0) */
+#ifdef HAVE_OLD_NST
static
NstPluginInfo plugin_info = {
"im",
@@ -249,6 +251,21 @@ NstPluginInfo plugin_info = {
send_files,
destroy
};
+#else
+static
+NstPluginInfo plugin_info = {
+ "im",
+ "empathy",
+ N_("Instant Message (Empathy)"),
+ GETTEXT_PACKAGE,
+ NAUTILUS_CAPS_NONE,
+ init,
+ get_contacts_widget,
+ validate_destination,
+ send_files,
+ destroy
+};
+#endif
NST_INIT_PLUGIN (plugin_info)
diff --git a/src/Makefile.am b/src/Makefile.am
index eaac3c341..8209d92a6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,6 +2,7 @@ include $(top_srcdir)/tools/flymake.mk
CPPFLAGS_COMMON = \
$(EMPATHY_CFLAGS) \
+ $(GTK_CFLAGS) \
$(ERROR_CFLAGS) \
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"empathy\" \
@@ -14,6 +15,7 @@ AM_LDFLAGS = -lm
AM_CPPFLAGS = \
$(CPPFLAGS_COMMON) \
$(LIBNOTIFY_CFLAGS) \
+ $(UNIQUE_CFLAGS) \
$(LIBCHAMPLAIN_CFLAGS) \
$(WEBKIT_CFLAGS) \
$(NULL)
@@ -23,7 +25,9 @@ LDADD = \
$(top_builddir)/libempathy/libempathy.la \
$(top_builddir)/extensions/libemp-extensions.la \
$(LIBNOTIFY_LIBS) \
+ $(UNIQUE_LIBS) \
$(EMPATHY_LIBS) \
+ $(GTK_LIBS) \
$(LIBCHAMPLAIN_LIBS) \
$(WEBKIT_LIBS)
@@ -43,6 +47,7 @@ libempathy_accounts_common_la_SOURCES = \
libempathy_accounts_common_la_LIBADD = \
$(top_builddir)/libempathy-gtk/libempathy-gtk.la \
$(LIBNOTIFY_LIBS) \
+ $(UNIQUE_LIBS) \
$(EMPATHY_LIBS) \
$(LIBCHAMPLAIN_LIBS) \
$(WEBKIT_LIBS) \
@@ -132,6 +137,7 @@ empathy_LDADD = \
$(top_builddir)/libempathy/libempathy.la \
$(top_builddir)/extensions/libemp-extensions.la \
$(LIBNOTIFY_LIBS) \
+ $(UNIQUE_LIBS) \
$(EMPATHY_LIBS) \
$(LIBCHAMPLAIN_LIBS) \
$(WEBKIT_LIBS) \
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 5fd232bc6..a8d1c40fa 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1247,8 +1247,10 @@ contact_avatar_changed_cb (EmpathyContact *contact,
GParamSpec *pspec, GtkWidget *avatar_widget)
{
int size;
+ GtkAllocation allocation;
- size = avatar_widget->allocation.height;
+ gtk_widget_get_allocation (avatar_widget, &allocation);
+ size = allocation.height;
if (size == 0)
{
diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am
index 8fc19eb3e..bd3acea67 100644
--- a/tests/interactive/Makefile.am
+++ b/tests/interactive/Makefile.am
@@ -3,13 +3,15 @@ AM_CPPFLAGS = \
-I$(top_srcdir) \
-DPKGDATADIR=\""$(pkgdatadir)"\" \
$(EMPATHY_CFLAGS) \
+ $(GTK_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED)
LDADD = \
$(top_builddir)/libempathy-gtk/libempathy-gtk.la \
$(top_builddir)/libempathy/libempathy.la \
- $(EMPATHY_LIBS)
+ $(EMPATHY_LIBS) \
+ $(GTK_LIBS)
noinst_PROGRAMS = \
contact-manager \