nautilus-sendto r271 - in trunk: . src/plugins



Author: hadess
Date: Fri Jan 18 15:11:39 2008
New Revision: 271
URL: http://svn.gnome.org/viewvc/nautilus-sendto?rev=271&view=rev

Log:
2008-01-18  Bastien Nocera  <hadess hadess net>

	* src/plugins/bluetooth.c: (init), (send_files):
	Allow using bluetooth-sendto as well as gnome-obex-sendto



Modified:
   trunk/ChangeLog
   trunk/src/plugins/bluetooth.c

Modified: trunk/src/plugins/bluetooth.c
==============================================================================
--- trunk/src/plugins/bluetooth.c	(original)
+++ trunk/src/plugins/bluetooth.c	Fri Jan 18 15:11:39 2008
@@ -34,6 +34,7 @@
 static GtkTreeModel *model;
 static int discovered;
 static GtkWidget *combobox;
+static char *cmd = NULL;
 
 DBusGProxy *object;
 
@@ -51,11 +52,13 @@
 	DBusGConnection *conn;
 	const char *adapter;
 
-	/* Check whether gnome-obex-send is available */
-	cmd = g_find_program_in_path ("gnome-obex-send");
-	if (cmd == NULL)
-		return FALSE;
-	g_free (cmd);
+	/* Check whether bluetooth-sendto or gnome-obex-send are available */
+	cmd = g_find_program_in_path ("bluetooth-sendto");
+	if (cmd == NULL) {
+		cmd = g_find_program_in_path ("gnome-obex-send");
+		if (cmd == NULL)
+			return FALSE;
+	}
 
 	conn = dbus_g_bus_get (DBUS_BUS_SYSTEM, &e);
 	if (e != NULL) {
@@ -377,7 +380,7 @@
 		return FALSE;
 
 	argv = g_ptr_array_new ();
-	g_ptr_array_add (argv, "gnome-obex-send");
+	g_ptr_array_add (argv, cmd);
 	g_ptr_array_add (argv, "--dest");
 	g_ptr_array_add (argv, bdaddr);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]