[Spice-devel] [PATCH spice-gtk 2/4] Add a desktop-integration helper class

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jun 22 02:06:08 PDT 2012


Hi

On Thu, Jun 21, 2012 at 10:09 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> +
> +AC_ARG_ENABLE([dbus],
> +  AS_HELP_STRING([--enable-dbus=@<:@auto/yes/no@:>@],
> +                 [Enable dbus support for desktop integration (disabling automount) @<:@default=auto@:>@]),
> +  [],
> +  [enable_dbus="auto"])

It would be more reliable to have a --with-desktop=<gnome/none> and
checking all the needed dependencies.

+void spice_desktop_integration_inhibit_automount(SpiceDesktopIntegration *self,
+                                                 guint toplevel_window_id)
+{
+#ifdef USE_DBUS
+    gnome_integration_inhibit_automount(self, toplevel_window_id);
+#endif
+}


Because this will need to be updated as soon as USE_DBUS is used for
something else, and also, calling this function when !USE_DBUS will
just be silent and do nothing. We should at least add a SPICE_DEBUG if
nothing is done there.

it might be cleaner to define a base class and derive it for the
various desktops, but we can do that later.

> +if test "x$enable_dbus" != "xno"; then
> +  PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1],

Since we are targetting GNOME3 with those changes, we shouldn't use
dbus-glib which has been deprecated for a while in favour of gdbus

Finally, I think the GData list isn't very appropriate structure for
mapping int -> pointer, why not use a hashtable? My understanding of
this logic could also be made with a refcount.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list