4 #include "tilda-window.h"
5 #include "tilda-terminal.h"
7 DBusGConnection *dbus_connection;
10 tilda_initialize_dbus ()
12 const gchar service_name[] = "net.sourceforge.Tilda";
14 DBusGProxy *driver_proxy;
17 // Initialize the DBus connection
18 dbus_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
19 if (dbus_connection == NULL)
21 g_warning ("Unable to connect to dbus: %s", error->message);
26 // Register the service name
27 driver_proxy = dbus_g_proxy_new_for_name (dbus_connection,
32 if (!org_freedesktop_DBus_request_name (driver_proxy, service_name, 0, &request_ret, &error))
34 // FIXME: for whatever reason, this is wrong. The error message doesn't appear
35 // FIXME: when we were unable to register the service. Perhaps there's a more
36 // FIXME: GLib-y way of doing this?
37 g_warning ("Unable to register service: %s", error->message);
41 g_object_unref (driver_proxy);
44 int main (int argc, char *argv[])
48 /* Initialize GTK+ (and the GObject system) */
49 gtk_init (&argc, &argv);
51 /* Start our connection to DBus */
52 tilda_initialize_dbus ();
54 /* Create a TildaWindow, run it, and exit when it does, basically.
56 * This is nothing like what the real main() will be, but it's
57 * a good start for testing and integration of more of TildaWindow
58 * and TildaTerminal. */
59 tw = g_object_new (TILDA_TYPE_WINDOW, "number", 0, NULL);
63 g_object_unref (G_OBJECT (tw));
68 /* vim: set ts=4 sts=4 sw=4 noet tw=112: */