[gnome-bluetooth] Cleanup nautilus-sendto plugin



commit 0bb74f8e3102c47f55cf584f47393047e9b16724
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 17 16:39:20 2009 +0000

    Cleanup nautilus-sendto plugin

 sendto/nautilus-sendto-plugin.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/sendto/nautilus-sendto-plugin.c b/sendto/nautilus-sendto-plugin.c
index 1a2000b..0cad7fd 100644
--- a/sendto/nautilus-sendto-plugin.c
+++ b/sendto/nautilus-sendto-plugin.c
@@ -26,15 +26,11 @@
 
 #include <bluetooth-chooser-combo.h>
 #include <bluetooth-chooser.h>
-//#include <bluetooth-marshal.h>
-//#include <dbus/dbus-glib.h>
 #include <glib/gi18n-lib.h>
 #include <gconf/gconf-client.h>
 
 #include "nautilus-sendto-plugin.h"
 
-//#define OBEX_PUSH_SVCLASS_ID_STR "0x1105"
-//#define OBEX_FILETRANS_SVCLASS_ID_STR "0x1106"
 #define LAST_OBEX_DEVICE "/desktop/gnome/nautilus-sendto/last_obex_device"
 
 static GtkWidget *combo;
@@ -65,8 +61,9 @@ set_last_used_device (void)
 	g_object_unref (gconfclient);
 
 	if (bdaddr != NULL && *bdaddr != '\0') {
-		g_message ("address %s", bdaddr);
 		g_object_set (G_OBJECT (combo), "device", bdaddr, NULL);
+	} else {
+		g_object_set (G_OBJECT (combo), "device", BLUETOOTH_CHOOSER_COMBO_FIRST_DEVICE, NULL);
 	}
 	g_free (bdaddr);
 }
@@ -89,7 +86,7 @@ get_contacts_widget (NstPlugin *plugin)
 		      NULL);
 	set_last_used_device ();
 	bluetooth_chooser_start_discovery (BLUETOOTH_CHOOSER (chooser));
-	gtk_container_set_border_width (GTK_CONTAINER (combo), 5);
+	gtk_container_set_border_width (GTK_CONTAINER (combo), 0);
 	gtk_widget_show (combo);
 
 	return combo;
@@ -121,7 +118,6 @@ send_files (NstPlugin *plugin,
 	GError *err = NULL;
 
 	g_object_get (G_OBJECT (combo), "device", &bdaddr, NULL);
-	g_message ("bdaddr %s", bdaddr);
 	if (bdaddr == NULL)
 		return FALSE;
 



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