gnome-bluetooth r333 - trunk/common
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-bluetooth r333 - trunk/common
- Date: Wed, 25 Feb 2009 14:40:20 +0000 (UTC)
Author: hadess
Date: Wed Feb 25 14:40:20 2009
New Revision: 333
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=333&view=rev
Log:
Add a new device category
Not trusted nor bonded, for use in the wizard.
Modified:
trunk/common/bluetooth-device-selection.c
trunk/common/bluetooth-enums.h
Modified: trunk/common/bluetooth-device-selection.c
==============================================================================
--- trunk/common/bluetooth-device-selection.c (original)
+++ trunk/common/bluetooth-device-selection.c Wed Feb 25 14:40:20 2009
@@ -82,9 +82,11 @@
case BLUETOOTH_CATEGORY_ALL:
return N_("All categories");
case BLUETOOTH_CATEGORY_PAIRED:
- return N_("Bonded");
+ return N_("Paired");
case BLUETOOTH_CATEGORY_TRUSTED:
return N_("Trusted");
+ case BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED:
+ return N_("Not paired or trusted");
default:
return N_("Unknown");
}
@@ -292,21 +294,24 @@
static gboolean
filter_category_func (GtkTreeModel *model, GtkTreeIter *iter, BluetoothDeviceSelectionPrivate *priv)
{
+ gboolean bonded, trusted;
+
if (priv->device_category_filter == BLUETOOTH_CATEGORY_ALL)
return TRUE;
- if (priv->device_category_filter == BLUETOOTH_CATEGORY_PAIRED) {
- gboolean bonded;
+ gtk_tree_model_get (model, iter,
+ BLUETOOTH_COLUMN_PAIRED, &bonded,
+ BLUETOOTH_COLUMN_TRUSTED, &trusted,
+ -1);
- gtk_tree_model_get (model, iter, BLUETOOTH_COLUMN_PAIRED, &bonded, -1);
+ if (priv->device_category_filter == BLUETOOTH_CATEGORY_PAIRED)
return bonded;
- }
- if (priv->device_category_filter == BLUETOOTH_CATEGORY_TRUSTED) {
- gboolean trusted;
-
- gtk_tree_model_get (model, iter, BLUETOOTH_COLUMN_TRUSTED, &trusted, -1);
+ if (priv->device_category_filter == BLUETOOTH_CATEGORY_TRUSTED)
return trusted;
- }
+ if (priv->device_category_filter == BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED)
+ return (!bonded && !trusted);
+
+ g_assert_not_reached ();
return FALSE;
}
Modified: trunk/common/bluetooth-enums.h
==============================================================================
--- trunk/common/bluetooth-enums.h (original)
+++ trunk/common/bluetooth-enums.h Wed Feb 25 14:40:20 2009
@@ -30,6 +30,7 @@
BLUETOOTH_CATEGORY_ALL,
BLUETOOTH_CATEGORY_PAIRED,
BLUETOOTH_CATEGORY_TRUSTED,
+ BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED,
BLUETOOTH_CATEGORY_NUM_CATEGORIES
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]