gnome-user-share r204 - in trunk: . icons icons/16x16 icons/22x22 icons/32x32 icons/48x48



Author: hadess
Date: Sat Feb 23 01:03:46 2008
New Revision: 204
URL: http://svn.gnome.org/viewvc/gnome-user-share?rev=204&view=rev

Log:
2008-02-23  Bastien Nocera  <hadess hadess net>

	* Makefile.am:
	* configure.in:
	* desktop_gnome_file_sharing.schemas.in:
	* file-share-properties.c (update_ui),
	(file_sharing_bluetooth_obexpush_enabled_changed),
	(file_sharing_bluetooth_obexpush_accept_files_changed),
	(file_sharing_bluetooth_obexpush_notify_changed), (launch_share),
	(enable_obexpush_check_toggled), (accept_obexpush_combo_changed),
	(notify_received_obexpush_check_toggled), (main):
	* file-share-properties.glade:
	* marshal.list:
	* obexpush.c (show_icon), (device_is_authorised),
	(transfer_started_cb), (transfer_completed_cb), (cancelled_cb),
	(error_occurred_cb), (session_created_cb), (obexpush_up),
	(obexpush_stop), (obexpush_down), (obexpush_restart),
	(obexpush_init), (obexpush_set_accept_files_policy),
	(obexpush_set_notify):
	* obexpush.h:
	* user_share-private.c (password_string_from_setting),
	(password_setting_from_string), (accept_string_from_setting),
	(accept_setting_from_string):
	* user_share-private.h:
	* user_share.c (disabled_timeout_callback),
	(file_sharing_bluetooth_allow_write_changed),
	(file_sharing_bluetooth_require_pairing_changed),
	(file_sharing_bluetooth_enabled_changed),
	(file_sharing_bluetooth_obexpush_enabled_changed),
	(file_sharing_bluetooth_obexpush_accept_files_changed),
	(file_sharing_bluetooth_obexpush_notify_changed), (main):

	Add an ObexPush server, notifications when transfers have finished,
	or on errors and "Ask" accept methods aren't implemented yet

	Fix the ObexFTP being starting when changing one of its settings, and
	the service isn't actually enabled (only possible via GConf, when
	gnome-user-share is running for another service)

	* obexftp.c (obexftp_up), (obexftp_stop): Better error messages, now
	that we have ObexPush support

	* icons/*: Add new icons from Andreas Nilsson <nisses mail home se>
	(Closes: #484403)



Added:
   trunk/icons/
   trunk/icons/16x16/
   trunk/icons/16x16/Makefile.am
   trunk/icons/16x16/gnome-obex-server.png   (contents, props changed)
   trunk/icons/16x16/gnome-obex-server.svg
   trunk/icons/22x22/
   trunk/icons/22x22/Makefile.am
   trunk/icons/22x22/gnome-obex-server.png   (contents, props changed)
   trunk/icons/22x22/gnome-obex-server.svg
   trunk/icons/32x32/
   trunk/icons/32x32/Makefile.am
   trunk/icons/32x32/gnome-obex-server.png   (contents, props changed)
   trunk/icons/32x32/gnome-obex-server.svg
   trunk/icons/48x48/
   trunk/icons/48x48/Makefile.am
   trunk/icons/48x48/gnome-obex-server.png   (contents, props changed)
   trunk/icons/48x48/gnome-obex-server.svg
   trunk/icons/Makefile.am
   trunk/marshal.list
   trunk/obexpush.c
   trunk/obexpush.h
   trunk/user_share-private.c
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.in
   trunk/desktop_gnome_file_sharing.schemas.in
   trunk/file-share-properties.c
   trunk/file-share-properties.glade
   trunk/obexftp.c
   trunk/user_share-private.h
   trunk/user_share.c

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -4,7 +4,7 @@
 
 schema_DATA = $(schema_in_files:.schemas.in=.schemas)
 
-SUBDIRS = po
+SUBDIRS = icons po
 
 @INTLTOOL_DESKTOP_RULE@
 
@@ -16,6 +16,15 @@
 autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
 autostart_in_files = gnome-user-share.desktop.in
 
+MARSHALFILES = marshal.c marshal.h
+BUILT_SOURCES = $(MARSHALFILES)
+
+marshal.c: marshal.h
+	 ( $(GLIB_GENMARSHAL) --prefix=marshal $(srcdir)/marshal.list --header --body > marshal.c )
+marshal.h: marshal.list
+	( $(GLIB_GENMARSHAL) --prefix=marshal $(srcdir)/marshal.list --header > marshal.h )
+
+
 # INTLTOOL_SCHEMAS_RULE@
 %.schemas:   %.schemas.in
 	cp $< $@
@@ -47,10 +56,14 @@
 	user_share.c		\
 	user_share.h		\
 	user_share-private.h	\
+	user_share-private.c	\
 	http.c			\
 	http.h			\
 	obexftp.c		\
-	obexftp.h
+	obexftp.h		\
+	obexpush.c		\
+	obexpush.h		\
+	$(MARSHALFILES)
 
 gnome_user_share_LDADD = \
 	$(HOWL_LIBS)	\
@@ -61,7 +74,8 @@
 
 gnome_file_share_properties_SOURCES =	\
 	file-share-properties.c		\
-	user_share-private.h
+	user_share-private.h		\
+	user_share-private.c
 
 gnome_file_share_properties_LDADD = \
 	$(USER_SHARE_CONFIG_LIBS)
@@ -91,7 +105,7 @@
 	intltool-update.in	\
 	gnome-user-share.desktop.in.in
 
-CLEANFILES = $(desktop_DATA) $(autostart_DATA)
+CLEANFILES = $(desktop_DATA) $(autostart_DATA) $(BUILT_SOURCES)
 
 DISTCLEANFILES = $(schema_DATA) \
 	intltool-extract 	\

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sat Feb 23 01:03:46 2008
@@ -69,7 +69,7 @@
   AC_MSG_ERROR([Neither avahi nor howl detected. Gnome-user-share needs a mDNS implementation.])
 fi
 
-PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= 2.15.2 gconf-2.0 dbus-glib-1 $DBUS_MODULES)
+PKG_CHECK_MODULES(USER_SHARE, glib-2.0 >= 2.15.2 gtk+-2.0 gconf-2.0 dbus-glib-1 $DBUS_MODULES)
 AC_SUBST(USER_SHARE_CFLAGS)
 AC_SUBST(USER_SHARE_LIBS)
 
@@ -92,6 +92,8 @@
   done
 fi
 
+AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
+
 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
 
 if test x"$GCONFTOOL" = xno; then
@@ -175,6 +177,11 @@
 			       
 AC_OUTPUT([
 Makefile
+icons/Makefile
+icons/16x16/Makefile
+icons/22x22/Makefile
+icons/32x32/Makefile
+icons/48x48/Makefile
 gnome-user-share.desktop.in
 po/Makefile.in
 ])

Modified: trunk/desktop_gnome_file_sharing.schemas.in
==============================================================================
--- trunk/desktop_gnome_file_sharing.schemas.in	(original)
+++ trunk/desktop_gnome_file_sharing.schemas.in	Sat Feb 23 01:03:46 2008
@@ -56,5 +56,39 @@
         <long>Whether Bluetooth clients need to pair with the computer to send files.</long>
       </locale>
     </schema>
+    <schema>
+      <key>/schemas/desktop/gnome/file_sharing/bluetooth_obexpush_enabled</key>
+      <applyto>/desktop/gnome/file_sharing/bluetooth_obexpush_enabled</applyto>
+      <owner>gnome-user-share</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+        <short>Whether Bluetooth clients can send files using ObexPush.</short>
+        <long>If this is true, Bluetooth devices can send files to the user's Downloads directory when logged in.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/desktop/gnome/file_sharing/bluetooth_accept_files</key>
+      <applyto>/desktop/gnome/file_sharing/bluetooth_accept_files</applyto>
+      <owner>gnome-user-share</owner>
+      <type>string</type>
+      <default>bonded</default>
+      <locale name="C">
+        <short>When to accept files sent over Bluetooth</short>
+	<long>When to accept files sent over Bluetooth. Possible values are "always", "bonded", "bonded_trusted" and "ask".</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/desktop/gnome/file_sharing/bluetooth_notify</key>
+      <applyto>/desktop/gnome/file_sharing/bluetooth_notify</applyto>
+      <owner>gnome-user-share</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+        <short>Whether to notify about newly received files.</short>
+        <long>Whether to notify about newly received files.</long>
+      </locale>
+    </schema>
   </schemalist>
 </gconfschemafile>
+

Modified: trunk/file-share-properties.c
==============================================================================
--- trunk/file-share-properties.c	(original)
+++ trunk/file-share-properties.c	Sat Feb 23 01:03:46 2008
@@ -38,48 +38,6 @@
 
 static GladeXML *ui;
 
-typedef enum {
-    PASSWORD_NEVER,
-    PASSWORD_ON_WRITE,
-    PASSWORD_ALWAYS
-} PasswordSetting;
-
-static char *password_setting_strings[] = {
-    "never",
-    "on_write",
-    "always"
-};
-
-static const char *
-password_string_from_setting (PasswordSetting setting)
-{
-    
-    if (setting >= 0 && setting <= PASSWORD_ALWAYS)
-	return password_setting_strings[setting];
-    
-    /* Fallback on secure pref */
-    return "always";
-}
-
-static PasswordSetting
-password_setting_from_string (const char *str)
-{
-    if (str != NULL) {
-	if (strcmp (str, "never") == 0) {
-	    return PASSWORD_NEVER;
-	}
-	if (strcmp (str, "always") == 0) {
-	    return PASSWORD_ALWAYS;
-	}
-	if (strcmp (str, "on_write") == 0) {
-	    return PASSWORD_ON_WRITE;
-	}
-    }
-	
-    /* Fallback on secure pref */
-    return PASSWORD_ALWAYS;
-}
-
 static void
 write_out_password (const char *password)
 {
@@ -129,14 +87,19 @@
 {
     GConfClient *client;
     gboolean enabled, bluetooth_enabled, bluetooth_write_enabled, require_pairing_enabled;
+    gboolean bluetooth_obexpush_enabled, bluetooth_obexpush_notify;
     char *str;
     PasswordSetting password_setting;
+    AcceptSetting accept_setting;
     GtkWidget *check;
     GtkWidget *password_combo;
     GtkWidget *password_entry;
     GtkWidget *bluetooth_check;
     GtkWidget *allow_write_bluetooth_check;
     GtkWidget *require_pairing_check;
+    GtkWidget *enable_obexpush_check;
+    GtkWidget *accept_obexpush_combo;
+    GtkWidget *notify_received_obexpush_check;
 
     client = gconf_client_get_default ();
 
@@ -152,18 +115,32 @@
     require_pairing_enabled = gconf_client_get_bool (client,
     						     FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING,
     						     NULL);
+    bluetooth_obexpush_enabled = gconf_client_get_bool (client,
+    							FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED,
+    							NULL);
+    bluetooth_obexpush_notify = gconf_client_get_bool (client,
+    						       FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY,
+    						       NULL);
 
     str = gconf_client_get_string (client, FILE_SHARING_REQUIRE_PASSWORD, NULL);
     password_setting = password_setting_from_string (str);
     g_free (str);
 
+    str = gconf_client_get_string (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES, NULL);
+    accept_setting = accept_setting_from_string (str);
+    g_free (str);
+
     check = glade_xml_get_widget (ui, "enable_check");
     password_combo = glade_xml_get_widget (ui, "password_combo");
     password_entry = glade_xml_get_widget (ui, "password_entry");
     bluetooth_check = glade_xml_get_widget (ui, "enable_bluetooth_check");
     allow_write_bluetooth_check = glade_xml_get_widget (ui, "allow_write_bluetooth_check");
     require_pairing_check = glade_xml_get_widget (ui, "require_pairing_check");
+    enable_obexpush_check = glade_xml_get_widget (ui, "enable_obexpush_check");
+    accept_obexpush_combo = glade_xml_get_widget (ui, "accept_obexpush_combo");
+    notify_received_obexpush_check = glade_xml_get_widget (ui, "notify_received_obexpush_check");
 
+    /* Network */
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), enabled);
     gtk_widget_set_sensitive (password_combo, enabled);
     gtk_widget_set_sensitive (password_entry, enabled && password_setting != PASSWORD_NEVER);
@@ -171,6 +148,7 @@
     gtk_combo_box_set_active (GTK_COMBO_BOX (password_combo),
 			      password_setting);
 
+    /* Bluetooth ObexFTP */
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (bluetooth_check), bluetooth_enabled);
     gtk_widget_set_sensitive (allow_write_bluetooth_check, bluetooth_enabled);
     gtk_widget_set_sensitive (require_pairing_check, bluetooth_enabled);
@@ -180,6 +158,17 @@
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (require_pairing_check),
     				  require_pairing_enabled);
 
+    /* Bluetooth ObexPush */
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_obexpush_check), bluetooth_obexpush_enabled);
+    gtk_widget_set_sensitive (accept_obexpush_combo, bluetooth_obexpush_enabled);
+    gtk_widget_set_sensitive (notify_received_obexpush_check, bluetooth_obexpush_enabled);
+
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (notify_received_obexpush_check),
+    				  bluetooth_obexpush_notify);
+
+    gtk_combo_box_set_active (GTK_COMBO_BOX (accept_obexpush_combo),
+    			      accept_setting);
+
     g_object_unref (client);
 }
 
@@ -229,6 +218,33 @@
 }
 
 static void
+file_sharing_bluetooth_obexpush_enabled_changed (GConfClient* client,
+						 guint cnxn_id,
+						 GConfEntry *entry,
+						 gpointer data)
+{
+	update_ui ();
+}
+
+static void
+file_sharing_bluetooth_obexpush_accept_files_changed (GConfClient* client,
+						      guint cnxn_id,
+						      GConfEntry *entry,
+						      gpointer data)
+{
+	update_ui ();
+}
+
+static void
+file_sharing_bluetooth_obexpush_notify_changed (GConfClient* client,
+						guint cnxn_id,
+						GConfEntry *entry,
+						gpointer data)
+{
+	update_ui ();
+}
+
+static void
 password_combo_changed (GtkComboBox *combo_box)
 {
     GConfClient *client;
@@ -353,6 +369,62 @@
 	g_object_unref (client);
 }
 
+static void
+enable_obexpush_check_toggled (GtkWidget *check)
+{
+	GConfClient *client;
+	gboolean enabled;
+
+	enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
+
+	client = gconf_client_get_default ();
+
+	gconf_client_set_bool (client,
+			       FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED,
+			       enabled,
+			       NULL);
+
+	g_object_unref (client);
+
+	if (enabled != FALSE)
+		launch_share ();
+}
+
+static void
+accept_obexpush_combo_changed (GtkComboBox *combo_box)
+{
+    GConfClient *client;
+    guint setting;
+
+    setting = gtk_combo_box_get_active (combo_box);
+    
+    client = gconf_client_get_default ();
+
+    gconf_client_set_string (client,
+			     FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES,
+			     accept_string_from_setting (setting),
+			     NULL);
+    g_object_unref (client);
+}
+
+static void
+notify_received_obexpush_check_toggled (GtkWidget *check)
+{
+	GConfClient *client;
+	gboolean enabled;
+
+	enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
+
+	client = gconf_client_get_default ();
+
+	gconf_client_set_bool (client,
+			       FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY,
+			       enabled,
+			       NULL);
+
+	g_object_unref (client);
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -363,6 +435,9 @@
     GtkWidget *bluetooth_check;
     GtkWidget *bluetooth_allow_write_check;
     GtkWidget *require_pairing_check;
+    GtkWidget *enable_obexpush_check;
+    GtkWidget *accept_obexpush_combo;
+    GtkWidget *notify_received_obexpush_check;
     GtkWidget *window;
     GtkListStore *store;
     GtkCellRenderer *cell;
@@ -394,6 +469,12 @@
     bluetooth_check = glade_xml_get_widget (ui, "enable_bluetooth_check");
     bluetooth_allow_write_check = glade_xml_get_widget (ui, "allow_write_bluetooth_check");
     require_pairing_check = glade_xml_get_widget (ui, "require_pairing_check");
+    enable_obexpush_check = glade_xml_get_widget (ui, "enable_obexpush_check");
+    accept_obexpush_combo = glade_xml_get_widget (ui, "accept_obexpush_combo");
+    notify_received_obexpush_check = glade_xml_get_widget (ui, "notify_received_obexpush_check");
+
+    //FIXME implement notifications
+    gtk_widget_hide (notify_received_obexpush_check);
 
     store = gtk_list_store_new (1, G_TYPE_STRING);
     gtk_combo_box_set_model (GTK_COMBO_BOX (password_combo),
@@ -423,6 +504,34 @@
     g_signal_connect (password_entry,
 		      "changed", G_CALLBACK (password_entry_changed), NULL);
 
+    /* Accept files combo */
+    store = gtk_list_store_new (1, G_TYPE_STRING);
+    gtk_combo_box_set_model (GTK_COMBO_BOX (accept_obexpush_combo),
+			     GTK_TREE_MODEL (store));
+    cell = gtk_cell_renderer_text_new ();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (accept_obexpush_combo), cell, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (accept_obexpush_combo), cell,
+				    "text", 0,
+				    NULL);
+
+    /* Keep in same order as enum */
+    gtk_list_store_append (store, &iter);
+    gtk_list_store_set (store, &iter, 0,
+			_("Always"), -1);
+    gtk_list_store_append (store, &iter);
+    gtk_list_store_set (store, &iter, 0,
+			_("Only for Bonded devices"), -1);
+    gtk_list_store_append (store, &iter);
+    gtk_list_store_set (store, &iter, 0,
+			_("Only for Paired and Trusted devices"), -1);
+    //FIXME implement
+#if 0
+    gtk_list_store_append (store, &iter);
+    gtk_list_store_set (store, &iter, 0,
+    			_("Ask"), -1);
+#endif
+    g_object_unref (store);
+
     update_ui ();
 
     g_signal_connect (check,
@@ -435,11 +544,16 @@
     		      "toggled", G_CALLBACK (bluetooth_allow_write_check_toggled), NULL);
     g_signal_connect (require_pairing_check,
     		      "toggled", G_CALLBACK (bluetooth_require_pairing_check_toggled), NULL);
+    g_signal_connect (enable_obexpush_check,
+    		      "toggled", G_CALLBACK (enable_obexpush_check_toggled), NULL);
+    g_signal_connect (accept_obexpush_combo,
+    		      "changed", G_CALLBACK (accept_obexpush_combo_changed), NULL);
+    g_signal_connect (notify_received_obexpush_check,
+    		      "toggled", G_CALLBACK (notify_received_obexpush_check_toggled), NULL);
 
     g_signal_connect (glade_xml_get_widget (ui, "close_button"),
 		      "clicked", G_CALLBACK (gtk_main_quit), NULL);
 
-    
     gconf_client_notify_add (client,
 			     FILE_SHARING_ENABLED,
 			     file_sharing_enabled_changed,
@@ -470,6 +584,24 @@
 			     NULL,
 			     NULL,
 			     NULL);
+    gconf_client_notify_add (client,
+    			     FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED,
+    			     file_sharing_bluetooth_obexpush_enabled_changed,
+    			     NULL,
+    			     NULL,
+    			     NULL);
+    gconf_client_notify_add (client,
+    			     FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES,
+    			     file_sharing_bluetooth_obexpush_accept_files_changed,
+    			     NULL,
+    			     NULL,
+    			     NULL);
+    gconf_client_notify_add (client,
+    			     FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY,
+			     file_sharing_bluetooth_obexpush_notify_changed,
+			     NULL,
+			     NULL,
+			     NULL);
 
     g_object_unref (client);
 

Modified: trunk/file-share-properties.glade
==============================================================================
--- trunk/file-share-properties.glade	(original)
+++ trunk/file-share-properties.glade	Sat Feb 23 01:03:46 2008
@@ -298,7 +298,7 @@
 		    <widget class="GtkCheckButton" id="require_pairing_check">
 		      <property name="visible">True</property>
 		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Require remote devices to pair with this computer</property>
+		      <property name="label" translatable="yes">Require remote devices to bond with this computer</property>
 		      <property name="use_underline">True</property>
 		      <property name="relief">GTK_RELIEF_NORMAL</property>
 		      <property name="focus_on_click">True</property>
@@ -346,6 +346,154 @@
 	  <property name="fill">True</property>
 	</packing>
       </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame4">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment4">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">6</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table3">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">12</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="enable_obexpush_check">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Receive files in Downloads folder over Bluetooth</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkComboBox" id="accept_obexpush_combo">
+		      <property name="visible">True</property>
+		      <property name="add_tearoffs">False</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label9">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Accept files: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="notify_received_obexpush_check">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Notify about received files</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label8">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;b&gt;Receive Files over Bluetooth&lt;/b&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
   </child>
 </widget>

Added: trunk/icons/16x16/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/icons/16x16/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,4 @@
+icondir = $(datadir)/icons/hicolor/16x16/apps
+icon_DATA = gnome-obex-server.png
+
+EXTRA_DIST = $(icon_DATA)

Added: trunk/icons/16x16/gnome-obex-server.png
==============================================================================
Binary file. No diff available.

Added: trunk/icons/16x16/gnome-obex-server.svg
==============================================================================
--- (empty file)
+++ trunk/icons/16x16/gnome-obex-server.svg	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="16"
+   height="16"
+   id="svg4908"
+   sodipodi:version="0.32"
+   inkscape:version="0.45+devel"
+   version="1.0"
+   sodipodi:docname="gnome-obex-server.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/andreas/project/application icons/16x16/gnome-obex-server.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4910">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5671">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop5673" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop5675" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5671"
+       id="linearGradient5677"
+       x1="10.915961"
+       y1="14.618162"
+       x2="10.915961"
+       y2="17.804298"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.817014,0,0,0.7715344,-0.9874811,-0.2616832)" />
+    <filter
+       inkscape:collect="always"
+       id="filter5761"
+       x="-0.077635549"
+       width="1.1552711"
+       y="-0.41717416"
+       height="1.8343483">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.45085227"
+         id="feGaussianBlur5763" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="6.2469959"
+     inkscape:cy="10.785095"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     width="16px"
+     height="16px"
+     inkscape:window-width="1680"
+     inkscape:window-height="948"
+     inkscape:window-x="0"
+     inkscape:window-y="51">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5068" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4913">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       style="fill:url(#linearGradient5677);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 3.5361624,15.575215 L 8.0061974,7.5481055 L 12.479657,15.581363 L 3.5361624,15.575215 z"
+       id="path5070" />
+    <path
+       style="opacity:0.18055558;fill:none;fill-rule:evenodd;stroke:#eeeeec;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 5.2563684,14.556116 L 7.9617908,9.5516601 L 10.64818,14.559949 L 5.2563684,14.556116 z"
+       id="path5665"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.19444442;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 19.364029,5.0685124 C 19.364029,5.0685124 21.238628,3.1466987 24.099857,3.1405722 C 26.985751,3.1343929 28.934348,5.142664 28.934348,5.142664"
+       id="path5667"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:0.18981479;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 21.287959,7.7379681 C 21.287959,7.7379681 22.219094,6.3597453 24.149189,6.3785231 C 26.05462,6.397061 26.862422,7.7379681 26.862422,7.7379681"
+       id="path5669"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:1;fill:#5886bd;fill-opacity:1;stroke:#193a6b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 7.9843748,0.5 C 3.8478795,0.50000002 0.49999999,3.8528187 0.49999999,8 C 0.49999999,9.8391013 1.136016,11.540198 2.2295824,12.84375 L 3.9591648,10.15625 C 3.6171141,9.5186062 3.4245666,8.8051787 3.4245666,8.03125 C 3.4245666,5.5307441 5.4489373,3.5 7.9529279,3.5 C 10.456919,3.4999999 12.481289,5.5307438 12.481289,8.03125 C 12.481289,8.7555782 12.280321,9.4236996 11.978138,10.03125 L 13.739167,12.78125 C 14.806464,11.485196 15.46875,9.8143917 15.46875,8 C 15.46875,3.8528189 12.120869,0.5 7.9843748,0.5 z"
+       id="path5801" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.32407407"
+       d="M 2.46875,11.34375 C 1.4166667,10.1875 1.3958333,8.875 1.46875,7.1875 C 1.46875,7.1875 2.3657907,1.53125 8.03125,1.53125 C 13.759201,1.53125 14.5,7.09375 14.5,7.09375 C 14.5625,8.7604167 14.3125,10.239583 13.5625,11.3125"
+       id="path5816"
+       sodipodi:nodetypes="cczcc" />
+  </g>
+</svg>

Added: trunk/icons/22x22/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/icons/22x22/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,4 @@
+icondir = $(datadir)/icons/hicolor/22x22/apps
+icon_DATA = gnome-obex-server.png
+
+EXTRA_DIST = $(icon_DATA)

Added: trunk/icons/22x22/gnome-obex-server.png
==============================================================================
Binary file. No diff available.

Added: trunk/icons/22x22/gnome-obex-server.svg
==============================================================================
--- (empty file)
+++ trunk/icons/22x22/gnome-obex-server.svg	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="22"
+   height="22"
+   id="svg4908"
+   sodipodi:version="0.32"
+   inkscape:version="0.45+devel"
+   version="1.0"
+   sodipodi:docname="gnome-obex-server.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/andreas/project/application icons/22x22/gnome-obex-server.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4910">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5671">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop5673" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop5675" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5671"
+       id="linearGradient5677"
+       x1="10.915961"
+       y1="14.618162"
+       x2="10.915961"
+       y2="17.804298"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:collect="always"
+       id="filter5761"
+       x="-0.077635548"
+       width="1.1552711"
+       y="-0.41717415"
+       height="1.8343483">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.45085227"
+         id="feGaussianBlur5763" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="16.885608"
+     inkscape:cy="10.548677"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     width="22px"
+     height="22px"
+     inkscape:window-width="1680"
+     inkscape:window-height="948"
+     inkscape:window-x="0"
+     inkscape:window-y="51">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5068" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4913">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:0.24074074;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5761)"
+       id="rect5679"
+       width="13.9375"
+       height="2.59375"
+       x="4.03125"
+       y="18.96875"
+       rx="0.93768394"
+       ry="1.0517266"
+       transform="matrix(1,0,0,0.8915663,0,2.3381024)" />
+    <path
+       style="opacity:1;fill:#8aafd7;fill-opacity:1;stroke:#193a6b;stroke-width:0.99999987999999995;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 11 4.53125 C 7.9806577 4.53125 5.5312502 6.9995834 5.53125 10.03125 C 5.53125 11.547083 6.1352302 12.910208 7.125 13.90625 L 8.1875 12.03125 C 7.7804347 11.469355 7.53125 10.804529 7.53125 10.0625 C 7.5312502 8.1646277 9.0964062 6.625 11.03125 6.625 C 12.966094 6.6250002 14.5625 8.1646277 14.5625 10.0625 C 14.5625 10.774202 14.351401 11.420104 13.96875 11.96875 L 15 13.78125 C 15.915059 12.797398 16.46875 11.481302 16.46875 10.03125 C 16.46875 6.9995838 14.019343 4.5312501 11 4.53125 z "
+       id="path5654" />
+    <path
+       style="opacity:1;fill:#82aad5;fill-opacity:1;stroke:#1d437b;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 10.96875 0.46875 C 5.7434389 0.46875 1.53125 4.7121889 1.53125 9.9375 C 1.53125 12.933829 2.9268598 15.60811 5.09375 17.34375 L 6.09375 15.59375 C 4.512494 14.223454 3.5 12.235262 3.5 10 C 3.5 5.8838358 6.8847157 2.5625 11.0625 2.5625 C 15.240284 2.5625 18.625 5.8838354 18.625 10 C 18.625001 12.194721 17.656675 14.163154 16.125 15.53125 L 17.0625 17.1875 C 19.128107 15.449882 20.4375 12.844895 20.4375 9.9375 C 20.4375 4.7121889 16.194061 0.46874999 10.96875 0.46875 z "
+       id="path5072" />
+    <path
+       style="fill:url(#linearGradient5677);fill-rule:evenodd;stroke:#204a87;stroke-width:0.99999994000000003px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
+       d="M 5.5368005,20.526497 L 11.007986,10.122412 L 16.483364,20.534467 L 5.5368005,20.526497 z"
+       id="path5070" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#eeeeec;stroke-width:0.99999994000000003px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.18055556"
+       d="M 7.1618005,19.497759 L 11.007986,12.372412 L 14.827114,19.503217 L 7.1618005,19.497759 z"
+       id="path5665"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;opacity:0.19444444"
+       d="M 5.03125,3.9375 C 5.03125,3.9375 7.4062499,1.5077456 11.03125,1.4999999 C 14.6875,1.4921874 17.15625,4.03125 17.15625,4.03125"
+       id="path5667"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;opacity:0.18981481"
+       d="M 7.46875,7.3125 C 7.46875,7.3125 8.6484404,5.5700091 11.09375,5.59375 C 13.507813,5.6171875 14.53125,7.3125 14.53125,7.3125"
+       id="path5669"
+       sodipodi:nodetypes="czc" />
+  </g>
+</svg>

Added: trunk/icons/32x32/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/icons/32x32/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,4 @@
+icondir = $(datadir)/icons/hicolor/32x32/apps
+icon_DATA = gnome-obex-server.png
+
+EXTRA_DIST = $(icon_DATA)

Added: trunk/icons/32x32/gnome-obex-server.png
==============================================================================
Binary file. No diff available.

Added: trunk/icons/32x32/gnome-obex-server.svg
==============================================================================
--- (empty file)
+++ trunk/icons/32x32/gnome-obex-server.svg	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="32"
+   height="32"
+   id="svg4908"
+   sodipodi:version="0.32"
+   inkscape:version="0.45+devel"
+   version="1.0"
+   sodipodi:docname="gnome-obex-server.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/andreas/project/application icons/32x32/gnome-obex-server.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4910">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5671">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop5673" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop5675" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5671"
+       id="linearGradient5677"
+       x1="10.915961"
+       y1="14.010388"
+       x2="10.915961"
+       y2="18.908218"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5571915,0,0,1.388736,-1.1436972,1.0476737)" />
+    <filter
+       inkscape:collect="always"
+       id="filter5761"
+       x="-0.077635549"
+       width="1.1552711"
+       y="-0.41717416"
+       height="1.8343483">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.45085227"
+         id="feGaussianBlur5763" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="22.627417"
+     inkscape:cx="19.269619"
+     inkscape:cy="15.886843"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     width="32px"
+     height="32px"
+     inkscape:window-width="1680"
+     inkscape:window-height="948"
+     inkscape:window-x="0"
+     inkscape:window-y="51">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5068" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4913">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:0.24074073;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5761)"
+       id="rect5679"
+       width="13.9375"
+       height="2.59375"
+       x="4.03125"
+       y="18.96875"
+       rx="0.66293061"
+       ry="0.74445522"
+       transform="matrix(1.4144526,0,0,1.2595572,0.4278694,4.1077744)" />
+    <path
+       style="opacity:0.19444442;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 7.544334,6.367318 C 7.544334,6.367318 10.903659,2.9346907 16.03105,2.923748 C 21.202642,2.9127109 24.694572,6.499763 24.694572,6.499763"
+       id="path5667"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:0.18981479;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 10.992062,11.135338 C 10.992062,11.135338 12.660678,8.6736397 16.119453,8.7071795 C 19.534031,8.7402908 20.981634,11.135338 20.981634,11.135338"
+       id="path5669"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:1;fill:#5886bd;fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 16 1.5 C 8.5350733 1.5 2.46875 7.5663245 2.46875 15.03125 C 2.46875 19.277634 4.4332486 23.080432 7.5 25.5625 L 8.59375 23.8125 C 6.1177395 21.697291 4.5625 18.540934 4.5625 15.03125 C 4.5625001 8.6641071 9.7388038 3.5 16.09375 3.5 C 22.448696 3.5 27.59375 8.6641071 27.59375 15.03125 C 27.59375 18.556827 26.018124 21.728338 23.53125 23.84375 L 24.5625 25.5 C 27.590107 23.017072 29.531251 19.246059 29.53125 15.03125 C 29.53125 7.5663241 23.464927 1.5 16 1.5 z "
+       id="path5064" />
+    <path
+       style="opacity:1;fill:#5886bd;fill-opacity:1;stroke:#204a87;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 16.03125 6.5 C 11.310781 6.5 7.5 10.303927 7.5 15 C 7.5 17.435445 8.5422697 19.60686 10.1875 21.15625 L 11.28125 19.40625 C 10.206455 18.251079 9.5625 16.704332 9.5625 15 C 9.5624997 11.426105 12.445158 8.5 16.03125 8.5 C 19.617342 8.5 22.53125 11.426105 22.53125 15 C 22.53125 16.737378 21.838457 18.306877 20.71875 19.46875 L 21.84375 21.21875 C 23.531083 19.666581 24.59375 17.463979 24.59375 15 C 24.59375 10.303927 20.751718 6.5000001 16.03125 6.5 z "
+       id="path5655" />
+    <path
+       style="opacity:1;fill:#5886bd;fill-opacity:1;stroke:#204a87;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 16 11.5 C 14.07278 11.5 12.5 13.079635 12.5 15.03125 C 12.5 16.982865 14.07278 18.593749 16 18.59375 C 17.92722 18.59375 19.5 16.982865 19.5 15.03125 C 19.5 13.079635 17.92722 11.5 16 11.5 z M 16.03125 13.5 C 16.860688 13.5 17.53125 14.170564 17.53125 15 C 17.53125 15.829436 16.860687 16.53125 16.03125 16.53125 C 15.201814 16.531249 14.53125 15.829436 14.53125 15 C 14.53125 14.170564 15.201813 13.5 16.03125 13.5 z "
+       id="path5659" />
+    <path
+       style="fill:url(#linearGradient5677);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:0.99999987999999995px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 7.4781612,29.553558 L 15.997845,15.105031 L 24.524055,29.564626 L 7.4781612,29.553558 z"
+       id="path5070" />
+    <path
+       style="opacity:0.18055558;fill:none;fill-rule:evenodd;stroke:#eeeeec;stroke-width:0.99999982px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 9.3078964,28.505338 L 16.018236,17.22121 L 22.681368,28.513981 L 9.3078964,28.505338 z"
+       id="path5665"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;opacity:0.32407407"
+       d="M 7.2036503,6.1022141 C 7.2036503,6.1022141 10.848917,2.4782918 16.042485,2.4782918 C 21.280241,2.4782918 24.837126,6.1022141 24.837126,6.1022141"
+       id="path5689"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;opacity:0.32407407"
+       d="M 11.081475,9.339651 C 11.081475,9.339651 13.00182,7.4834956 15.89864,7.4834956 C 18.751286,7.4834956 20.715805,9.1628743 20.715805,9.1628743"
+       id="path5691"
+       sodipodi:nodetypes="czc" />
+  </g>
+</svg>

Added: trunk/icons/48x48/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/icons/48x48/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,4 @@
+icondir = $(datadir)/icons/hicolor/48x48/apps
+icon_DATA = gnome-obex-server.png
+
+EXTRA_DIST = $(icon_DATA)

Added: trunk/icons/48x48/gnome-obex-server.png
==============================================================================
Binary file. No diff available.

Added: trunk/icons/48x48/gnome-obex-server.svg
==============================================================================
--- (empty file)
+++ trunk/icons/48x48/gnome-obex-server.svg	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:xlink="http://www.w3.org/1999/xlink";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="48"
+   height="48"
+   id="svg4908"
+   sodipodi:version="0.32"
+   inkscape:version="0.45+devel"
+   version="1.0"
+   sodipodi:docname="gnome-obex-server.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="/home/andreas/project/application icons/48x48/gnome-obex-server.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4910">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5671">
+      <stop
+         style="stop-color:#729fcf;stop-opacity:1;"
+         offset="0"
+         id="stop5673" />
+      <stop
+         style="stop-color:#3465a4;stop-opacity:1"
+         offset="1"
+         id="stop5675" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5671"
+       id="linearGradient5677"
+       x1="10.915961"
+       y1="14.010388"
+       x2="10.915961"
+       y2="18.908218"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.3340955,0,0,2.0797356,-1.8209963,2.8226078)" />
+    <filter
+       inkscape:collect="always"
+       id="filter5761"
+       x="-0.077635549"
+       width="1.1552711"
+       y="-0.41717416"
+       height="1.8343483">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.45085227"
+         id="feGaussianBlur5763" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="27.236135"
+     inkscape:cy="18.964041"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     width="48px"
+     height="48px"
+     inkscape:window-width="1680"
+     inkscape:window-height="948"
+     inkscape:window-x="0"
+     inkscape:window-y="51">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5068" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata4913">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <rect
+       style="opacity:0.24074073;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5761)"
+       id="rect5679"
+       width="13.9375"
+       height="2.59375"
+       x="4.03125"
+       y="18.96875"
+       rx="0.4498865"
+       ry="0.63501096"
+       transform="matrix(2.0842678,0,0,1.4766422,0.6792651,15.488168)" />
+    <path
+       style="opacity:0.19444442;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 11.201612,10.789171 C 11.201612,10.789171 16.23695,5.6485564 23.922466,5.6321688 C 31.674235,5.61564 36.908337,10.987518 36.908337,10.987518"
+       id="path5667"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:0.18981479;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 16.369458,17.929637 C 16.369458,17.929637 18.870569,14.24306 24.054974,14.293288 C 29.173132,14.342875 31.342964,17.929637 31.342964,17.929637"
+       id="path5669"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:1;fill:#5886bd;fill-opacity:1;stroke:#204a87;stroke-width:1.00000024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 24.063425,18.475748 C 21.071443,18.475748 18.629727,20.910956 18.629727,23.919619 C 18.629727,26.928283 21.071443,29.411666 24.063425,29.411667 C 27.055404,29.411667 29.497123,26.928283 29.497123,23.919619 C 29.497123,20.910956 27.055404,18.475748 24.063425,18.475748 z M 24.111941,21.559001 C 25.39963,21.559001 26.440667,22.592762 26.440667,23.871444 C 26.440667,25.150125 25.399628,26.23206 24.111941,26.23206 C 22.824252,26.232058 21.783212,25.150125 21.783212,23.871444 C 21.783212,22.592762 22.82425,21.559001 24.111941,21.559001 z"
+       id="path5659" />
+    <path
+       sodipodi:type="arc"
+       style="opacity:0.33333333;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.88196582000000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       id="path5685"
+       sodipodi:cx="23.968752"
+       sodipodi:cy="24.156248"
+       sodipodi:rx="3.9687502"
+       sodipodi:ry="3.9687502"
+       d="M 27.937502,24.156248 A 3.9687502,3.9687502 0 1 1 20.000002,24.156248 A 3.9687502,3.9687502 0 1 1 27.937502,24.156248 z"
+       transform="matrix(1.1259842,0,0,1.1417322,-2.9571854,-3.4862202)" />
+    <path
+       style="fill:url(#linearGradient5677);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 11.102425,45.512293 L 23.872694,23.874548 L 36.652747,45.528868 L 11.102425,45.512293 z"
+       id="path5070" />
+    <path
+       style="opacity:0.18055558;fill:none;fill-rule:evenodd;stroke:#eeeeec;stroke-width:0.99999988px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 12.907539,44.503764 L 23.875207,25.981184 L 34.765717,44.51795 L 12.907539,44.503764 z"
+       id="path5665"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="opacity:0.32407406;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 10.690956,10.392159 C 10.690956,10.392159 16.154896,4.965065 23.939606,4.965065 C 31.79055,4.965065 37.122013,10.392159 37.122013,10.392159"
+       id="path5689"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:0.32407406;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 16.503481,15.240462 C 16.503481,15.240462 19.381912,12.460731 23.723995,12.460731 C 27.999865,12.460731 30.944509,14.975725 30.944509,14.975725"
+       id="path5691"
+       sodipodi:nodetypes="czc" />
+    <path
+       style="opacity:1;fill:#6694c7;fill-opacity:1;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 24 3.5625 C 12.683999 3.5625 3.5 12.732501 3.5 24.03125 C 3.5 30.555462 6.5771446 36.344721 11.34375 40.09375 L 12.96875 37.53125 C 9.0539883 34.332748 6.5625 29.445753 6.5625 24 C 6.5624999 14.374501 14.3745 6.5625 24 6.5625 C 33.6255 6.5625002 41.4375 14.3745 41.4375 24 C 41.4375 29.430049 38.95783 34.301145 35.0625 37.5 L 36.6875 40.0625 C 41.434373 36.312581 44.5 30.539706 44.5 24.03125 C 44.5 12.7325 35.316001 3.5625 24 3.5625 z "
+       id="path5067" />
+    <path
+       style="opacity:1;fill:#729fcf;fill-opacity:1;stroke:#204a87;stroke-width:0.99999987999999995;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 24.03125 11.5 C 17.114 11.5 11.5 17.114001 11.5 24.03125 C 11.5 27.714001 13.092947 31.019097 15.625 33.3125 L 17.28125 30.65625 C 15.593863 28.947748 14.5625 26.612039 14.5625 24.03125 C 14.5625 18.804501 18.8325 14.5625 24.09375 14.5625 C 29.355001 14.5625 33.625 18.804501 33.625 24.03125 C 33.625001 26.660145 32.555745 29.033799 30.8125 30.75 L 32.4375 33.3125 C 34.969554 31.019097 36.562501 27.714001 36.5625 24.03125 C 36.5625 17.114 30.9485 11.5 24.03125 11.5 z "
+       id="path5648" />
+    <path
+       style="opacity:0.33333333;fill:none;fill-opacity:1;stroke:#eeeeec;stroke-width:1.00000011999999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 36.875,38.500446 C 40.946766,34.939899 43.4375,30.173923 43.4375,24.047266 C 43.4375,13.326175 34.715501,4.6249996 23.96875,4.6249998 C 13.222,4.6249998 4.5,13.326175 4.5,24.047266 C 4.5,30.205192 7.0141711,34.878371 11.1875,38.499998"
+       id="path5664"
+       sodipodi:nodetypes="cscsc" />
+    <path
+       style="opacity:0.33333333;fill:none;fill-opacity:1;stroke:#eeeeec;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="M 32.65625,31.71875 C 34.554756,29.554337 35.499999,27.387589 35.5,24.09375 C 35.5,17.7285 30.348,12.5625 24,12.5625 C 17.652,12.5625 12.5,17.7285 12.5,24.09375 C 12.5,27.403477 13.707783,29.646402 15.625,31.75"
+       id="path5677"
+       sodipodi:nodetypes="cscsc" />
+  </g>
+</svg>

Added: trunk/icons/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/icons/Makefile.am	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,15 @@
+SUBDIRS = 16x16 22x22 32x32 48x48
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache); \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache)"; \
+	fi
+

Added: trunk/marshal.list
==============================================================================
--- (empty file)
+++ trunk/marshal.list	Sat Feb 23 01:03:46 2008
@@ -0,0 +1 @@
+VOID:STRING,STRING,UINT64

Modified: trunk/obexftp.c
==============================================================================
--- trunk/obexftp.c	(original)
+++ trunk/obexftp.c	Sat Feb 23 01:03:46 2008
@@ -41,13 +41,13 @@
 {
 	GError *err = NULL;
 	GConfClient *client;
-	char *public_dir, *session;
+	char *public_dir, *server;
 	gboolean allow_write, require_pairing;
 
 	client = gconf_client_get_default ();
 	require_pairing = gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING, NULL);
 
-	session = NULL;
+	server = NULL;
 	if (manager_proxy == NULL) {
 		manager_proxy = dbus_g_proxy_new_for_name (connection,
 							   "org.openobex",
@@ -55,8 +55,8 @@
 							   "org.openobex.Manager");
 		if (dbus_g_proxy_call (manager_proxy, "CreateBluetoothServer",
 				       &err, G_TYPE_STRING, "00:00:00:00:00:00", G_TYPE_STRING, "ftp", G_TYPE_BOOLEAN, require_pairing, G_TYPE_INVALID,
-				       DBUS_TYPE_G_OBJECT_PATH, &session, G_TYPE_INVALID) == FALSE) {
-			g_printerr ("Creating Bluetooth server failed: %s\n",
+				       DBUS_TYPE_G_OBJECT_PATH, &server, G_TYPE_INVALID) == FALSE) {
+			g_printerr ("Creating Bluetooth ObexFTP server failed: %s\n",
 				    err->message);
 			g_error_free (err);
 			g_object_unref (manager_proxy);
@@ -72,14 +72,14 @@
 	if (server_proxy == NULL) {
 		server_proxy = dbus_g_proxy_new_for_name (connection,
 							   "org.openobex",
-							   session,
+							   server,
 							   "org.openobex.Server");
-		g_free (session);
+		g_free (server);
 	}
 	if (dbus_g_proxy_call (server_proxy, "Start", &err,
 			   G_TYPE_STRING, public_dir, G_TYPE_BOOLEAN, allow_write, G_TYPE_BOOLEAN, TRUE, G_TYPE_INVALID,
 			   G_TYPE_INVALID) == FALSE) {
-		g_printerr ("Starting Bluetooth server session failed: %s\n",
+		g_printerr ("Starting Bluetooth ObexFTP server failed: %s\n",
 			    err->message);
 		g_error_free (err);
 		g_free (public_dir);
@@ -108,7 +108,7 @@
 			error_name = dbus_g_error_get_name (err);
 		if (error_name == NULL ||
 		    (error_name != NULL && strcmp (error_name, "org.openobex.Error.NotStarted") != 0)) {
-			g_printerr ("Stopping Bluetooth server session failed: %s\n",
+			g_printerr ("Stopping Bluetooth ObexFTP server failed: %s\n",
 				    err->message);
 			g_error_free (err);
 			return;

Added: trunk/obexpush.c
==============================================================================
--- (empty file)
+++ trunk/obexpush.c	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,393 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+
+/*
+ *  Copyright (C) 2004-2008 Red Hat, Inc.
+ *
+ *  Nautilus is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation; either version 2 of the
+ *  License, or (at your option) any later version.
+ *
+ *  Nautilus 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Authors: Bastien Nocera <hadess hadess net>
+ *
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+#include <dbus/dbus-glib.h>
+#include <gconf/gconf-client.h>
+
+#include <string.h>
+
+#include "marshal.h"
+#include "obexpush.h"
+#include "user_share.h"
+
+#define DBUS_TYPE_G_STRING_VARIANT_HASHTABLE (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING))
+
+static DBusGConnection *connection = NULL;
+static DBusGProxy *manager_proxy = NULL;
+static DBusGProxy *server_proxy = NULL;
+static AcceptSetting accept_setting = -1;
+static gboolean show_notifications = FALSE;
+static GtkStatusIcon *statusicon = NULL;
+
+static void
+show_icon (void)
+{
+	if (statusicon == NULL) {
+		statusicon = gtk_status_icon_new_from_icon_name ("gnome-obex-server");
+	} else {
+		gtk_status_icon_set_visible (statusicon, TRUE);
+	}
+}
+
+static gboolean
+device_is_authorised (const char *bdaddr)
+{
+	DBusGConnection *connection;
+	DBusGProxy *manager;
+	GError *error = NULL;
+	char **adapters;
+	gboolean retval = FALSE;
+	guint i;
+
+	connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
+	if (connection == NULL)
+		return FALSE;
+
+	manager = dbus_g_proxy_new_for_name (connection, "org.bluez",
+					     "/org/bluez", "org.bluez.Manager");
+	if (manager == NULL) {
+		dbus_g_connection_unref (connection);
+		return FALSE;
+	}
+
+	if (dbus_g_proxy_call (manager, "ListAdapters", &error, G_TYPE_INVALID, G_TYPE_STRV, &adapters, G_TYPE_INVALID) == FALSE) {
+		g_object_unref (manager);
+		dbus_g_connection_unref (connection);
+		return FALSE;
+	}
+
+	for (i = 0; adapters[i] != NULL; i++) {
+		DBusGProxy *adapter;
+		gboolean bonded, trusted;
+
+		g_message ("checking adapter %s", adapters[i]);
+
+		adapter = dbus_g_proxy_new_for_name (connection, "org.bluez",
+						    adapters[i], "org.bluez.Adapter");
+		if (dbus_g_proxy_call (adapter, "HasBonding", NULL,
+				      G_TYPE_STRING, bdaddr, G_TYPE_INVALID,
+				      G_TYPE_BOOLEAN, &bonded, G_TYPE_INVALID) != FALSE) {
+			g_message ("%s is %s", bdaddr, bonded ? "bonded" : "not bonded");
+			if (bonded != FALSE) {
+				retval = TRUE;
+				g_object_unref (adapter);
+				break;
+			}
+		}
+		if (accept_setting == ACCEPT_BONDED_AND_TRUSTED &&
+		    dbus_g_proxy_call (adapter, "IsTrusted", NULL,
+				       G_TYPE_STRING, bdaddr, G_TYPE_INVALID,
+				       G_TYPE_BOOLEAN, &trusted, G_TYPE_INVALID) != FALSE) {
+			g_message ("%s is %s", bdaddr, trusted ? "trusted" : "not trusted");
+			if (trusted != FALSE) {
+				retval = TRUE;
+				g_object_unref (adapter);
+				break;
+			}
+		}
+
+		g_object_unref(adapter);
+	}
+
+	g_strfreev(adapters);
+	g_object_unref(manager);
+	dbus_g_connection_unref(connection);
+
+	return retval;
+}
+
+static void
+transfer_started_cb (DBusGProxy *session,
+		     const char *filename,
+		     const char *local_path,
+		     guint64 size,
+		     gpointer user_data)
+{
+	GHashTable *dict;
+	DBusGProxy *server = (DBusGProxy *) user_data;
+	GError *error = NULL;
+	gboolean authorise;
+
+	g_message ("transfer started on %s", local_path);
+	g_object_set_data_full (G_OBJECT (session), "filename", g_strdup (local_path), (GDestroyNotify) g_free);
+
+	show_icon ();
+
+	/* First transfer of the session */
+	if (g_object_get_data (G_OBJECT (session), "bdaddr") == NULL) {
+		const char *bdaddr;
+
+		if (dbus_g_proxy_call (server, "GetServerSessionInfo", &error,
+				       DBUS_TYPE_G_OBJECT_PATH, dbus_g_proxy_get_path (session), G_TYPE_INVALID,
+				       DBUS_TYPE_G_STRING_VARIANT_HASHTABLE, &dict, G_TYPE_INVALID) == FALSE) {
+			g_printerr ("Getting Server session info failed: %s\n",
+				    error->message);
+			g_error_free (error);
+			return;
+		}
+
+		bdaddr = g_hash_table_lookup (dict, "BluetoothAddress");
+		g_message ("transfer started for device %s", bdaddr);
+
+		g_object_set_data_full (G_OBJECT (session), "bdaddr", g_strdup (bdaddr), (GDestroyNotify) g_free);
+		/* Initial accept method is undefined, we do that lower down */
+		g_object_set_data (G_OBJECT (session), "accept-method", GINT_TO_POINTER (-1));
+		g_hash_table_destroy (dict);
+	}
+
+	/* Accept method changed */
+	if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (session), "accept-method")) != accept_setting) {
+		const char *bdaddr;
+
+		bdaddr = g_object_get_data (G_OBJECT (session), "bdaddr");
+
+		if (bdaddr == NULL) {
+			g_warning ("Couldn't get the Bluetooth address for the device, rejecting the transfer");
+			authorise = FALSE;
+		} else if (accept_setting == ACCEPT_ALWAYS) {
+			authorise = TRUE;
+		} else if (accept_setting == ACCEPT_BONDED || accept_setting == ACCEPT_BONDED_AND_TRUSTED) {
+			authorise = device_is_authorised (bdaddr);
+		} else {
+			//FIXME implement
+			g_warning ("\"Ask\" authorisation method not implemented");
+			authorise = FALSE;
+		}
+		g_object_set_data (G_OBJECT (session), "authorise", GINT_TO_POINTER (authorise));
+	}
+
+	g_message ("accept_setting: %d", accept_setting);
+
+	authorise = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (session), "authorise"));
+	if (authorise != FALSE) {
+		if (dbus_g_proxy_call (session, "Accept", &error, G_TYPE_INVALID, G_TYPE_INVALID) == FALSE) {
+			g_printerr ("Failed to accept file transfer: %s\n", error->message);
+			g_error_free (error);
+			return;
+		}
+		g_message ("authorised transfer");
+	} else {
+		if (dbus_g_proxy_call (session, "Reject", &error, G_TYPE_INVALID, G_TYPE_INVALID) == FALSE) {
+			g_printerr ("Failed to reject file transfer: %s\n", error->message);
+			g_error_free (error);
+			return;
+		}
+		g_message ("rejected transfer");
+	}
+}
+
+static void
+transfer_completed_cb (DBusGProxy *session,
+		       gpointer user_data)
+{
+	g_message ("file finish transfer: %s",
+		   (char *) g_object_get_data (G_OBJECT (session), "filename"));
+	//FIXME display a notification if "show_notifications" is TRUE
+	g_object_set_data (G_OBJECT (session), "filename", NULL);
+
+	//FIXME only hide it when the popup's been dismissed or timed out
+	gtk_status_icon_set_visible (statusicon, FALSE);
+}
+
+static void
+cancelled_cb (DBusGProxy *session,
+	      gpointer user_data)
+{
+	//FIXME implement properly
+	transfer_completed_cb (session, user_data);
+}
+
+static void
+error_occurred_cb (DBusGProxy *session,
+		   const char *error_name,
+		   const char *error_message,
+		   gpointer user_data)
+{
+	//FIXME implement properly
+	g_message ("transfer error occurred: %s", error_message);
+	transfer_completed_cb (session, user_data);
+}
+
+static void
+session_created_cb (DBusGProxy *server, const char *session_path, gpointer user_data)
+{
+	DBusGProxy *session;
+
+	session = dbus_g_proxy_new_for_name (connection,
+					     "org.openobex",
+					     session_path,
+					     "org.openobex.ServerSession");
+
+	dbus_g_proxy_add_signal (session, "TransferStarted",
+				 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID);
+	dbus_g_proxy_connect_signal(session, "TransferStarted",
+				    G_CALLBACK (transfer_started_cb), server, NULL);
+	dbus_g_proxy_add_signal (session, "TransferCompleted",
+				 G_TYPE_INVALID, G_TYPE_INVALID);
+	dbus_g_proxy_connect_signal(session, "TransferCompleted",
+				    G_CALLBACK (transfer_completed_cb), server, NULL);
+	dbus_g_proxy_add_signal (session, "Cancelled",
+				 G_TYPE_INVALID, G_TYPE_INVALID);
+	dbus_g_proxy_connect_signal(session, "Cancelled",
+				    G_CALLBACK (cancelled_cb), server, NULL);
+	dbus_g_proxy_add_signal (session, "ErrorOccurred",
+				 G_TYPE_INVALID, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+	dbus_g_proxy_connect_signal(session, "ErrorOccurred",
+				    G_CALLBACK (error_occurred_cb), server, NULL);
+}
+
+void
+obexpush_up (void)
+{
+	GError *err = NULL;
+	char *download_dir, *server;
+
+	server = NULL;
+	if (manager_proxy == NULL) {
+		manager_proxy = dbus_g_proxy_new_for_name (connection,
+							   "org.openobex",
+							   "/org/openobex",
+							   "org.openobex.Manager");
+		if (dbus_g_proxy_call (manager_proxy, "CreateBluetoothServer",
+				       &err, G_TYPE_STRING, "00:00:00:00:00:00", G_TYPE_STRING, "opp", G_TYPE_BOOLEAN, FALSE, G_TYPE_INVALID,
+				       DBUS_TYPE_G_OBJECT_PATH, &server, G_TYPE_INVALID) == FALSE) {
+			g_printerr ("Creating Bluetooth ObexPush server failed: %s\n",
+				    err->message);
+			g_error_free (err);
+			g_object_unref (manager_proxy);
+			manager_proxy = NULL;
+			return;
+		}
+	}
+
+	download_dir = lookup_download_dir ();
+
+	if (server_proxy == NULL) {
+		server_proxy = dbus_g_proxy_new_for_name (connection,
+							   "org.openobex",
+							   server,
+							   "org.openobex.Server");
+		g_free (server);
+
+		dbus_g_proxy_add_signal (server_proxy, "SessionCreated",
+					 DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
+		dbus_g_proxy_connect_signal(server_proxy, "SessionCreated",
+					    G_CALLBACK (session_created_cb), NULL, NULL);
+	}
+
+	if (dbus_g_proxy_call (server_proxy, "Start", &err,
+			   G_TYPE_STRING, download_dir, G_TYPE_BOOLEAN, TRUE, G_TYPE_BOOLEAN, FALSE, G_TYPE_INVALID,
+			   G_TYPE_INVALID) == FALSE) {
+		g_printerr ("Starting Bluetooth ObexPush server failed: %s\n",
+			    err->message);
+		g_error_free (err);
+		g_free (download_dir);
+		g_object_unref (server_proxy);
+		server_proxy = NULL;
+		g_object_unref (manager_proxy);
+		manager_proxy = NULL;
+		return;
+	}
+
+	g_free (download_dir);
+}
+
+static void
+obexpush_stop (gboolean stop_manager)
+{
+	GError *err = NULL;
+
+	if (server_proxy == NULL)
+		return;
+
+	if (dbus_g_proxy_call (server_proxy, "Close", &err, G_TYPE_INVALID, G_TYPE_INVALID) == FALSE) {
+		const gchar *error_name = NULL;
+
+		if (err != NULL && err->code == DBUS_GERROR_REMOTE_EXCEPTION)
+			error_name = dbus_g_error_get_name (err);
+		if (error_name == NULL ||
+		    (error_name != NULL && strcmp (error_name, "org.openobex.Error.NotStarted") != 0)) {
+			g_printerr ("Stopping Bluetooth ObexPush server failed: %s\n",
+				    err->message);
+			g_error_free (err);
+			return;
+		}
+		g_error_free (err);
+	}
+
+	if (stop_manager != FALSE) {
+		g_object_unref (server_proxy);
+		server_proxy = NULL;
+		g_object_unref (manager_proxy);
+		manager_proxy = NULL;
+	}
+}
+
+void
+obexpush_down (void)
+{
+	obexpush_stop (TRUE);
+}
+
+void
+obexpush_restart (void)
+{
+	obexpush_stop (FALSE);
+	obexpush_up ();
+}
+
+gboolean
+obexpush_init (void)
+{
+	GError *err = NULL;
+
+	connection = dbus_g_bus_get (DBUS_BUS_SESSION, &err);
+	if (connection == NULL) {
+		g_printerr ("Connecting to session bus failed: %s\n",
+			    err->message);
+		g_error_free (err);
+		return FALSE;
+	}
+
+	dbus_g_object_register_marshaller (marshal_VOID__STRING_STRING_UINT64,
+					   G_TYPE_NONE,
+					   G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_INVALID);
+
+	return TRUE;
+}
+
+void
+obexpush_set_accept_files_policy (AcceptSetting setting)
+{
+	accept_setting = setting;
+}
+
+void
+obexpush_set_notify (gboolean enabled)
+{
+	show_notifications = enabled;
+}
+

Added: trunk/obexpush.h
==============================================================================
--- (empty file)
+++ trunk/obexpush.h	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,32 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+
+/*
+ *  Copyright (C) 2004-2008 Red Hat, Inc.
+ *
+ *  Nautilus is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation; either version 2 of the
+ *  License, or (at your option) any later version.
+ *
+ *  Nautilus 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Authors: Bastien Nocera <hadess hadess net>
+ *
+ */
+
+#include <glib.h>
+#include "user_share-private.h"
+
+void obexpush_up (void);
+void obexpush_down (void);
+void obexpush_restart (void);
+gboolean obexpush_init (void);
+void obexpush_set_accept_files_policy (AcceptSetting accept_setting);
+void obexpush_set_notify (gboolean enabled);

Added: trunk/user_share-private.c
==============================================================================
--- (empty file)
+++ trunk/user_share-private.c	Sat Feb 23 01:03:46 2008
@@ -0,0 +1,107 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+
+/*
+ *  Copyright (C) 2004-2008 Red Hat, Inc.
+ *
+ *  Nautilus is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation; either version 2 of the
+ *  License, or (at your option) any later version.
+ *
+ *  Nautilus 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Authors: Alexander Larsson <alexl redhat com>
+ *  Bastien Nocera <hadess hadess net>
+ *
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#include "user_share-private.h"
+
+static char *password_setting_strings[] = {
+    "never",
+    "on_write",
+    "always"
+};
+
+static char *accept_file_strings[] = {
+    "always",
+    "bonded",
+    "bonded_and_trusted",
+    "ask"
+};
+
+const char *
+password_string_from_setting (PasswordSetting setting)
+{
+    
+    if (setting >= 0 && setting <= PASSWORD_ALWAYS)
+	return password_setting_strings[setting];
+    
+    /* Fallback on secure pref */
+    return password_setting_strings[PASSWORD_ALWAYS];
+}
+
+PasswordSetting
+password_setting_from_string (const char *str)
+{
+    if (str != NULL) {
+	if (strcmp (str, "never") == 0) {
+	    return PASSWORD_NEVER;
+	}
+	if (strcmp (str, "always") == 0) {
+	    return PASSWORD_ALWAYS;
+	}
+	if (strcmp (str, "on_write") == 0) {
+	    return PASSWORD_ON_WRITE;
+	}
+    }
+	
+    /* Fallback on secure pref */
+    return PASSWORD_ALWAYS;
+}
+
+const char *
+accept_string_from_setting (AcceptSetting setting)
+{
+    
+    if (setting >= 0 && setting <= ACCEPT_ASK)
+	return accept_file_strings[setting];
+    
+    /* Fallback on secure pref */
+    return accept_file_strings[ACCEPT_BONDED];
+}
+
+AcceptSetting
+accept_setting_from_string (const char *str)
+{
+    if (str != NULL) {
+	if (strcmp (str, "always") == 0) {
+	    return ACCEPT_ALWAYS;
+	}
+	if (strcmp (str, "bonded") == 0) {
+	    return ACCEPT_BONDED;
+	}
+	if (strcmp (str, "bonded_and_trusted") == 0) {
+	    return ACCEPT_BONDED_AND_TRUSTED;
+	}
+	if (strcmp (str, "ask") == 0) {
+	    return ACCEPT_ASK;
+	}
+    }
+	
+    /* Fallback on secure pref */
+    return ACCEPT_BONDED;
+}
+
+

Modified: trunk/user_share-private.h
==============================================================================
--- trunk/user_share-private.h	(original)
+++ trunk/user_share-private.h	Sat Feb 23 01:03:46 2008
@@ -1,8 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+
+/*
+ *  Copyright (C) 2004-2008 Red Hat, Inc.
+ *
+ *  Nautilus is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU General Public License as
+ *  published by the Free Software Foundation; either version 2 of the
+ *  License, or (at your option) any later version.
+ *
+ *  Nautilus 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
+ *  General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  Authors: Alexander Larsson <alexl redhat com>
+ *  Bastien Nocera <hadess hadess net>
+ *
+ */
+
+#ifndef _USER_SHARE_PRIVATE_H_
+#define _USER_SHARE_PRIVATE_H_
+
 #define FILE_SHARING_DIR "/desktop/gnome/file_sharing"
 #define FILE_SHARING_ENABLED FILE_SHARING_DIR "/enabled"
 #define FILE_SHARING_BLUETOOTH_ENABLED FILE_SHARING_DIR "/bluetooth_enabled"
+#define FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED FILE_SHARING_DIR "/bluetooth_obexpush_enabled"
+
 #define FILE_SHARING_REQUIRE_PASSWORD FILE_SHARING_DIR "/require_password"
 #define FILE_SHARING_BLUETOOTH_ALLOW_WRITE FILE_SHARING_DIR "/bluetooth_allow_write"
 #define FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING FILE_SHARING_DIR "/bluetooth_require_pairing"
+#define FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES FILE_SHARING_DIR "/bluetooth_accept_files"
+#define FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY FILE_SHARING_DIR "/bluetooth_notify"
+
+typedef enum {
+    PASSWORD_NEVER,
+    PASSWORD_ON_WRITE,
+    PASSWORD_ALWAYS
+} PasswordSetting;
+
+typedef enum {
+	ACCEPT_ALWAYS,
+	ACCEPT_BONDED,
+	ACCEPT_BONDED_AND_TRUSTED,
+	ACCEPT_ASK
+} AcceptSetting;
+
+const char *password_string_from_setting (PasswordSetting setting);
+PasswordSetting password_setting_from_string (const char *str);
 
+const char *accept_string_from_setting (AcceptSetting setting);
+AcceptSetting accept_setting_from_string (const char *str);
 
+#endif /* _USER_SHARE_PRIVATE_H_ */

Modified: trunk/user_share.c
==============================================================================
--- trunk/user_share.c	(original)
+++ trunk/user_share.c	Sat Feb 23 01:03:46 2008
@@ -23,7 +23,7 @@
 
 #include "config.h"
 
-#include <glib.h>
+#include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <X11/Xlib.h>
 
@@ -31,6 +31,7 @@
 #include "user_share-private.h"
 #include "http.h"
 #include "obexftp.h"
+#include "obexpush.h"
 
 #include <gconf/gconf-client.h>
 
@@ -99,8 +100,8 @@
 	GConfClient* client = (GConfClient *) user_data;
 	http_down ();
 
-	if (gconf_client_get_bool (client,
-				   FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE)
+	if (gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE &&
+	    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED, NULL) == FALSE)
 		_exit (0);
 	return FALSE;
 }
@@ -138,7 +139,8 @@
 					    GConfEntry *entry,
 					    gpointer data)
 {
-	obexftp_restart ();
+	if (gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) != FALSE)
+		obexftp_restart ();
 }
 
 static void
@@ -147,10 +149,12 @@
 						GConfEntry *entry,
 						gpointer data)
 {
-	/* We need to fully reset the session,
-	 * otherwise the new setting isn't taken into account */
-	obexftp_down ();
-	obexftp_up ();
+	if (gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) != FALSE) {
+		/* We need to fully reset the session,
+		 * otherwise the new setting isn't taken into account */
+		obexftp_down ();
+		obexftp_up ();
+	}
 }
 
 static void
@@ -162,8 +166,8 @@
 	if (gconf_client_get_bool (client,
 				   FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE) {
 		obexftp_down ();
-		if (gconf_client_get_bool (client,
-					   FILE_SHARING_ENABLED, NULL) == FALSE) {
+		if (gconf_client_get_bool (client, FILE_SHARING_ENABLED, NULL) == FALSE &&
+		    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED, NULL) == FALSE) {
 			_exit (0);
 		}
 	} else {
@@ -171,6 +175,49 @@
 	}
 }
 
+static void
+file_sharing_bluetooth_obexpush_enabled_changed (GConfClient* client,
+						 guint cnxn_id,
+						 GConfEntry *entry,
+						 gpointer data)
+{
+	if (gconf_client_get_bool (client,
+				   FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED, NULL) == FALSE) {
+		obexpush_down ();
+		if (gconf_client_get_bool (client, FILE_SHARING_ENABLED, NULL) == FALSE &&
+		    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE) {
+			_exit (0);
+		}
+	} else {
+		obexpush_up ();
+	}
+}
+
+static void
+file_sharing_bluetooth_obexpush_accept_files_changed (GConfClient* client,
+						      guint cnxn_id,
+						      GConfEntry *entry,
+						      gpointer data)
+{
+	AcceptSetting setting;
+	char *str;
+
+	str = gconf_client_get_string (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES, NULL);
+	setting = accept_setting_from_string (str);
+	g_free (str);
+
+	obexpush_set_accept_files_policy (setting);
+}
+
+static void
+file_sharing_bluetooth_obexpush_notify_changed (GConfClient* client,
+						guint cnxn_id,
+						GConfEntry *entry,
+						gpointer data)
+{
+	obexpush_set_notify (gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY, NULL));
+}
+
 static RETSIGTYPE
 cleanup_handler (int sig)
 {
@@ -247,7 +294,8 @@
 
 	client = gconf_client_get_default ();
 	if (gconf_client_get_bool (client, FILE_SHARING_ENABLED, NULL) == FALSE &&
-	    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE)
+	    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ENABLED, NULL) == FALSE &&
+	    gconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED, NULL) == FALSE)
 		return 1;
 
 	x_fd = ConnectionNumber (xdisplay);
@@ -259,10 +307,14 @@
 			x_input, xdisplay);
 	g_io_channel_unref (channel);
 
+	gtk_init (&argc, &argv);
+
 	if (http_init () == FALSE)
 		return 1;
 	if (obexftp_init () == FALSE)
 		return 1;
+	if (obexpush_init () == FALSE)
+		return 1;
 
 	gconf_client_add_dir (client,
 			      FILE_SHARING_DIR,
@@ -299,12 +351,33 @@
 				 NULL,
 				 NULL,
 				 NULL);
+	gconf_client_notify_add (client,
+				 FILE_SHARING_BLUETOOTH_OBEXPUSH_ENABLED,
+				 file_sharing_bluetooth_obexpush_enabled_changed,
+				 NULL,
+				 NULL,
+				 NULL);
+	gconf_client_notify_add (client,
+				 FILE_SHARING_BLUETOOTH_OBEXPUSH_ACCEPT_FILES,
+				 file_sharing_bluetooth_obexpush_accept_files_changed,
+				 NULL,
+				 NULL,
+				 NULL);
+	gconf_client_notify_add (client,
+				 FILE_SHARING_BLUETOOTH_OBEXPUSH_NOTIFY,
+				 file_sharing_bluetooth_obexpush_notify_changed,
+				 NULL,
+				 NULL,
+				 NULL);
 
 	g_object_unref (client);
 
 	/* Initial setting */
 	file_sharing_enabled_changed (client, 0, NULL, NULL);
 	file_sharing_bluetooth_enabled_changed (client, 0, NULL, NULL);
+	file_sharing_bluetooth_obexpush_accept_files_changed (client, 0, NULL, NULL);
+	file_sharing_bluetooth_obexpush_notify_changed (client, 0, NULL, NULL);
+	file_sharing_bluetooth_obexpush_enabled_changed (client, 0, NULL, NULL);
 
 	g_main_loop_run (loop);
 



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