[network-manager-vpnc] gnome: build with GTK3 by default
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-vpnc] gnome: build with GTK3 by default
- Date: Wed, 9 Feb 2011 04:52:39 +0000 (UTC)
commit ef7bef7ce9dd97c7882be3fa9694e15363ff28ce
Author: Dan Williams <dcbw redhat com>
Date: Tue Feb 8 22:51:53 2011 -0600
gnome: build with GTK3 by default
Pass --with-gtk2 to build with gtk2. Patches welcome for
auto-picking gtk version, with a preference for 3.x.
auth-dialog/gnome-two-password-dialog.c | 2 ++
configure.ac | 12 +++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/auth-dialog/gnome-two-password-dialog.c b/auth-dialog/gnome-two-password-dialog.c
index 355b419..97f5df2 100644
--- a/auth-dialog/gnome-two-password-dialog.c
+++ b/auth-dialog/gnome-two-password-dialog.c
@@ -211,7 +211,9 @@ vpn_password_dialog_new (const char *title,
action_area = GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog)));
/* Setup the dialog */
+#if !GTK_CHECK_VERSION (2,22,0)
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (content, 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
diff --git a/configure.ac b/configure.ac
index ba6439c..496478c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,17 @@ AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
if test x"$with_gnome" != xno; then
- PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.20)
+ AC_ARG_WITH([gtk2], AS_HELP_STRING([--with-gtk2], [Use GTK+ 2.x instead of GTK+ 3.x]),
+ with_gtk2="$withval",with_gtk2=no)
+ gtkver=3
+ case "${with_gtk2}" in
+ yes) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.20)
+ gtkver=2
+ ;;
+ *) PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.91.4)
+ ;;
+ esac
+ AM_CONDITIONAL(USE_GTK2, test x"$gtkver" = "x2")
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]