phonemgr r340 - in trunk: . data src



Author: hadess
Date: Thu Feb 26 10:31:33 2009
New Revision: 340
URL: http://svn.gnome.org/viewvc/phonemgr?rev=340&view=rev

Log:
2009-02-26  Bastien Nocera  <hadess hadess net>

	* src/phonemgr-chooser-button.c:
	* src/phonemgr-chooser-button.h: Remove

	* configure.in:
	* data/phonemgr.glade:
	* src/Makefile.am:
	* src/app.h:
	* src/ui.c (chooser_created), (bluetooth_chooser_button_create),
	(set_dependent_widget): Remove use of the old gnome-bluetooth,
	and require the new one, which has its own Bluetooth device
	chooser button (Closes: #455838)



Removed:
   trunk/src/phonemgr-chooser-button.c
   trunk/src/phonemgr-chooser-button.h
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/data/phonemgr.glade
   trunk/src/Makefile.am
   trunk/src/app.h
   trunk/src/ui.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Feb 26 10:31:33 2009
@@ -14,7 +14,7 @@
 AM_PROG_LIBTOOL
 
 GNOKII_REQS="gnokii >= 0.6.27cvs bluez >= 3.12"
-GNOME_BLUETOOTH_REQS="gnome-bluetooth > 0.8.0"
+GNOME_BLUETOOTH_REQS="gnome-bluetooth-1.0"
 
 AC_PROG_CC
 AC_PROG_INSTALL

Modified: trunk/data/phonemgr.glade
==============================================================================
--- trunk/data/phonemgr.glade	(original)
+++ trunk/data/phonemgr.glade	Thu Feb 26 10:31:33 2009
@@ -1111,7 +1111,7 @@
 				  <child>
 				    <widget class="Custom" id="btchooser">
 				      <property name="visible">True</property>
-				      <property name="creation_function">phonemgr_chooser_button_create</property>
+				      <property name="creation_function">bluetooth_chooser_button_create</property>
 				      <property name="int1">0</property>
 				      <property name="int2">0</property>
 				      <property name="last_modification_time">Thu, 12 Jul 2007 10:06:21 GMT</property>

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Thu Feb 26 10:31:33 2009
@@ -27,9 +27,7 @@
 	e-phone-entry.c			\
 	e-phone-entry.h			\
 	phonemgr-object.c		\
-	phonemgr-object.h		\
-	phonemgr-chooser-button.c	\
-	phonemgr-chooser-button.h
+	phonemgr-object.h
 
 gnome_phone_manager_LDADD = \
 	$(PHONEMGR_LIBS) \

Modified: trunk/src/app.h
==============================================================================
--- trunk/src/app.h	(original)
+++ trunk/src/app.h	Thu Feb 26 10:31:33 2009
@@ -25,7 +25,6 @@
 #include <gtk/gtk.h>
 #include <glade/glade.h>
 #include <gconf/gconf-client.h>
-#include <gnomebt-controller.h>
 
 #include "phonemgr-listener.h"
 #include "phonemgr-object.h"

Modified: trunk/src/ui.c
==============================================================================
--- trunk/src/ui.c	(original)
+++ trunk/src/ui.c	Thu Feb 26 10:31:33 2009
@@ -27,11 +27,12 @@
 #include <canberra-gtk.h>
 #include <time.h>
 #include <string.h>
+#include <bluetooth-chooser.h>
+#include <bluetooth-chooser-button.h>
 
 #include "app.h"
 #include "e-phone-entry.h"
 #include "gconf-bridge.h"
-#include "phonemgr-chooser-button.h"
 #include "phonemgr-utils.h"
 
 #define MAX_MESSAGE_LENGTH 160
@@ -108,6 +109,32 @@
 	return fname;
 }
 
+static void
+chooser_created (BluetoothChooserButton *button, BluetoothChooser *chooser, gpointer data)
+{
+	g_object_set(chooser,
+		     "show-search", FALSE,
+		     "show-pairing", FALSE,
+		     "show-device-type", FALSE,
+		     "device-type-filter", BLUETOOTH_TYPE_PHONE,
+		     "show-device-category", FALSE,
+		     "device-category-filter", BLUETOOTH_CATEGORY_PAIRED,
+		     NULL);
+}
+
+GtkWidget *
+bluetooth_chooser_button_create (void)
+{
+	GtkWidget *widget;
+	
+	widget = bluetooth_chooser_button_new ();
+	g_signal_connect (G_OBJECT (widget), "chooser-created",
+			  G_CALLBACK (chooser_created), NULL);
+	gtk_widget_show (widget);
+	
+	return widget;
+}
+
 static
 GladeXML *get_ui (MyApp *app, char *widget)
 {
@@ -156,7 +183,7 @@
 		case CONNECTION_BLUETOOTH:
 			/* only set sensitive if bluetooth available */
 			w = GTK_WIDGET (glade_xml_get_widget (app->ui, "btchooser"));
-			if (phonemgr_chooser_button_available (PHONEMGR_CHOOSER_BUTTON (w)) == FALSE
+			if (bluetooth_chooser_button_available (BLUETOOTH_CHOOSER_BUTTON (w)) == FALSE
 			    || phonemgr_utils_connection_is_supported (PHONEMGR_CONNECTION_BLUETOOTH) == FALSE)
 				active = FALSE;
 			gtk_widget_set_sensitive (w, active);



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