mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
154 lines
5.3 KiB
Diff
154 lines
5.3 KiB
Diff
|
diff -Nur -x '*.orig' -x '*~' bluez-gnome-1.8/common/marshal.list bluez-gnome-1.8.new/common/marshal.list
|
||
|
--- bluez-gnome-1.8/common/marshal.list 2008-08-24 16:14:24.000000000 -0500
|
||
|
+++ bluez-gnome-1.8.new/common/marshal.list 2008-10-06 01:01:59.000000000 -0500
|
||
|
@@ -3,3 +3,4 @@
|
||
|
VOID:STRING,STRING
|
||
|
VOID:STRING,STRING,UINT64
|
||
|
VOID:UINT64
|
||
|
+VOID:STRING,STRING,STRING
|
||
|
diff -Nur -x '*.orig' -x '*~' bluez-gnome-1.8/sendto/main.c bluez-gnome-1.8.new/sendto/main.c
|
||
|
--- bluez-gnome-1.8/sendto/main.c 2008-10-06 01:01:58.000000000 -0500
|
||
|
+++ bluez-gnome-1.8.new/sendto/main.c 2008-10-06 01:05:05.000000000 -0500
|
||
|
@@ -64,6 +64,8 @@
|
||
|
static gint64 first_update = 0;
|
||
|
static gint64 last_update = 0;
|
||
|
|
||
|
+static DBusGProxy *session_proxy = NULL;
|
||
|
+
|
||
|
static gchar *filename_to_path(const gchar *filename)
|
||
|
{
|
||
|
GFile *file;
|
||
|
@@ -354,7 +356,16 @@
|
||
|
static void error_occurred(DBusGProxy *proxy, const gchar *name,
|
||
|
const gchar *message, gpointer user_data)
|
||
|
{
|
||
|
- transfer_completed(proxy, user_data);
|
||
|
+ gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),
|
||
|
+ _("Error Occurred"));
|
||
|
+
|
||
|
+ gchar *text = g_strdup_printf("<span foreground=\"red\">%s</span>",
|
||
|
+ message);
|
||
|
+ gtk_label_set_markup(GTK_LABEL(label_status), text);
|
||
|
+ g_free(text);
|
||
|
+
|
||
|
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog),
|
||
|
+ GTK_RESPONSE_CLOSE, TRUE);
|
||
|
}
|
||
|
|
||
|
static void session_connected(DBusGProxy *proxy, gpointer user_data)
|
||
|
@@ -363,7 +374,7 @@
|
||
|
|
||
|
first_update = get_system_time();
|
||
|
|
||
|
- send_file(proxy);
|
||
|
+ send_file(session_proxy);
|
||
|
}
|
||
|
|
||
|
#define OPENOBEX_CONNECTION_FAILED "org.openobex.Error.ConnectionAttemptFailed"
|
||
|
@@ -407,60 +418,41 @@
|
||
|
if (dbus_g_proxy_end_call(proxy, call, &error,
|
||
|
DBUS_TYPE_G_OBJECT_PATH, &path,
|
||
|
G_TYPE_INVALID) == FALSE) {
|
||
|
- gchar *text, *message;
|
||
|
+ gchar *message;
|
||
|
|
||
|
message = get_error_message(error);
|
||
|
|
||
|
- text = g_strdup_printf("<span foreground=\"red\">%s</span>",
|
||
|
- message);
|
||
|
- gtk_label_set_markup(GTK_LABEL(label_status), text);
|
||
|
- g_free(text);
|
||
|
+ error_occurred(proxy,NULL,message,NULL);
|
||
|
|
||
|
g_free(message);
|
||
|
|
||
|
- gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog),
|
||
|
- GTK_RESPONSE_CLOSE, TRUE);
|
||
|
return;
|
||
|
}
|
||
|
-
|
||
|
- proxy = dbus_g_proxy_new_for_name(conn, "org.openobex",
|
||
|
+ session_proxy = dbus_g_proxy_new_for_name(conn, "org.openobex",
|
||
|
path, "org.openobex.Session");
|
||
|
|
||
|
- dbus_g_proxy_add_signal(proxy, "Connected", G_TYPE_INVALID);
|
||
|
+ dbus_g_proxy_add_signal(session_proxy, "Cancelled", G_TYPE_INVALID);
|
||
|
|
||
|
- dbus_g_proxy_connect_signal(proxy, "Connected",
|
||
|
- G_CALLBACK(session_connected), NULL, NULL);
|
||
|
-
|
||
|
- dbus_g_proxy_add_signal(proxy, "ErrorOccurred",
|
||
|
- G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
|
||
|
-
|
||
|
- dbus_g_proxy_connect_signal(proxy, "ErrorOccurred",
|
||
|
- G_CALLBACK(error_occurred), NULL, NULL);
|
||
|
-
|
||
|
- dbus_g_proxy_add_signal(proxy, "Cancelled", G_TYPE_INVALID);
|
||
|
-
|
||
|
- dbus_g_proxy_connect_signal(proxy, "Cancelled",
|
||
|
+ dbus_g_proxy_connect_signal(session_proxy, "Cancelled",
|
||
|
G_CALLBACK(transfer_cancelled), NULL, NULL);
|
||
|
|
||
|
- dbus_g_proxy_add_signal(proxy, "TransferStarted", G_TYPE_STRING,
|
||
|
+ dbus_g_proxy_add_signal(session_proxy, "TransferStarted", G_TYPE_STRING,
|
||
|
G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID);
|
||
|
|
||
|
- dbus_g_proxy_connect_signal(proxy, "TransferStarted",
|
||
|
+ dbus_g_proxy_connect_signal(session_proxy, "TransferStarted",
|
||
|
G_CALLBACK(transfer_started), NULL, NULL);
|
||
|
|
||
|
- dbus_g_proxy_add_signal(proxy, "TransferProgress",
|
||
|
+ dbus_g_proxy_add_signal(session_proxy, "TransferProgress",
|
||
|
G_TYPE_UINT64, G_TYPE_INVALID);
|
||
|
|
||
|
- dbus_g_proxy_connect_signal(proxy, "TransferProgress",
|
||
|
+ dbus_g_proxy_connect_signal(session_proxy, "TransferProgress",
|
||
|
G_CALLBACK(transfer_progress), NULL, NULL);
|
||
|
|
||
|
- dbus_g_proxy_add_signal(proxy, "TransferCompleted", G_TYPE_INVALID);
|
||
|
+ dbus_g_proxy_add_signal(session_proxy, "TransferCompleted", G_TYPE_INVALID);
|
||
|
|
||
|
- dbus_g_proxy_connect_signal(proxy, "TransferCompleted",
|
||
|
+ dbus_g_proxy_connect_signal(session_proxy, "TransferCompleted",
|
||
|
G_CALLBACK(transfer_completed), NULL, NULL);
|
||
|
|
||
|
- dbus_g_proxy_call(proxy, "Connect", NULL, G_TYPE_INVALID,
|
||
|
- G_TYPE_INVALID);
|
||
|
}
|
||
|
|
||
|
static gchar *get_name(DBusGProxy *device)
|
||
|
@@ -766,6 +758,14 @@
|
||
|
|
||
|
dbus_g_object_register_marshaller(marshal_VOID__UINT64,
|
||
|
G_TYPE_NONE, G_TYPE_UINT64, G_TYPE_INVALID);
|
||
|
+
|
||
|
+ dbus_g_object_register_marshaller(marshal_VOID__STRING_STRING_STRING,
|
||
|
+ G_TYPE_NONE,
|
||
|
+ DBUS_TYPE_G_OBJECT_PATH,
|
||
|
+ G_TYPE_STRING,
|
||
|
+ G_TYPE_STRING,
|
||
|
+ G_TYPE_INVALID);
|
||
|
+
|
||
|
|
||
|
device_name = get_device_name(option_device);
|
||
|
if (device_name == NULL)
|
||
|
@@ -787,6 +787,18 @@
|
||
|
dbus_g_proxy_connect_signal(proxy, "NameOwnerChanged",
|
||
|
G_CALLBACK(name_owner_changed), NULL, NULL);
|
||
|
|
||
|
+ dbus_g_proxy_add_signal(proxy, "SessionConnected", DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
|
||
|
+
|
||
|
+ dbus_g_proxy_connect_signal(proxy, "SessionConnected",
|
||
|
+ G_CALLBACK(session_connected), NULL, NULL);
|
||
|
+
|
||
|
+ dbus_g_proxy_add_signal(proxy, "SessionConnectError",
|
||
|
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
|
||
|
+
|
||
|
+ dbus_g_proxy_connect_signal(proxy, "SessionConnectError",
|
||
|
+ G_CALLBACK(error_occurred), NULL, NULL);
|
||
|
+
|
||
|
+
|
||
|
dbus_g_proxy_begin_call(proxy, "CreateBluetoothSession",
|
||
|
create_notify, NULL, NULL,
|
||
|
G_TYPE_STRING, option_device,
|