[network-manager-openvpn/rm-userset: 4/4] gnome: build for GTK 3.0 by default
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/rm-userset: 4/4] gnome: build for GTK 3.0 by default
- Date: Fri, 11 Feb 2011 06:25:14 +0000 (UTC)
commit 5f40ed1ba6d1579fe377f33511a12c3bc1e62fd9
Author: Dan Williams <dcbw redhat com>
Date: Fri Feb 11 00:25:02 2011 -0600
gnome: build for GTK 3.0 by default
Pass --with-gtk2 to use gtk2. Patches for autodetecting the gtk
version welcome (with gtk3 preferred of course).
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 e6f68b7..4462ffe 100644
--- a/auth-dialog/gnome-two-password-dialog.c
+++ b/auth-dialog/gnome-two-password-dialog.c
@@ -327,7 +327,9 @@ gnome_two_password_dialog_new (const char *dialog_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 (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 8d6c0f1..3a22631 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,17 @@ AC_SUBST(NETWORK_MANAGER_CFLAGS)
AC_SUBST(NETWORK_MANAGER_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]