From: "Chris Rivera" <crivera@novell.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] [RESEND] make bluez GNOME UIs singletons
Date: Mon, 17 Dec 2007 10:54:56 -0500 [thread overview]
Message-ID: <5f84803c0712170754n14d401a7l225d3d9b2f413850@mail.gmail.com> (raw)
In-Reply-To: <1197870459.8050.80.camel@aeonflux>
[-- Attachment #1.1: Type: text/plain, Size: 1202 bytes --]
Updated patches attached.
Chris
On Dec 17, 2007 12:47 AM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Chris,
>
> > Attached is an updated patch with the changes that we talked about.
>
> the patch looks good, but using bluetooth_application_instance is too
> long for my taste. Use bluetooth_instance to make this shorter.
>
> Also use org.bluez.properties etc. for the service names
> and /org/bluez/properties etc. for the object path.
>
> I also like to have multiple separate patches. One that add the generic
> instance code and then additional patches that adds support for it to
> every application. This makes it a lot easier for me to review and apply
> it.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>
[-- Attachment #1.2: Type: text/html, Size: 1839 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bluez-gnome-singleton-instance.patch --]
[-- Type: text/x-patch; name=bluez-gnome-singleton-instance.patch, Size: 8651 bytes --]
diff -urpN gnome/common/bluetooth-instance.c gnome-new/common/bluetooth-instance.c
--- gnome/common/bluetooth-instance.c 1969-12-31 19:00:00.000000000 -0500
+++ gnome-new/common/bluetooth-instance.c 2007-12-16 18:30:54.000000000 -0500
@@ -0,0 +1,132 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2005-2007 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#include <dbus/dbus-glib.h>
+
+#include "bluetooth-instance.h"
+#include "app-instance-glue.h"
+
+G_DEFINE_TYPE(BluetoothInstance, bluetooth_instance, G_TYPE_OBJECT)
+
+#define BLUETOOTH_INSTANCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
+ BLUETOOTH_TYPE_INSTANCE, BluetoothInstancePrivate))
+
+typedef struct _BluetoothInstancePrivate BluetoothInstancePrivate;
+
+struct _BluetoothInstancePrivate {
+ GtkWindow *window;
+ DBusGConnection *connection;
+};
+
+gboolean
+bluetooth_instance_register(BluetoothInstance *self,
+ int *retval, gboolean singleton, gchar *path, gchar *service)
+{
+ BluetoothInstancePrivate *priv = BLUETOOTH_INSTANCE_GET_PRIVATE(self);
+ DBusGConnection *sc;
+ DBusGProxy *proxy;
+ GError *error = NULL;
+ guint request_result;
+ gboolean ret;
+
+ sc = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+ if (error != NULL) {
+ g_printerr("Connecting to session bus failed: %s\n", error->message);
+ g_error_free(error);
+ *retval = 1;
+ return FALSE;
+ }
+
+ proxy = dbus_g_proxy_new_for_name(sc, DBUS_SERVICE_DBUS,
+ DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);
+
+ ret = dbus_g_proxy_call(proxy, "RequestName", NULL,
+ G_TYPE_STRING, service, G_TYPE_UINT, 0, G_TYPE_INVALID,
+ G_TYPE_UINT, &request_result, G_TYPE_INVALID);
+
+ g_object_unref(G_OBJECT(proxy));
+ if (!ret) {
+ g_printerr("Failed to request name on the session bus\n");
+ dbus_g_connection_unref(sc);
+ *retval = 1;
+ return FALSE;
+ }
+
+ if (request_result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER && singleton) {
+ proxy = dbus_g_proxy_new_for_name(sc, service, path, "org.bluez.BluetoothInstance");
+ dbus_g_proxy_call_no_reply(proxy, "Present", G_TYPE_INVALID, G_TYPE_INVALID);
+ g_object_unref(G_OBJECT(proxy));
+ g_print("Another instance is already running.\n");
+ dbus_g_connection_unref(sc);
+ *retval = 0;
+ return FALSE;
+ }
+
+ dbus_g_connection_register_g_object(sc, path, G_OBJECT (self));
+ priv->connection = sc;
+ return TRUE;
+}
+
+void
+bluetooth_instance_set_window (BluetoothInstance *self, GtkWindow *window)
+{
+ BluetoothInstancePrivate *priv = BLUETOOTH_INSTANCE_GET_PRIVATE(self);
+ priv->window = window;
+}
+
+gboolean
+bluetooth_instance_present(BluetoothInstance *self, GError **error)
+{
+ BluetoothInstancePrivate *priv = BLUETOOTH_INSTANCE_GET_PRIVATE(self);
+ if (priv->window)
+ gtk_window_present(priv->window);
+ return TRUE;
+}
+
+static void
+bluetooth_instance_init(BluetoothInstance *self)
+{
+}
+
+static void
+bluetooth_instance_finalize(GObject *self)
+{
+ BluetoothInstancePrivate *priv = BLUETOOTH_INSTANCE_GET_PRIVATE(self);
+ if (priv->connection)
+ dbus_g_connection_unref(priv->connection);
+}
+
+static void
+bluetooth_instance_class_init(BluetoothInstanceClass *klass)
+{
+ g_type_class_add_private(klass, sizeof(BluetoothInstancePrivate));
+ G_OBJECT_CLASS(klass)->finalize = bluetooth_instance_finalize;
+ dbus_g_object_type_install_info(BLUETOOTH_TYPE_INSTANCE,
+ &dbus_glib_bluetooth_instance_object_info);
+}
+
+BluetoothInstance *
+bluetooth_instance_new(void)
+{
+ return g_object_new(BLUETOOTH_TYPE_INSTANCE, NULL);
+}
diff -urpN gnome/common/bluetooth-instance.h gnome-new/common/bluetooth-instance.h
--- gnome/common/bluetooth-instance.h 1969-12-31 19:00:00.000000000 -0500
+++ gnome-new/common/bluetooth-instance.h 2007-12-16 18:30:54.000000000 -0500
@@ -0,0 +1,63 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2005-2007 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __BLUETOOTH_INSTANCE_H
+#define __BLUETOOTH_INSTANCE_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define BLUETOOTH_TYPE_INSTANCE (bluetooth_instance_get_type())
+#define BLUETOOTH_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ BLUETOOTH_TYPE_INSTANCE, BluetoothInstance))
+#define BLUETOOTH_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
+ BLUETOOTH_TYPE_INSTANCE, BluetoothInstanceClass))
+#define BLUETOOTH_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ BLUETOOTH_TYPE_INSTANCE))
+#define BLUETOOTH_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ BLUETOOTH_TYPE_INSTANCE))
+#define BLUETOOTH_GET_INSTANCE_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
+ BLUETOOTH_TYPE_INSTANCE, BluetoothInstanceClass))
+
+typedef struct _BluetoothInstance BluetoothInstance;
+typedef struct _BluetoothInstanceClass BluetoothInstanceClass;
+
+struct _BluetoothInstance {
+ GObject parent;
+};
+
+struct _BluetoothInstanceClass {
+ GObjectClass parent_class;
+};
+
+GType bluetooth_instance_get_type(void);
+BluetoothInstance *bluetooth_instance_new(void);
+void bluetooth_instance_set_window(BluetoothInstance *self, GtkWindow *window);
+gboolean bluetooth_instance_present(BluetoothInstance *self, GError **error);
+gboolean bluetooth_instance_register(BluetoothInstance *self,
+ int *retval, gboolean singleton, gchar *path, gchar *service);
+
+G_END_DECLS
+
+#endif /* __BLUETOOTH_INSTANCE_H */
diff -urpN gnome/common/bluetooth-instance.xml gnome-new/common/bluetooth-instance.xml
--- gnome/common/bluetooth-instance.xml 1969-12-31 19:00:00.000000000 -0500
+++ gnome-new/common/bluetooth-instance.xml 2007-12-16 18:30:54.000000000 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<node name="/">
+ <interface name="org.bluez.BluetoothInstance">
+ <method name="Present">
+ </method>
+ </interface>
+</node>
diff -urpN gnome/common/Makefile.am gnome-new/common/Makefile.am
--- gnome/common/Makefile.am 2007-07-25 06:28:56.000000000 -0400
+++ gnome-new/common/Makefile.am 2007-12-16 18:31:09.000000000 -0500
@@ -3,12 +3,13 @@ noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = \
client.h client.c device-store.h device-store.c \
+ bluetooth-instance.c bluetooth-instance.h \
bluetooth-device-selection.c bluetooth-device-selection.h
AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
BUILT_SOURCES = marshal.h marshal.c dbus-glue.h \
- passkey-agent-glue.h auth-agent-glue.h
+ passkey-agent-glue.h auth-agent-glue.h app-instance-glue.h
nodist_libcommon_a_SOURCES = $(BUILT_SOURCES)
@@ -22,7 +23,8 @@ test_agent_LDADD = libcommon.a @DBUS_LIB
test_deviceselection_LDADD = libcommon.a @GTK_LIBS@ @DBUS_LIBS@
-EXTRA_DIST = marshal.list dbus.xml passkey-agent.xml auth-agent.xml
+EXTRA_DIST = marshal.list dbus.xml passkey-agent.xml auth-agent.xml \
+ bluetooth-instance.xml
MAINTAINERCLEANFILES = Makefile.in
@@ -40,3 +42,6 @@ passkey-agent-glue.h: passkey-agent.xml
auth-agent-glue.h: auth-agent.xml
$(DBUS_BINDING_TOOL) --prefix=auth_agent --mode=glib-server --output=$@ $<
+
+app-instance-glue.h: bluetooth-instance.xml
+ $(DBUS_BINDING_TOOL) --prefix=bluetooth_instance --mode=glib-server --output=$@ $<
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: bluez-gnome-singleton-apps.patch --]
[-- Type: text/x-patch; name=bluez-gnome-singleton-apps.patch, Size: 9483 bytes --]
diff -urpN gnome/applet/bluetooth-applet.1 gnome-new/applet/bluetooth-applet.1
--- gnome/applet/bluetooth-applet.1 2007-07-22 11:33:13.000000000 -0400
+++ gnome-new/applet/bluetooth-applet.1 2007-12-16 18:31:09.000000000 -0500
@@ -10,8 +10,9 @@ whenever a passkey (aka PIN) is required
.I bluetooth-applet
is part of bluez-gnome, see also http://www.bluez.org
.SH OPTIONS
-.I bluetooth-applet
-takes no options
+.TP
+.BI \-\-singleton
+Ensure that only one instance is running.
.SH AUTHOR
Marcel Holtmann <marcel@holtmann.org>
.SH LICENSE
diff -urpN gnome/applet/bluetooth-applet.desktop.in gnome-new/applet/bluetooth-applet.desktop.in
--- gnome/applet/bluetooth-applet.desktop.in 2007-04-03 04:09:01.000000000 -0400
+++ gnome-new/applet/bluetooth-applet.desktop.in 2007-12-16 18:31:09.000000000 -0500
@@ -3,7 +3,7 @@ Encoding=UTF-8
_Name=Bluetooth Manager
_Comment=Bluetooth Manager applet
Icon=stock_bluetooth
-Exec=bluetooth-applet
+Exec=bluetooth-applet --singleton
Terminal=false
Type=Application
Categories=
diff -urpN gnome/applet/main.c gnome-new/applet/main.c
--- gnome/applet/main.c 2007-12-04 10:30:51.000000000 -0500
+++ gnome-new/applet/main.c 2007-12-16 18:31:09.000000000 -0500
@@ -49,6 +49,7 @@
#endif
#include "bluetooth-device-selection.h"
+#include "bluetooth-instance.h"
#define PASSKEY_AGENT_PATH "/org/bluez/passkey"
#define AUTH_AGENT_PATH "/org/bluez/auth"
@@ -1550,7 +1551,7 @@ static void about_callback(GtkWidget *it
static void settings_callback(GObject *widget, gpointer user_data)
{
- const char *command = "bluetooth-properties";
+ const char *command = "bluetooth-properties --singleton";
if (!g_spawn_command_line_async(command, NULL))
g_printerr("Couldn't execute command: %s\n", command);
@@ -1639,7 +1640,7 @@ static void sendto_callback(GObject *wid
#if 0
static void wizard_callback(GObject *widget, gpointer user_data)
{
- const char *command = "bluetooth-wizard";
+ const char *command = "bluetooth-wizard --singleton";
if (!g_spawn_command_line_async(command, NULL))
g_printerr("Couldn't execute command: %s\n", command);
@@ -1782,9 +1783,19 @@ static void gconf_callback(GConfClient *
int main(int argc, char *argv[])
{
+ GOptionContext *ctx;
GtkWidget *menu;
GError *error = NULL;
+ BluetoothInstance *app;
char *str;
+ int retval = 0;
+ gboolean singleton = FALSE;
+
+ GOptionEntry entries[] = {
+ { "singleton", 0, 0, G_OPTION_ARG_NONE, &singleton,
+ N_("Only allow one instance of this application"), NULL },
+ { NULL, 0, 0, 0, NULL, NULL, NULL }
+ };
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
@@ -1792,6 +1803,15 @@ int main(int argc, char *argv[])
gtk_init(&argc, &argv);
+ ctx = g_option_context_new("");
+ g_option_context_add_main_entries(ctx, entries, NULL);
+ if (!g_option_context_parse(ctx, &argc, &argv, &error)) {
+ g_printerr(_("parsing failed: %s\n"), error->message);
+ g_error_free(error);
+ g_option_context_free(ctx);
+ return retval;
+ }
+
#ifdef HAVE_LIBNOTIFY
notify_init("bluetooth-manager");
#endif
@@ -1804,6 +1824,11 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ app = bluetooth_instance_new();
+ if(!bluetooth_instance_register(app, &retval, singleton,
+ "/org/bluez/applet", "org.bluez.applet"))
+ exit(retval);
+
gconf = gconf_client_get_default();
#ifdef HAVE_HAL
@@ -1860,6 +1885,10 @@ int main(int argc, char *argv[])
g_list_foreach(adapter_list, adapter_free, NULL);
dbus_g_connection_unref(conn);
+
+ g_object_unref(app);
+ g_option_context_free(ctx);
+
return 0;
}
diff -urpN gnome/properties/bluetooth-properties.1 gnome-new/properties/bluetooth-properties.1
--- gnome/properties/bluetooth-properties.1 2007-07-22 11:33:13.000000000 -0400
+++ gnome-new/properties/bluetooth-properties.1 2007-12-16 18:31:09.000000000 -0500
@@ -9,8 +9,9 @@ will display a dialog for changing Bluet
.I bluetooth-properties
is part of bluez-gnome, see also http://www.bluez.org
.SH OPTIONS
-.I bluetooth-properties
-takes no options
+.TP
+.BI \-\-singleton
+Ensure that only one instance is running.
.SH AUTHOR
Marcel Holtmann <marcel@holtmann.org>
.SH LICENSE
diff -urpN gnome/properties/main.c gnome-new/properties/main.c
--- gnome/properties/main.c 2007-07-31 17:37:29.000000000 -0400
+++ gnome-new/properties/main.c 2007-12-16 18:31:09.000000000 -0500
@@ -40,6 +40,7 @@
#include "general.h"
#include "service.h"
#include "adapter.h"
+#include "bluetooth-instance.h"
static void delete_callback(GtkWidget *window, GdkEvent *event,
gpointer user_data)
@@ -58,7 +59,7 @@ static void close_callback(GtkWidget *bu
gtk_main_quit();
}
-static void create_window(GtkWidget *notebook)
+static GtkWidget *create_window(GtkWidget *notebook)
{
GtkWidget *window;
GtkWidget *widget;
@@ -108,6 +109,7 @@ static void create_window(GtkWidget *not
widget, _("General"));
gtk_widget_show_all(window);
+ return window;
}
static void name_owner_changed(DBusGProxy *object, const char *name,
@@ -141,17 +143,37 @@ static DBusGProxy *setup_manager(DBusGCo
int main(int argc, char *argv[])
{
+ GOptionContext *ctx;
GtkWidget *notebook;
+ GtkWidget *window;
+ GError *error = NULL;
DBusGConnection *conn;
+ BluetoothInstance *app;
DBusGProxy *manager;
- GError *error = NULL;
+ int retval = 0;
+ gboolean singleton = FALSE;
+ GOptionEntry entries[] = {
+ { "singleton", 0, 0, G_OPTION_ARG_NONE, &singleton,
+ N_("Only allow one instance of this application"), NULL },
+ { NULL, 0, 0, 0, NULL, NULL, NULL }
+ };
+
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
gtk_init(&argc, &argv);
+ ctx = g_option_context_new("");
+ g_option_context_add_main_entries(ctx, entries, NULL);
+ if (!g_option_context_parse(ctx, &argc, &argv, &error)) {
+ g_printerr(_("parsing failed: %s\n"), error->message);
+ g_error_free(error);
+ g_option_context_free(ctx);
+ return retval;
+ }
+
conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
if (error != NULL) {
g_printerr("Connecting to system bus failed: %s\n",
@@ -163,12 +185,18 @@ int main(int argc, char *argv[])
setup_general();
notebook = gtk_notebook_new();
-
+
assign_adapter(notebook);
- manager = setup_manager(conn);
+ window = create_window(notebook);
- create_window(notebook);
+ app = bluetooth_instance_new();
+ bluetooth_instance_set_window(app, GTK_WINDOW(window));
+ if(!bluetooth_instance_register(app, &retval, singleton,
+ "/org/bluez/properties", "org.bluez.properties"))
+ exit(retval);
+
+ manager = setup_manager(conn);
gtk_main();
@@ -181,6 +209,10 @@ int main(int argc, char *argv[])
g_object_unref(manager);
dbus_g_connection_unref(conn);
+
+ g_object_unref(app);
+ g_option_context_free(ctx);
+
return 0;
}
diff -urpN gnome/wizard/bluetooth-wizard.1 gnome-new/wizard/bluetooth-wizard.1
--- gnome/wizard/bluetooth-wizard.1 2007-07-22 11:33:12.000000000 -0400
+++ gnome-new/wizard/bluetooth-wizard.1 2007-12-16 18:31:09.000000000 -0500
@@ -9,8 +9,9 @@ will display a wizard for setting up Blu
.I bluetooth-wizard
is part of bluez-gnome, see also http://www.bluez.org
.SH OPTIONS
-.I bluetooth-wizard
-takes no options
+.TP
+.BI \-\-singleton
+Ensure that only one instance is running.
.SH AUTHOR
Marcel Holtmann <marcel@holtmann.org>
.SH LICENSE
diff -urpN gnome/wizard/main.c gnome-new/wizard/main.c
--- gnome/wizard/main.c 2007-08-15 03:04:03.000000000 -0400
+++ gnome-new/wizard/main.c 2007-12-16 18:31:09.000000000 -0500
@@ -26,6 +26,7 @@
#endif
#include <string.h>
+#include <stdlib.h>
#include <dbus/dbus-glib.h>
@@ -38,6 +39,7 @@
#include "dbus-glue.h"
#include "bluetooth-device-selection.h"
+#include "bluetooth-instance.h"
static BluetoothClient *client;
@@ -387,7 +389,7 @@ static void create_summary(GtkWidget *as
page_summary = vbox;
}
-static void create_wizard(void)
+static GtkWidget *create_wizard(void)
{
GtkWidget *assistant;
@@ -430,23 +432,56 @@ static void create_wizard(void)
gtk_widget_show_all(assistant);
gtk_assistant_update_buttons_state(GTK_ASSISTANT(assistant));
+ return assistant;
}
int main(int argc, char *argv[])
{
+ GOptionContext *ctx;
+ GtkWidget *window;
+ BluetoothInstance *app;
+ GError *error = NULL;
+ int retval = 0;
+ gboolean singleton = FALSE;
+
+ GOptionEntry entries[] = {
+ { "singleton", 0, 0, G_OPTION_ARG_NONE, &singleton,
+ N_("Only allow one instance of this application"), NULL },
+ { NULL, 0, 0, 0, NULL, NULL, NULL }
+ };
+
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
gtk_init(&argc, &argv);
+ ctx = g_option_context_new("");
+ g_option_context_add_main_entries(ctx, entries, NULL);
+ if (!g_option_context_parse(ctx, &argc, &argv, &error)) {
+ g_printerr(_("parsing failed: %s\n"), error->message);
+ g_error_free(error);
+ g_option_context_free(ctx);
+ return retval;
+ }
+
client = bluetooth_client_new();
- create_wizard();
+ window = create_wizard();
+
+ app = bluetooth_instance_new();
+ bluetooth_instance_set_window(app, GTK_WINDOW(window));
+ if(!bluetooth_instance_register(app, &retval, singleton,
+ "/org/bluez/wizard", "org.bluez.wizard"))
+ exit(retval);
gtk_main();
g_object_unref(client);
+ g_object_unref(app);
+
+ g_option_context_free(ctx);
+
return 0;
}
[-- Attachment #4: Type: text/plain, Size: 308 bytes --]
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- Attachment #5: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2007-12-17 15:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 15:33 [Bluez-devel] [PATCH] [RESEND] make bluez GNOME UIs singletons Chris Rivera
2007-12-03 16:25 ` Marcel Holtmann
2007-12-03 16:50 ` Chris Rivera
2007-12-03 16:59 ` Marcel Holtmann
2007-12-06 17:59 ` Chris Rivera
2007-12-17 3:08 ` Chris Rivera
2007-12-17 5:47 ` Marcel Holtmann
2007-12-17 15:54 ` Chris Rivera [this message]
2007-12-17 18:53 ` Marcel Holtmann
2007-12-17 19:29 ` Chris Rivera
2007-12-17 20:17 ` Marcel Holtmann
2007-12-17 20:47 ` Chris Rivera
2007-12-17 21:01 ` Marcel Holtmann
2007-12-18 18:37 ` Chris Rivera
2007-12-18 19:10 ` Marcel Holtmann
2007-12-18 19:51 ` Chris Rivera
2007-12-18 19:58 ` Marcel Holtmann
2007-12-18 20:52 ` Bastien Nocera
2007-12-18 21:00 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f84803c0712170754n14d401a7l225d3d9b2f413850@mail.gmail.com \
--to=crivera@novell.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox