summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2006-07-14 16:20:12 +0000
committerJohn (J5) Palmieri <johnp@redhat.com>2006-07-14 16:20:12 +0000
commita929c9a3b465db8b7e17b9b39936c612c2621a7c (patch)
treed1764257d1bd56f8e6a044516ccfc9bc44f7f9f5 /tools
parent5efe8e7f1d97931710558495a951e0b35afbfb72 (diff)
* Remove all bindings
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am39
-rw-r--r--tools/dbus-names-model.c388
-rw-r--r--tools/dbus-names-model.h31
-rw-r--r--tools/dbus-tree-view.c374
-rw-r--r--tools/dbus-tree-view.h36
5 files changed, 3 insertions, 865 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5cd96c55..e653dea3 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,29 +1,6 @@
-INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS) $(DBUS_GTK_THREADS_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION
+INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_X_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION
-if HAVE_GLIB
-
-nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
-libdbus_glibdir = $(includedir)/dbus-1.0/dbus
-
-dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/glib/dbus-binding-tool$(EXEEXT)
- $(top_builddir)/glib/dbus-binding-tool --mode=glib-client --output=dbus-glib-bindings.h dbus-bus-introspect.xml
-
-BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
-
-endif
-
-if HAVE_GTK
-GTK_TOOLS=dbus-viewer
-else
-GTK_TOOLS=
-endif
-
-if HAVE_GLIB
-dbus-bus-introspect.xml: $(top_builddir)/bus/dbus-daemon$(EXEEXT) dbus-launch$(EXEEXT) dbus-send$(EXEEXT) $(top_builddir)/bus/dbus-daemon$(EXEEXT) Makefile
- DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./dbus-send --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
-endif
-
-bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets $(GTK_TOOLS)
+bin_PROGRAMS=dbus-send dbus-monitor dbus-launch dbus-cleanup-sockets
dbus_send_SOURCES= \
dbus-print-message.c \
@@ -41,21 +18,11 @@ dbus_launch_SOURCES= \
dbus_cleanup_sockets_SOURCES= \
dbus-cleanup-sockets.c
-dbus_viewer_SOURCES= \
- dbus-names-model.c \
- dbus-names-model.h \
- dbus-tree-view.c \
- dbus-tree-view.h \
- dbus-viewer.c
-
dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
dbus_monitor_LDADD= $(top_builddir)/dbus/libdbus-1.la
dbus_launch_LDADD= $(DBUS_X_LIBS)
-dbus_viewer_LDADD= $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_THREADS_LIBS) $(DBUS_GLIB_TOOL_LIBS)
man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1
EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh
CLEANFILES = \
- run-with-tmp-session-bus.conf \
- dbus-bus-introspect.xml \
- dbus-glib-bindings.h
+ run-with-tmp-session-bus.conf
diff --git a/tools/dbus-names-model.c b/tools/dbus-names-model.c
deleted file mode 100644
index 65faa1b4..00000000
--- a/tools/dbus-names-model.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
-/* dbus-names-model.c GtkTreeModel for names on the bus
- *
- * Copyright (C) 2005 Red Hat, Inc.
- *
- * Licensed under the Academic Free License version 2.1
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#include "dbus-names-model.h"
-#include <glib/gi18n.h>
-#include <string.h>
-#include <dbus/dbus-protocol.h>
-
-enum
-{
- MODEL_COLUMN_NAME,
-
- MODEL_COLUMN_LAST
-};
-
-
-typedef struct NamesModel NamesModel;
-typedef struct NamesModelClass NamesModelClass;
-
-GType names_model_get_type (void);
-
-struct NamesModel
-{
- GtkListStore parent;
- DBusGConnection *connection;
- DBusGProxy *driver_proxy;
- DBusGProxyCall *pending_list_names;
-};
-
-struct NamesModelClass
-{
- GtkListStoreClass parent;
-};
-
-#define TYPE_NAMES_MODEL (names_model_get_type ())
-#define NAMES_MODEL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TYPE_NAMES_MODEL, NamesModel))
-#define NAMES_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_NAMES_MODEL, NamesModelClass))
-#define IS_NAMES_MODEL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TYPE_NAMES_MODEL))
-#define IS_NAMES_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_NAMES_MODEL))
-#define NAMES_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_NAMES_MODEL, NamesModelClass))
-
-static void
-have_names_notify (DBusGProxy *proxy,
- DBusGProxyCall *call,
- void *data)
-{
- NamesModel *names_model;
- GError *error;
- char **names;
- int i;
-
- names_model = NAMES_MODEL (data);
-
- g_assert (names_model->pending_list_names == call);
- g_assert (names_model->driver_proxy);
-
- names = NULL;
- error = NULL;
- if (!dbus_g_proxy_end_call (names_model->driver_proxy,
- names_model->pending_list_names,
- &error,
- G_TYPE_STRV, &names, G_TYPE_INVALID))
- {
- g_assert (names == NULL);
- g_assert (error != NULL);
-
- g_printerr (_("Failed to load names on the bus: %s\n"), error->message);
- g_error_free (error);
- return;
- }
-
- i = 0;
- while (names[i])
- {
- GtkTreeIter iter;
-
-#if 0
- g_printerr ("%d of %d: %s\n",
- i, n_elements, names[i]);
-#endif
-
- gtk_list_store_append (GTK_LIST_STORE (names_model),
- &iter);
-
- gtk_list_store_set (GTK_LIST_STORE (names_model),
- &iter,
- MODEL_COLUMN_NAME, names[i],
- -1);
-
- ++i;
- }
-
- g_strfreev (names);
-}
-
-static gboolean
-names_model_find_name (NamesModel *names_model,
- const char *name,
- GtkTreeIter *iter_p)
-{
- GtkTreeIter iter;
-
- if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (names_model),
- &iter))
- return FALSE;
-
- do
- {
- char *s;
-
- gtk_tree_model_get (GTK_TREE_MODEL (names_model),
- &iter,
- MODEL_COLUMN_NAME, &s,
- -1);
- if (s && strcmp (s, name) == 0)
- {
- *iter_p = iter;
- g_free (s);
- return TRUE;
- }
-
- g_free (s);
- }
- while (gtk_tree_model_iter_next (GTK_TREE_MODEL (names_model),
- &iter));
-
- return FALSE;
-}
-
-static void
-name_owner_changed (DBusGProxy *driver_proxy,
- const char *name,
- const char *old_owner,
- const char *new_owner,
- void *data)
-{
- NamesModel *names_model = NAMES_MODEL (data);
-
-#if 0
- g_printerr ("Name '%s' changed owner '%s' -> '%s'\n",
- name, old_owner, new_owner);
-#endif
-
- if (*new_owner == '\0')
- {
- /* this name has vanished */
- GtkTreeIter iter;
-
- if (names_model_find_name (names_model, name, &iter))
- gtk_list_store_remove (GTK_LIST_STORE (names_model),
- &iter);
- }
- else if (*old_owner == '\0')
- {
- /* this name has been added */
- GtkTreeIter iter;
-
- if (!names_model_find_name (names_model, name, &iter))
- {
- gtk_list_store_append (GTK_LIST_STORE (names_model),
- &iter);
-
- gtk_list_store_set (GTK_LIST_STORE (names_model),
- &iter,
- MODEL_COLUMN_NAME, name,
- -1);
- }
- }
-}
-
-static void
-names_model_reload (NamesModel *names_model)
-{
- GtkListStore *list_store;
-
- list_store = GTK_LIST_STORE (names_model);
-
- if (names_model->pending_list_names)
- {
- dbus_g_proxy_cancel_call (names_model->driver_proxy,
- names_model->pending_list_names);
- names_model->pending_list_names = NULL;
- }
-
- gtk_list_store_clear (list_store);
-
- if (names_model->connection == NULL)
- return;
-
- names_model->pending_list_names =
- dbus_g_proxy_begin_call (names_model->driver_proxy,
- "ListNames",
- have_names_notify, names_model, NULL,
- G_TYPE_INVALID);
-}
-
-static void
-names_model_set_connection (NamesModel *names_model,
- DBusGConnection *connection)
-{
- g_return_if_fail (IS_NAMES_MODEL (names_model));
-
- if (connection == names_model->connection)
- return;
-
- if (names_model->connection)
- {
- dbus_g_proxy_disconnect_signal (names_model->driver_proxy,
- "NameOwnerChanged",
- G_CALLBACK (name_owner_changed),
- names_model);
-
- g_object_unref (names_model->driver_proxy);
- names_model->driver_proxy = NULL;
- dbus_g_connection_unref (names_model->connection);
- names_model->connection = NULL;
- }
-
- if (connection)
- {
- names_model->connection = connection;
- dbus_g_connection_ref (names_model->connection);
-
- names_model->driver_proxy =
- dbus_g_proxy_new_for_name (names_model->connection,
- DBUS_SERVICE_DBUS,
- DBUS_PATH_DBUS,
- DBUS_INTERFACE_DBUS);
- g_assert (names_model->driver_proxy);
-
- dbus_g_proxy_add_signal (names_model->driver_proxy,
- "NameOwnerChanged",
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_STRING,
- G_TYPE_INVALID);
-
- dbus_g_proxy_connect_signal (names_model->driver_proxy,
- "NameOwnerChanged",
- G_CALLBACK (name_owner_changed),
- names_model,
- NULL);
- }
-
- names_model_reload (names_model);
-}
-
-G_DEFINE_TYPE(NamesModel, names_model, GTK_TYPE_LIST_STORE)
-
-/* Properties */
-enum
-{
- PROP_0,
- PROP_CONNECTION
-};
-
-static void
-names_model_dispose (GObject *object)
-{
- NamesModel *names_model = NAMES_MODEL (object);
-
- names_model_set_connection (names_model, NULL);
-
- g_assert (names_model->connection == NULL);
- g_assert (names_model->driver_proxy == NULL);
- g_assert (names_model->pending_list_names == NULL);
-
- (G_OBJECT_CLASS (names_model_parent_class)->dispose) (object);
-}
-
-static void
-names_model_finalize (GObject *object)
-{
- NamesModel *names_model = NAMES_MODEL (object);
-
- g_assert (names_model->connection == NULL);
- g_assert (names_model->driver_proxy == NULL);
- g_assert (names_model->pending_list_names == NULL);
-
- (G_OBJECT_CLASS (names_model_parent_class)->finalize) (object);
-}
-
-static void
-names_model_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- NamesModel *names_model;
-
- names_model = NAMES_MODEL (object);
-
- switch (prop_id)
- {
- case PROP_CONNECTION:
- names_model_set_connection (names_model, g_value_get_boxed (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-names_model_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- NamesModel *names_model;
-
- names_model = NAMES_MODEL (object);
-
- switch (prop_id)
- {
- case PROP_CONNECTION:
- g_value_set_boxed (value, names_model->connection);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-names_model_init (NamesModel *names_model)
-{
- GtkListStore *list_store;
- GType types[MODEL_COLUMN_LAST];
-
- list_store = GTK_LIST_STORE (names_model);
-
- types[0] = G_TYPE_STRING; /* name */
- gtk_list_store_set_column_types (list_store, MODEL_COLUMN_LAST, types);
-}
-
-static void
-names_model_class_init (NamesModelClass *names_model_class)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (names_model_class);
-
- gobject_class->finalize = names_model_finalize;
- gobject_class->dispose = names_model_dispose;
- gobject_class->set_property = names_model_set_property;
- gobject_class->get_property = names_model_get_property;
-
- g_object_class_install_property (gobject_class,
- PROP_CONNECTION,
- g_param_spec_boxed ("connection",
- _("Bus connection"),
- _("Connection to the message bus"),
- DBUS_TYPE_G_CONNECTION,
- G_PARAM_READWRITE));
-}
-
-GtkTreeModel*
-names_model_new (DBusGConnection *connection)
-{
- NamesModel *names_model;
-
- names_model = g_object_new (TYPE_NAMES_MODEL,
- "connection", connection,
- NULL);
-
- return GTK_TREE_MODEL (names_model);
-}
-
diff --git a/tools/dbus-names-model.h b/tools/dbus-names-model.h
deleted file mode 100644
index c2b54fc8..00000000
--- a/tools/dbus-names-model.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
-/* dbus-names-model.h GtkTreeModel for names on the bus
- *
- * Copyright (C) 2005 Red Hat, Inc.
- *
- * Licensed under the Academic Free License version 2.1
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef DBUS_NAMES_MODEL_H
-#define DBUS_NAMES_MODEL_H
-
-#include <gtk/gtk.h>
-#include <dbus/dbus-glib.h>
-
-GtkTreeModel* names_model_new (DBusGConnection *connection);
-
-#endif /* DBUS_NAMES_MODEL_H */
diff --git a/tools/dbus-tree-view.c b/tools/dbus-tree-view.c
deleted file mode 100644
index 448d770d..00000000
--- a/tools/dbus-tree-view.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
-/* dbus-tree-view.c GtkTreeView for a D-BUS interface description
- *
- * Copyright (C) 2003 Red Hat, Inc.
- *
- * Licensed under the Academic Free License version 2.1
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#include <string.h>
-#include <config.h>
-#include "dbus-tree-view.h"
-#include <glib/gi18n.h>
-
-enum
-{
- MODEL_COLUMN_INFO,
-
- MODEL_COLUMN_LAST
-};
-
-enum
-{
- VIEW_COLUMN_NAME,
-
- VIEW_COLUMN_LAST
-};
-
-/* We stuff the node tree into a GtkTreeStore, rather
- * than bothering to write a custom model
- */
-static GtkTreeModel*
-model_new (void)
-{
- GtkTreeModel *model;
- GtkTreeStore *store;
-
- store = gtk_tree_store_new (MODEL_COLUMN_LAST,
- BASE_INFO_TYPE);
-
- model = GTK_TREE_MODEL (store);
-
- return model;
-}
-
-static void set_info (GtkTreeModel *model,
- GtkTreeIter *root,
- BaseInfo *info);
-
-static void
-append_child_list (GtkTreeModel *model,
- GtkTreeIter *parent,
- GSList *children)
-{
- GSList *tmp;
- GtkTreeStore *store;
-
- store = GTK_TREE_STORE (model);
-
- /* parent may be NULL for root */
-
- tmp = children;
- while (tmp != NULL)
- {
- GtkTreeIter iter;
-
- gtk_tree_store_append (store, &iter, parent);
-
- set_info (model, &iter, tmp->data);
-
- tmp = tmp->next;
- }
-}
-
-static void
-set_info (GtkTreeModel *model,
- GtkTreeIter *root,
- BaseInfo *info)
-{
- GtkTreeStore *store;
- GtkTreeIter child;
-
- store = GTK_TREE_STORE (model);
-
- /* Remeber that root is NULL for "/" path */
-
- /* Clear existing children */
- while (gtk_tree_model_iter_children (model, &child, root))
- gtk_tree_store_remove (store, &child);
-
- /* Set our new value; we simply discard NodeInfo for "/" at the
- * moment.
- */
- if (root != NULL)
- {
- gtk_tree_store_set (store, root,
- MODEL_COLUMN_INFO, info,
- -1);
- }
-
- /* Fill in new children */
- switch (base_info_get_type (info))
- {
- case INFO_TYPE_NODE:
- append_child_list (model, root,
- node_info_get_interfaces ((NodeInfo*)info));
- append_child_list (model, root,
- node_info_get_nodes ((NodeInfo*)info));
- break;
- case INFO_TYPE_INTERFACE:
- append_child_list (model, root,
- interface_info_get_methods ((InterfaceInfo*)info));
- append_child_list (model, root,
- interface_info_get_signals ((InterfaceInfo*)info));
- append_child_list (model, root,
- interface_info_get_properties ((InterfaceInfo*)info));
- break;
- case INFO_TYPE_METHOD:
- append_child_list (model, root,
- method_info_get_args ((MethodInfo*)info));
- break;
- case INFO_TYPE_SIGNAL:
- append_child_list (model, root,
- signal_info_get_args ((SignalInfo*)info));
- break;
- case INFO_TYPE_PROPERTY:
- /* no children */
- break;
- case INFO_TYPE_ARG:
- /* no children */
- break;
- }
-}
-
-static void
-ensure_tree_node (GtkTreeModel *model,
- const char **path,
- GtkTreeIter *iter)
-{
- GtkTreeStore *store;
- int i;
- GtkTreeIter child;
- GtkTreeIter *parent;
- GtkTreeIter prev;
-
- store = GTK_TREE_STORE (model);
-
- /* The path[0] == NULL case for path "/" can't happen since no tree
- * node is created for that
- */
- g_assert (path[0] != NULL);
-
- parent = NULL;
-
- i = 0;
- while (path[i] != NULL)
- {
- gboolean found;
-
- found = FALSE;
-
- if (gtk_tree_model_iter_children (model, &child, parent))
- {
- /* Scan for the right path */
- do
- {
- BaseInfo *info;
-
- info = NULL;
- gtk_tree_model_get (model, &child,
- MODEL_COLUMN_INFO, &info,
- -1);
-
- if (info != NULL &&
- base_info_get_type (info) == INFO_TYPE_NODE &&
- strcmp (base_info_get_name (info), path[i]) == 0)
- {
- /* Found it */
- found = TRUE;
- break;
- }
- }
- while (gtk_tree_model_iter_next (model, &child));
- }
-
- if (!found)
- {
- NodeInfo *node;
-
- node = node_info_new (path[i]);
-
- gtk_tree_store_append (store, &child, parent);
- gtk_tree_store_set (store, &child,
- MODEL_COLUMN_INFO, node,
- -1);
- }
-
- prev = child;
- parent = &prev;
-
- ++i;
- }
-
- g_assert (parent == &prev);
- *iter = prev;
-}
-
-static void
-model_update (GtkTreeModel *model,
- const char **path,
- NodeInfo *node)
-{
- if (path[0] == NULL)
- {
- /* Setting '/' */
-
- set_info (model, NULL, (BaseInfo*) node);
- }
- else
- {
- GtkTreeIter iter;
- BaseInfo *old;
-
- /* Be sure we have the parent node */
- ensure_tree_node (model, path, &iter);
-
- /* Force the canonical relative path name on the node */
- old = NULL;
- gtk_tree_model_get (model, &iter,
- MODEL_COLUMN_INFO, &old,
- -1);
- base_info_set_name ((BaseInfo*) node,
- base_info_get_name (old));
-
- /* Fill in the new children */
- set_info (model, &iter, (BaseInfo*) node);
- }
-}
-
-static void
-info_set_func_text (GtkTreeViewColumn *tree_column,
- GtkCellRenderer *cell,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data)
-{
- BaseInfo *info;
- GString *str;
-
- info = NULL;
- gtk_tree_model_get (model, iter,
- MODEL_COLUMN_INFO, &info,
- -1);
-
- if (info == NULL)
- return;
-
- str = g_string_new (NULL);
-
- switch (base_info_get_type (info))
- {
- case INFO_TYPE_NODE:
- g_string_append (str, "<i>path</i>");
- break;
- case INFO_TYPE_INTERFACE:
- g_string_append (str, "<i>interface</i>");
- break;
- case INFO_TYPE_METHOD:
- g_string_append (str, "<i>method</i>");
- break;
- case INFO_TYPE_SIGNAL:
- g_string_append (str, "<i>signal</i>");
- break;
- case INFO_TYPE_PROPERTY:
- g_string_append (str, "<i>property</i>");
- g_string_append_printf (str, " <b>%s</b>",
- property_info_get_type ((PropertyInfo*)info));
- break;
- case INFO_TYPE_ARG:
- g_string_append_printf (str, "<i>arg</i> %s",
- arg_info_get_direction ((ArgInfo*)info) == ARG_IN ?
- "in" : "out");
- g_string_append_printf (str, " <b>%s</b>",
- arg_info_get_type ((ArgInfo*)info));
- break;
- }
-
- g_string_append (str, " ");
- g_string_append (str, base_info_get_name (info));
-
- g_object_set (GTK_CELL_RENDERER (cell),
- "markup", str->str,
- NULL);
-
- g_string_free (str, TRUE);
-
- /* base_info_unref (info); */
-}
-
-GtkWidget*
-dbus_tree_view_new (void)
-{
- GtkWidget *treeview;
- GtkCellRenderer *cell_renderer;
- GtkTreeViewColumn *column;
-
- treeview = gtk_tree_view_new ();
-
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Name"));
-
- cell_renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column,
- cell_renderer,
- TRUE);
- gtk_tree_view_column_set_cell_data_func (column, cell_renderer,
- info_set_func_text, NULL, NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeview),
- column);
-
- return treeview;
-}
-
-void
-dbus_tree_view_update (GtkTreeView *view,
- const char **path,
- NodeInfo *node)
-{
- GtkTreeModel *model;
-
- g_return_if_fail (GTK_IS_TREE_VIEW (view));
-
- model = gtk_tree_view_get_model (view);
-
- if (model == NULL)
- {
- model = model_new ();
- model_update (model, path, node);
- gtk_tree_view_set_model (view, model);
- g_object_unref (G_OBJECT (model));
- }
- else
- {
- model_update (model, path, node);
- }
-}
-
-void
-dbus_tree_view_clear (GtkTreeView *view)
-{
- GtkTreeModel *model;
-
- g_return_if_fail (GTK_IS_TREE_VIEW (view));
-
- model = gtk_tree_view_get_model (view);
-
- if (model != NULL)
- gtk_tree_store_clear (GTK_TREE_STORE (model));
-}
-
diff --git a/tools/dbus-tree-view.h b/tools/dbus-tree-view.h
deleted file mode 100644
index e0b82e24..00000000
--- a/tools/dbus-tree-view.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu" -*- */
-/* dbus-tree-view.h GtkTreeView for a D-BUS interface description
- *
- * Copyright (C) 2003 Red Hat, Inc.
- *
- * Licensed under the Academic Free License version 2.1
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef DBUS_TREE_VIEW_H
-#define DBUS_TREE_VIEW_H
-
-#include <gtk/gtk.h>
-#include <dbus/dbus-glib.h>
-#include <glib/dbus-gidl.h>
-
-GtkWidget* dbus_tree_view_new (void);
-void dbus_tree_view_update (GtkTreeView *view,
- const char **path,
- NodeInfo *info);
-void dbus_tree_view_clear (GtkTreeView *view);
-
-#endif /* DBUS_TREE_VIEW_H */