summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-29 11:46:58 +0100
committerinfirit <[email protected]>2014-12-29 11:46:58 +0100
commit5b4e98dbe0ce1cd9c108b1a69810aac61a5c96fc (patch)
tree09fa4e479d0f574f6db0c794321ccb70d9f791ff
parent1690e1b22e5617dc1ab4d00822547a5d798ad399 (diff)
downloadcaja-5b4e98dbe0ce1cd9c108b1a69810aac61a5c96fc.tar.bz2
caja-5b4e98dbe0ce1cd9c108b1a69810aac61a5c96fc.tar.xz
Revert "dbus-manager: add a skeleton of NautilusDBusManager"
This reverts commit 08bc0644ebc869ff1db320cc2bdfc4a471a6f9ac.
-rw-r--r--libcaja-private/Makefile.am2
-rw-r--r--libcaja-private/caja-dbus-manager.c171
-rw-r--r--libcaja-private/caja-dbus-manager.h10
-rw-r--r--src/caja-application.c5
4 files changed, 0 insertions, 188 deletions
diff --git a/libcaja-private/Makefile.am b/libcaja-private/Makefile.am
index 114c15b2..4e7b10f9 100644
--- a/libcaja-private/Makefile.am
+++ b/libcaja-private/Makefile.am
@@ -56,8 +56,6 @@ libcaja_private_la_SOURCES = \
caja-column-chooser.h \
caja-column-utilities.c \
caja-column-utilities.h \
- caja-dbus-manager.c \
- caja-dbus-manager.h \
caja-customization-data.c \
caja-customization-data.h \
caja-debug-log.c \
diff --git a/libcaja-private/caja-dbus-manager.c b/libcaja-private/caja-dbus-manager.c
deleted file mode 100644
index 1c683dff..00000000
--- a/libcaja-private/caja-dbus-manager.c
+++ /dev/null
@@ -1,171 +0,0 @@
-#include <config.h>
-
-#include "caja-dbus-manager.h"
-
-#include <gio/gio.h>
-
-static const gchar introspection_xml[] =
- "<node>"
- " <interface name='org.mate.caja.FileOperations'>"
- " <method name='CopyURIs'>"
- " <arg type='as' name='URIList' direction='in'/>"
- " <arg type='s' name='Destination' direction='in'/>"
- " </method>"
- " </interface>"
- "</node>";
-
-typedef struct _CajaDBusManager CajaDBusManager;
-typedef struct _CajaDBusManagerClass CajaDBusManagerClass;
-
-struct _CajaDBusManager {
- GObject parent;
-
- GDBusConnection *connection;
-
- guint owner_id;
- guint registration_id;
-};
-
-struct _CajaDBusManagerClass {
- GObjectClass parent_class;
-};
-
-static GType caja_dbus_manager_get_type (void) G_GNUC_CONST;
-G_DEFINE_TYPE (CajaDBusManager, caja_dbus_manager, G_TYPE_OBJECT);
-
-static CajaDBusManager *singleton = NULL;
-
-static void
-caja_dbus_manager_dispose (GObject *object)
-{
- CajaDBusManager *self = (CajaDBusManager *) object;
-
- if (self->registration_id != 0)
- {
- g_dbus_connection_unregister_object (self->connection, self->registration_id);
- self->registration_id = 0;
- }
-
- if (self->owner_id != 0)
- {
- g_bus_unown_name (self->owner_id);
- self->owner_id = 0;
- }
-
- g_clear_object (&self->connection);
-
- G_OBJECT_CLASS (caja_dbus_manager_parent_class)->dispose (object);
-}
-
-static void
-caja_dbus_manager_class_init (CajaDBusManagerClass *klass)
-{
- GObjectClass *oclass = G_OBJECT_CLASS (klass);
-
- oclass->dispose = caja_dbus_manager_dispose;
-}
-
-static void
-handle_method_call (GDBusConnection *connection,
- const gchar *sender,
- const gchar *object_path,
- const gchar *interface_name,
- const gchar *method_name,
- GVariant *parameters,
- GDBusMethodInvocation *invocation,
- gpointer user_data)
-{
- const gchar **uris = NULL;
- const gchar *destination_uri = NULL;
-
- if (g_strcmp0 (method_name, "CopyURIs") == 0)
- {
- g_variant_get (parameters, "(^a&s&s)", &uris, &destination_uri);
-
- g_print ("Called CopyURIs with dest %s and uri %s\n", destination_uri, uris[0]);
- }
-
- g_dbus_method_invocation_return_value (invocation, NULL);
-}
-
-static const GDBusInterfaceVTable interface_vtable =
-{
- handle_method_call,
- NULL,
- NULL,
-};
-
-static void
-name_acquired_cb (GDBusConnection *conn,
- const gchar *name,
- gpointer user_data)
-{
- CajaDBusManager *self = user_data;
- GDBusNodeInfo *introspection_data;
- GError *error = NULL;
-
- self->connection = g_object_ref (conn);
- introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, &error);
-
- if (error != NULL)
- {
- g_warning ("Error parsing the FileOperations XML interface: %s", error->message);
- g_error_free (error);
-
- g_bus_unown_name (self->owner_id);
- self->owner_id = 0;
-
- return;
- }
-
- self->registration_id = g_dbus_connection_register_object (conn,
- "/org/mate/caja",
- introspection_data->interfaces[0],
- &interface_vtable,
- self,
- NULL, &error);
-
- if (error != NULL)
- {
- g_warning ("Error registering the FileOperations proxy on the bus: %s", error->message);
- g_error_free (error);
-
- g_bus_unown_name (self->owner_id);
-
- return;
- }
-}
-
-static void
-name_lost_cb (GDBusConnection *conn,
- const gchar *name,
- gpointer user_data)
-{
-
-}
-
-static void
-caja_dbus_manager_init (CajaDBusManager *self)
-{
- self->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION,
- "org.mate.caja",
- G_BUS_NAME_OWNER_FLAGS_NONE,
- NULL,
- name_acquired_cb,
- name_lost_cb,
- self,
- NULL);
-}
-
-void
-caja_dbus_manager_start (void)
-{
- singleton = g_object_new (caja_dbus_manager_get_type (),
- NULL);
-}
-
-void
-caja_dbus_manager_stop (void)
-{
- g_clear_object (&singleton);
-}
diff --git a/libcaja-private/caja-dbus-manager.h b/libcaja-private/caja-dbus-manager.h
deleted file mode 100644
index 0dc79735..00000000
--- a/libcaja-private/caja-dbus-manager.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#ifndef __CAJA_DBUS_MANAGER_H__
-#define __CAJA_DBUS_MANAGER_H__
-
-#include <glib-object.h>
-
-void caja_dbus_manager_start (void);
-void caja_dbus_manager_stop (void);
-
-#endif /* __CAJA_DBUS_MANAGER_H__ */
diff --git a/src/caja-application.c b/src/caja-application.c
index 9ab39f8c..b7199725 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -66,7 +66,6 @@
#include <eel/eel-stock-dialogs.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <libcaja-private/caja-dbus-manager.h>
#include <libcaja-private/caja-debug-log.h>
#include <libcaja-private/caja-file-utilities.h>
#include <libcaja-private/caja-global-preferences.h>
@@ -375,8 +374,6 @@ caja_application_finalize (GObject *object)
fdb_manager = NULL;
}
- caja_dbus_manager_stop ();
-
G_OBJECT_CLASS (caja_application_parent_class)->finalize (object);
}
@@ -929,8 +926,6 @@ caja_application_startup (CajaApplication *application,
g_free (accel_map_filename);
}
g_signal_connect (gtk_accel_map_get (), "changed", G_CALLBACK (queue_accel_map_save_callback), NULL);
-
- caja_dbus_manager_start ();
}
}