vino r930 - in trunk: . po server session
- From: jwendell svn gnome org
- To: svn-commits-list gnome org
- Subject: vino r930 - in trunk: . po server session
- Date: Mon, 1 Sep 2008 16:00:56 +0000 (UTC)
Author: jwendell
Date: Mon Sep 1 16:00:55 2008
New Revision: 930
URL: http://svn.gnome.org/viewvc/vino?rev=930&view=rev
Log:
2008-09-01 Jonh Wendell <jwendell gnome org>
Make vino work correctly with new gnome-session:
- Dropped bonobo activation. Vino is controlled by gnome-session.
- Made vino-server a gnome-session client, still using libgnomeui.
- The directory session/ is now obsolete.
* configure.in:
- drop "--enable-session-support";
- bump d-bus dependency to 1.2.3
- drop bonobo stuff
* server/GNOME_RemoteDesktop.idl,
* server/GNOME_RemoteDesktop.server.in.in,
* server/vino-shell.[ch]: Deleted
* server/vino-dbus-listener.[ch] (vino_dbus_request_name):
Returns gboolean instead of void. Returns FALSE if there is another
instance running.
* server/vino-main.c (main): Don't use bonobo shell function. Instead,
use vino_dbus_request_name() to exit if there is already an instance
running.
Added:
trunk/session/README
trunk/session/README.old (props changed)
- copied unchanged from r928, /trunk/session/README
Removed:
trunk/server/GNOME_RemoteDesktop.idl
trunk/server/GNOME_RemoteDesktop.server.in.in
trunk/server/vino-shell.c
trunk/server/vino-shell.h
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/po/POTFILES.in
trunk/server/Makefile.am
trunk/server/vino-dbus-listener.c
trunk/server/vino-dbus-listener.h
trunk/server/vino-main.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Sep 1 16:00:55 2008
@@ -45,10 +45,11 @@
GTK_VERSION=2.13.1
GLIB_VERSION=2.17.0
+DBUS_VERSION=1.2.3
-PKG_CHECK_MODULES(VINO_SERVER, glib-2.0 >= $GLIB_VERSION gtk+-x11-2.0 >= $GTK_VERSION gconf-2.0 libglade-2.0 libbonobo-2.0 dbus-glib-1)
+PKG_CHECK_MODULES(VINO_SERVER, glib-2.0 >= $GLIB_VERSION gtk+-x11-2.0 >= $GTK_VERSION gconf-2.0 libglade-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1 libgnomeui-2.0)
-PKG_CHECK_MODULES(VINO_CAPPLET, glib-2.0 >= $GLIB_VERSION gtk+-2.0 >= $GTK_VERSION gconf-2.0 libglade-2.0 dbus-glib-1)
+PKG_CHECK_MODULES(VINO_CAPPLET, glib-2.0 >= $GLIB_VERSION gtk+-2.0 >= $GTK_VERSION gconf-2.0 libglade-2.0 dbus-1 >= $DBUS_VERSION dbus-glib-1)
PKG_CHECK_MODULES(VINO_TOOLS, glib-2.0 >= $GLIB_VERSION gconf-2.0 gobject-2.0 >= $GLIB_VERSION gnome-keyring-1)
@@ -88,15 +89,6 @@
AC_DEFINE(VINO_ENABLE_KEYRING, [], [Set if we should use gnome-keyring]))
fi
-dnl --enable-session-support=(yes|no)
-AC_ARG_ENABLE(session_support,
- [ --enable-session-support=[no/yes] build session management utility program [default=no]],,
- enable_session_support=no)
-if test "$enable_session_support" = "yes"; then
- PKG_CHECK_MODULES(VINO_SESSION, gconf-2.0 libgnomeui-2.0)
-fi
-AM_CONDITIONAL(SESSION_SUPPORT, [test "$enable_session_support" = "yes"])
-
dnl --enable-http-server=(yes|no)
AC_ARG_ENABLE(http_server,
[ --enable-http-server=[no/yes] enable an HTTP server for serving a Java applet client [default=no]],,
@@ -140,16 +132,6 @@
AC_SUBST(X_LIBS)
#
-# Bonobo foo
-#
-
-ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
-AC_SUBST(ORBIT_IDL)
-
-BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
-AC_SUBST(BONOBO_IDLDIR)
-
-#
# Check for gnutls
#
AC_ARG_ENABLE(gnutls,
@@ -363,7 +345,6 @@
server/libvncserver/Makefile
server/libvncserver/rfb/Makefile
capplet/Makefile
-session/Makefile
tools/Makefile
docs/Makefile
po/Makefile.in
@@ -383,7 +364,6 @@
Avahi support ..............: ${VINO_ENABLE_MDNS}
Notify support .............: ${have_libnotify}
GNOME Keyring support.......: ${enable_gnome_keyring}
- Session support.............: ${enable_session_support}
HTTP server.................: ${enable_http_server}
Libunique support...........: ${have_libunique}
DEBUG messages..............: ${enable_debug}
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Mon Sep 1 16:00:55 2008
@@ -11,7 +11,6 @@
server/vino-server.c
server/vino-server.desktop.in.in
server/vino-server.schemas.in
-server/vino-shell.c
server/vino-status-icon.c
server/vino-util.c
session/vino-session.c
Modified: trunk/server/Makefile.am
==============================================================================
--- trunk/server/Makefile.am (original)
+++ trunk/server/Makefile.am Mon Sep 1 16:00:55 2008
@@ -59,8 +59,6 @@
vino-prompt.h \
vino-server.c \
vino-server.h \
- vino-shell.c \
- vino-shell.h \
vino-util.c \
vino-util.h \
vino-status-icon.c \
@@ -112,30 +110,12 @@
--eprod "GType @enum_name _get_type (void);\n" \
$(vino_enum_headers) > $@
-CORBA_SRCLIST = \
- GNOME_RemoteDesktop-skels.c \
- GNOME_RemoteDesktop-common.c \
- GNOME_RemoteDesktop.h \
- $(NULL)
-
-$(CORBA_SRCLIST): $(top_srcdir)/server/GNOME_RemoteDesktop.idl $(ORBIT_IDL)
- $(ORBIT_IDL) --nostubs -I $(BONOBO_IDLDIR) $(top_srcdir)/server/GNOME_RemoteDesktop.idl
-
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_files = vino-server.schemas.in
schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
-%.server.in: %.server.in.in
- sed -e "s|\ LIBEXECDIR\@|$(libexecdir)|" $< > $@
-
-serverdir = $(libdir)/bonobo/servers
-server_in_files = GNOME_RemoteDesktop.server.in
-server_DATA = $(server_in_files:.server.in=.server)
-
- INTLTOOL_SERVER_RULE@
-
vino-server.desktop.in: vino-server.desktop.in.in
sed -e "s|\ LIBEXECDIR\@|$(libexecdir)|" $< > $@
@@ -163,13 +143,10 @@
vino-prompt.glade \
vino-server.schemas.in \
vino-marshal.list \
- GNOME_RemoteDesktop.server.in.in \
- GNOME_RemoteDesktop.idl \
vino-server.desktop.in.in \
$(NULL)
BUILT_SOURCES = \
- $(CORBA_SRCLIST) \
vino-enums.c \
vino-enums.h \
vino-marshal.c \
@@ -181,8 +158,6 @@
vino-server.desktop.in
DISTCLEANFILES = \
- GNOME_RemoteDesktop.server.in \
- GNOME_RemoteDesktop.server \
$(schemas_DATA) \
$(BUILT_SOURCES) \
$(NULL)
Modified: trunk/server/vino-dbus-listener.c
==============================================================================
--- trunk/server/vino-dbus-listener.c (original)
+++ trunk/server/vino-dbus-listener.c Mon Sep 1 16:00:55 2008
@@ -388,29 +388,40 @@
vino_dbus_connection = NULL;
}
-void
+gboolean
vino_dbus_request_name (void)
{
#define VINO_DBUS_BUS_NAME "org.gnome.Vino"
DBusConnection *connection;
DBusError error;
+ int result;
if (!(connection = vino_dbus_get_connection ()))
- return;
+ return FALSE;
dbus_error_init (&error);
- dbus_bus_request_name (connection, VINO_DBUS_BUS_NAME, 0, &error);
+ result = dbus_bus_request_name (connection,
+ VINO_DBUS_BUS_NAME,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE,
+ &error);
if (dbus_error_is_set (&error))
{
g_printerr (_("Failed to acquire D-Bus name '%s'\n"),
error.message);
dbus_error_free (&error);
- return;
+ return FALSE;
+ }
+
+ if (result == DBUS_REQUEST_NAME_REPLY_EXISTS)
+ {
+ g_warning (_("Remote Desktop server already running; exiting ...\n"));
+ return FALSE;
}
dprintf (DBUS, "Successfully acquired D-Bus name '%s'\n", VINO_DBUS_BUS_NAME);
+ return TRUE;
#undef VINO_DBUS_BUS_NAME
}
Modified: trunk/server/vino-dbus-listener.h
==============================================================================
--- trunk/server/vino-dbus-listener.h (original)
+++ trunk/server/vino-dbus-listener.h Mon Sep 1 16:00:55 2008
@@ -72,7 +72,7 @@
DBusConnection *vino_dbus_get_connection (void);
void vino_dbus_unref_connection (void);
-void vino_dbus_request_name (void);
+gboolean vino_dbus_request_name (void);
G_END_DECLS
Modified: trunk/server/vino-main.c
==============================================================================
--- trunk/server/vino-main.c (original)
+++ trunk/server/vino-main.c Mon Sep 1 16:00:55 2008
@@ -18,6 +18,7 @@
*
* Authors:
* Mark McLoughlin <mark skynet ie>
+ * Jonh Wendell <wendell bani com br>
*/
#include <config.h>
@@ -27,10 +28,11 @@
#include "vino-input.h"
#include "vino-mdns.h"
#include "vino-server.h"
-#include "vino-shell.h"
#include "vino-prefs.h"
#include "vino-util.h"
#include "vino-dbus-listener.h"
+#include <libgnome/libgnome.h>
+#include <libgnomeui/libgnomeui.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
@@ -51,12 +53,25 @@
GdkDisplay *display;
gboolean view_only;
int i, n_screens;
+ GnomeClient *session;
+ char *restart_argv [] = { *argv, 0 };
bindtextdomain (GETTEXT_PACKAGE, VINO_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- gtk_init (&argc, &argv);
+ gnome_program_init ("vino", VERSION,
+ LIBGNOMEUI_MODULE,
+ argc, argv,
+ NULL);
+
+ session = gnome_master_client ();
+
+ gnome_client_set_restart_command (session, 2, restart_argv);
+ gnome_client_set_restart_style (session, GNOME_RESTART_IMMEDIATELY);
+ gnome_client_set_priority (session, 5);
+ g_signal_connect (session, "die",
+ G_CALLBACK (gtk_main_quit), NULL);
vino_setup_debug_flags ();
@@ -73,7 +88,7 @@
gtk_window_set_default_icon_name ("preferences-desktop-remote-desktop");
g_set_application_name (_("GNOME Remote Desktop"));
- if (!vino_shell_register (&argc, argv))
+ if (!vino_dbus_request_name ())
return 1;
display = gdk_display_get_default ();
@@ -92,8 +107,6 @@
for (i = 0; i < n_screens; i++)
vino_prefs_create_server (gdk_display_get_screen (display, i));
- vino_dbus_request_name ();
-
gtk_main ();
vino_mdns_shutdown ();
Added: trunk/session/README
==============================================================================
--- (empty file)
+++ trunk/session/README Mon Sep 1 16:00:55 2008
@@ -0,0 +1,3 @@
+This directory is obsolete.
+
+Jonh Wendell, 2008-08-29
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]