Hi Josselin, Josselin Mouette wrote:
> Le samedi 19 septembre 2009 à 01:20 -0500, Jonathan Nieder a écrit : > > | ** (evince:18101): WARNING **: Failed to create dbus proxy for > > org.gnome.SettingsDaemon: Could not get owner of name > > 'org.gnome.SettingsDaemon': no such name > > No, this is because gnome-settings-daemon is not running; it is useful > for media keys, but the warning is harmless otherwise. Ok, makes sense. How about something like the attached patch? Tested by applying, running autoreconf -fi, rebuilding, and installing, then running evince a few times. Regards, Jonathan
From: Jonathan Nieder <jrnie...@gmail.com> Subject: Suppress warning for missing gnome-settings-daemon in evince-gtk When gnome-settings-daemon is not running, evince complains loudly each time it starts up: > > | ** (evince:18101): WARNING **: Failed to create dbus proxy for > > org.gnome.SettingsDaemon: Could not get owner of name > > 'org.gnome.SettingsDaemon': no such name This is appropriate on a GNOME system, where it indicates a configuration error of some kind, but on a non-GNOME system the warning is just annoying. Signed-off-by: Jonathan Nieder <jrnie...@gmail.com> diff -ruN evince-2.26.2.orig/configure.ac evince-2.26.2/configure.ac --- evince-2.26.2.orig/configure.ac 2009-05-18 15:23:19.000000000 -0500 +++ evince-2.26.2/configure.ac 2009-09-21 04:07:40.000000000 -0500 @@ -183,6 +183,17 @@ fi fi +AC_ARG_ENABLE([dbus-warnings], + AC_HELP_STRING([--disable-dbus-warnings], + [Ignore missing dbus name owners at runtime]),, + [enable_dbus_warnings=yes]) + +if test "x$enable_dbus_warnings" = "xno"; then + DBUS_CFLAGS="$DBUS_CFLAGS -DSUPPRESS_DBUS_WARNING=1" +else + DBUS_CFLAGS="$DBUS_CFLAGS -DSUPPRESS_DBUS_WARNING=0" +fi + AC_SUBST([DBUS_CFLAGS]) AC_SUBST([DBUS_LIBS]) diff -ruN evince-2.26.2.orig/debian/rules evince-2.26.2/debian/rules --- evince-2.26.2.orig/debian/rules 2009-09-20 15:25:13.000000000 -0500 +++ evince-2.26.2/debian/rules 2009-09-20 15:26:01.000000000 -0500 @@ -34,6 +34,7 @@ $(cdbs_configure_flags) \ $(DEB_CONFIGURE_EXTRA_FLAGS) \ --without-keyring --without-gconf --disable-nautilus \ + --disable-dbus-warnings \ $(DEB_CONFIGURE_USER_FLAGS) build/evince-gtk:: diff -ruN evince-2.26.2.orig/shell/ev-media-player-keys.c evince-2.26.2/shell/ev-media-player-keys.c --- evince-2.26.2.orig/shell/ev-media-player-keys.c 2009-04-26 05:11:40.000000000 -0500 +++ evince-2.26.2/shell/ev-media-player-keys.c 2009-09-20 15:24:38.000000000 -0500 @@ -138,8 +138,9 @@ dbus_g_connection_unref (connection); if (err != NULL) { - g_warning ("Failed to create dbus proxy for org.gnome.SettingsDaemon: %s", - err->message); + if (!SUPPRESS_DBUS_WARNING) + g_warning ("Failed to create dbus proxy for org.gnome.SettingsDaemon: %s", + err->message); g_error_free (err); if (keys->proxy) {