[gnome-packagekit/gnome-2-32] Only disable deprecated code for --enable-strict builds (defaulting to true for git)
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/gnome-2-32] Only disable deprecated code for --enable-strict builds (defaulting to true for git)
- Date: Wed, 15 Sep 2010 10:34:31 +0000 (UTC)
commit 5c8bbeaa4155c7427c202ec88830ddb011b63383
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 15 11:16:48 2010 +0100
Only disable deprecated code for --enable-strict builds (defaulting to true for git)
configure.ac | 8 ++++----
src/gpk-check-update.c | 13 ++++++++-----
src/gpk-update-viewer.c | 7 +++++--
3 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4f2096a..7ebc9b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,10 @@ fi
AC_ARG_ENABLE(strict, AS_HELP_STRING([--enable-strict],[Enable strict compilation options]), enable_strict=$enableval,
enable_strict=$default_strict)
if test x$enable_strict != xno; then
+ CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+ CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+ CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
+ CPPFLAGS="$CPPFLAGS -DGSEAL_ENABLE"
if test "$GCC" = "yes"; then
CPPFLAGS="$CPPFLAGS -Werror"
fi
@@ -50,10 +54,6 @@ dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------
if test "$GCC" = "yes"; then
-# CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
- CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
-# CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
- CPPFLAGS="$CPPFLAGS -DGSEAL_ENABLE"
CPPFLAGS="$CPPFLAGS -Wall -Wreturn-type"
# CPPFLAGS="$CPPFLAGS -Wextra"
CPPFLAGS="$CPPFLAGS -Wdeclaration-after-statement"
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index ae59494..2d49f5e 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -488,6 +488,7 @@ gpk_check_update_update_system_finished_cb (PkTask *task, GAsyncResult *res, Gpk
PkResults *results;
GError *error = NULL;
PkError *error_code = NULL;
+ ca_context *context;
/* get the results */
results = pk_task_generic_finish (task, res, &error);
@@ -510,7 +511,8 @@ gpk_check_update_update_system_finished_cb (PkTask *task, GAsyncResult *res, Gpk
}
/* play the sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
+ context = ca_gtk_context_get_for_screen (gdk_screen_get_default ());
+ ca_context_play (context, 0,
/* TODO: add a new sound to the spec */
CA_PROP_EVENT_ID, "complete-download",
/* TRANSLATORS: this is the application name for libcanberra */
@@ -877,6 +879,7 @@ gpk_check_update_get_updates_finished_cb (GObject *object, GAsyncResult *res, Gp
gchar **package_ids;
GPtrArray *array = NULL;
PkError *error_code = NULL;
+ ca_context *context;
/* get the results */
results = pk_client_generic_finish (PK_CLIENT(client), res, &error);
@@ -950,10 +953,9 @@ gpk_check_update_get_updates_finished_cb (GObject *object, GAsyncResult *res, Gp
if (update == GPK_UPDATE_ENUM_NONE) {
egg_debug ("not updating as policy NONE");
- /* TODO: use ca_gtk_context_get_for_screen to allow use of GDK_MULTIHEAD_SAFE */
-
/* play the sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
+ context = ca_gtk_context_get_for_screen (gdk_screen_get_default ());
+ ca_context_play (context, 0,
/* TODO: add a new sound to the spec */
CA_PROP_EVENT_ID, "software-update-available",
/* TRANSLATORS: this is the application name for libcanberra */
@@ -975,7 +977,8 @@ gpk_check_update_get_updates_finished_cb (GObject *object, GAsyncResult *res, Gp
egg_debug ("on battery so not doing update");
/* play the sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
+ context = ca_gtk_context_get_for_screen (gdk_screen_get_default ());
+ ca_context_play (context, 0,
/* TODO: add a new sound to the spec */
CA_PROP_EVENT_ID, "software-update-available",
/* TRANSLATORS: this is the application name for libcanberra */
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 98d1a9c..9c4e8d3 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -441,6 +441,7 @@ gpk_update_viewer_update_packages_cb (PkTask *task, GAsyncResult *res, GpkUpdate
GtkTreeView *treeview;
GtkTreeModel *model;
GpkUpdateViewerPrivate *priv = update_viewer->priv;
+ ca_context *context;
/* get the results */
results = pk_task_generic_finish (task, res, &error);
@@ -480,7 +481,8 @@ gpk_update_viewer_update_packages_cb (PkTask *task, GAsyncResult *res, GpkUpdate
egg_warning ("failed to update packages: %s, %s", pk_error_enum_to_text (pk_error_get_code (error_code)), pk_error_get_details (error_code));
/* failed sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
+ context = ca_gtk_context_get_for_screen (gdk_screen_get_default ());
+ ca_context_play (context, 0,
CA_PROP_EVENT_ID, "dialog-warning",
/* TRANSLATORS: this is the application name for libcanberra */
CA_PROP_APPLICATION_NAME, _("GNOME PackageKit Update Viewer"),
@@ -506,7 +508,8 @@ gpk_update_viewer_update_packages_cb (PkTask *task, GAsyncResult *res, GpkUpdate
/* TODO: use ca_gtk_context_get_for_screen to allow use of GDK_MULTIHEAD_SAFE */
/* play the sound, using sounds from the naming spec */
- ca_context_play (ca_gtk_context_get (), 0,
+ context = ca_gtk_context_get_for_screen (gdk_screen_get_default ());
+ ca_context_play (context, 0,
/* TODO: add a new sound to the spec */
CA_PROP_EVENT_ID, "complete-download",
/* TRANSLATORS: this is the application name for libcanberra */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]