calendar: Drop unnecessary libedataserverui dependency

The libedataserverui dependency is a relic of the old E-D-S API.
As of 3.6.0, E-D-S now centralizes authentication prompts so clients
don't have to display their own.  This also allows trading the GTK+
main loop for a plain GMainLoop in gnome-shell-calendar-server.c.

https://bugzilla.gnome.org/show_bug.cgi?id=687189

(cherry picked from commit 29714922ea)
This commit is contained in:
Matthew Barnes 2012-10-30 13:42:43 -04:00
parent 8ca914638e
commit eb3b68a4d1
3 changed files with 22 additions and 15 deletions

View File

@ -139,7 +139,7 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
AC_SUBST([HAVE_BLUETOOTH],[0])
AC_MSG_RESULT([no])])
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)

View File

@ -31,7 +31,6 @@
#include <string.h>
#define HANDLE_LIBICAL_MEMORY
#include <libecal/libecal.h>
#include <libedataserverui/libedataserverui.h>
#undef CALENDAR_ENABLE_DEBUG
#include "calendar-debug.h"

View File

@ -34,7 +34,6 @@
#include <unistd.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#define HANDLE_LIBICAL_MEMORY
#include <libecal/libecal.h>
@ -985,9 +984,11 @@ on_name_lost (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
GMainLoop *main_loop = user_data;
g_print ("gnome-shell-calendar-server[%d]: Lost (or failed to acquire) the name " BUS_NAME " - exiting\n",
(gint) getpid ());
gtk_main_quit ();
g_main_loop_quit (main_loop);
}
static void
@ -1003,11 +1004,13 @@ stdin_channel_io_func (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
GMainLoop *main_loop = data;
if (condition & G_IO_HUP)
{
g_debug ("gnome-shell-calendar-server[%d]: Got HUP on stdin - exiting\n",
(gint) getpid ());
gtk_main_quit ();
g_main_loop_quit (main_loop);
}
else
{
@ -1022,6 +1025,7 @@ main (int argc,
{
GError *error;
GOptionContext *opt_context;
GMainLoop *main_loop;
gint ret;
guint name_owner_id;
GIOChannel *stdin_channel;
@ -1031,9 +1035,7 @@ main (int argc,
name_owner_id = 0;
stdin_channel = NULL;
/* We need to initialize GTK+ since evolution-data-server may decide to use
* GTK+ to pop up a dialog box */
gtk_init (&argc, &argv);
g_type_init ();
introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL);
g_assert (introspection_data != NULL);
@ -1048,11 +1050,15 @@ main (int argc,
goto out;
}
main_loop = g_main_loop_new (NULL, FALSE);
stdin_channel = g_io_channel_unix_new (STDIN_FILENO);
g_io_add_watch (stdin_channel,
g_io_add_watch_full (stdin_channel,
G_PRIORITY_DEFAULT,
G_IO_HUP,
stdin_channel_io_func,
NULL);
g_main_loop_ref (main_loop),
(GDestroyNotify) g_main_loop_unref);
name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
BUS_NAME,
@ -1061,10 +1067,12 @@ main (int argc,
on_bus_acquired,
on_name_acquired,
on_name_lost,
NULL,
NULL);
g_main_loop_ref (main_loop),
(GDestroyNotify) g_main_loop_unref);
gtk_main ();
g_main_loop_run (main_loop);
g_main_loop_unref (main_loop);
ret = 0;