[Pkg-privacy-commits] [nautilus-wipe] 138/224: Add support for building against GTK3 (--with-gtk3)
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 19:45:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository nautilus-wipe.
commit 8ac9fe2ef814e7594e748e2d08a55f1ddc036564
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Wed Aug 17 22:10:26 2011 +0200
Add support for building against GTK3 (--with-gtk3)
---
configure.ac | 20 +++++++++++++++++++-
nautilus-wipe/operation-manager.c | 2 +-
nautilus-wipe/progress-dialog.c | 5 +++--
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 987dff8..3a8fd5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,6 +16,7 @@ LT_INIT([disable-static])
AC_PROG_CC
AM_PROG_CC_C_O
IT_PROG_INTLTOOL
+PKG_PROG_PKG_CONFIG([0.9])
GNOME_DOC_INIT
@@ -34,9 +35,26 @@ NAUTILUS_EXTENSION=2.0
GSECUREDELETE_REQUIRED=0.1
GIO_UNIX_REQUIRED=2.0
+# choose whether to use GTK2 or GTK3
+AC_ARG_WITH([gtk3],
+ [AS_HELP_STRING([--with-gtk3],
+ [build for GTK3 instead of GTK2 [[default=auto]]])],
+ [with_gtk3="$withval"],
+ [with_gtk3=check])
+# use GTK2 by default but if not found
+AC_MSG_CHECKING([for GTK package to use])
+gtk_pkg="gtk+-2.0"
+AS_IF([test "x$with_gtk3" = xcheck],
+ [PKG_CHECK_EXISTS([$gtk_pkg >= ${GTK_REQUIRED}],
+ [],
+ [gtk_pkg="gtk+-3.0"])],
+ [test "x$with_gtk3" != xno],
+ [gtk_pkg="gtk+-3.0"])
+AC_MSG_RESULT([$gtk_pkg])
+
# mandatory packages
PKG_CHECK_MODULES([GLIB], glib-2.0 >= ${GLIB_REQUIRED})
-PKG_CHECK_MODULES([GTK], gtk+-2.0 >= ${GTK_REQUIRED})
+PKG_CHECK_MODULES([GTK], $gtk_pkg >= ${GTK_REQUIRED})
PKG_CHECK_MODULES([GCONF], gconf-2.0 >= ${GCONF_REQUIRED})
PKG_CHECK_MODULES([LIBNAUTILUS_EXTENSION], libnautilus-extension >= ${NAUTILUS_EXTENSION})
PKG_CHECK_MODULES([GSECUREDELETE], gsecuredelete >= ${GSECUREDELETE_REQUIRED})
diff --git a/nautilus-wipe/operation-manager.c b/nautilus-wipe/operation-manager.c
index 08dde1a..3281e04 100644
--- a/nautilus-wipe/operation-manager.c
+++ b/nautilus-wipe/operation-manager.c
@@ -169,7 +169,7 @@ free_opdata (struct NautilusWipeOperationData *opdata)
/* if the parent window get destroyed, we honor gently the thing and leave it
* to the death. doing this is useful not to have a bad window pointer later */
static void
-opdata_window_destroy_handler (GtkObject *obj,
+opdata_window_destroy_handler (GtkWidget *obj,
struct NautilusWipeOperationData *opdata)
{
g_signal_handler_disconnect (opdata->window, opdata->window_destroy_hid);
diff --git a/nautilus-wipe/progress-dialog.c b/nautilus-wipe/progress-dialog.c
index cb33d21..fc52002 100644
--- a/nautilus-wipe/progress-dialog.c
+++ b/nautilus-wipe/progress-dialog.c
@@ -153,7 +153,6 @@ update_action_area_visibility (NautilusWipeProgressDialog *dialog,
g_list_free (children);
}
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), n_children > 0);
if (n_children > 0) {
gtk_widget_show (container);
} else {
@@ -283,7 +282,9 @@ nautilus_wipe_progress_dialog_new (GtkWindow *parent,
va_end (ap);
self = g_object_new (NAUTILUS_TYPE_WIPE_PROGRESS_DIALOG,
"transient-for", parent,
- "has-separator", ! (flags & GTK_DIALOG_NO_SEPARATOR),
+#if ! GTK_CHECK_VERSION (3, 0, 0)
+ "has-separator", FALSE,
+#endif
"modal", flags & GTK_DIALOG_MODAL,
"destroy-with-parent", flags & GTK_DIALOG_DESTROY_WITH_PARENT,
"text", text,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/nautilus-wipe.git
More information about the Pkg-privacy-commits
mailing list