[network-manager-netbook] Add bluetooth support



commit ea70ac0dc7850ce6317f6a00060f7a51e5cea077
Author: Tambet Ingo <tambet gmail com>
Date:   Fri Dec 4 15:24:45 2009 +0200

    Add bluetooth support
    
    BT only works if you have already created a configuration for it using
    bluetooth-wizard (which also needs libnma.so plugin from nm-applet). Need
    to think a bit how the configuration part should work on moblin.

 libnm-gtk/Makefile.am         |    4 ++
 libnm-gtk/nm-bt-item.c        |   75 +++++++++++++++++++++++++++++++++++++++++
 libnm-gtk/nm-bt-item.h        |   52 ++++++++++++++++++++++++++++
 libnm-gtk/nm-bt-provider.c    |   72 +++++++++++++++++++++++++++++++++++++++
 libnm-gtk/nm-bt-provider.h    |   51 ++++++++++++++++++++++++++++
 libnm-gtk/nm-device-handler.c |    4 ++
 libnm-gtk/nm-list-item.h      |    1 +
 po/POTFILES.in                |    1 +
 src/nmn-applet.c              |   37 ++++++++++++++++++++
 src/nmn-list.c                |    1 +
 src/nmn-model.c               |   68 +++++++++++++++++++++++++++++++++++++
 src/nmn-model.h               |    7 ++++
 12 files changed, 373 insertions(+), 0 deletions(-)
---
diff --git a/libnm-gtk/Makefile.am b/libnm-gtk/Makefile.am
index 7f99fd6..369a909 100644
--- a/libnm-gtk/Makefile.am
+++ b/libnm-gtk/Makefile.am
@@ -21,6 +21,8 @@ libnm_gtk_la_LIBADD = \
 # libnmincludedir = $(includedir)/libnm-gtk
 
 noinst_HEADERS = \
+	nm-bt-item.h \
+	nm-bt-provider.h \
 	nm-cdma-item.h \
 	nm-cdma-provider.h \
 	nm-connection-item.h \
@@ -50,6 +52,8 @@ libnm_gtk_la_SOURCES = \
 	gconf-helpers.h \
 	gconf-upgrade.c	\
 	gconf-upgrade.h \
+	nm-bt-item.c \
+	nm-bt-provider.c \
 	nm-cdma-item.c \
 	nm-cdma-provider.c \
 	nm-connection-item.c \
diff --git a/libnm-gtk/nm-bt-item.c b/libnm-gtk/nm-bt-item.c
new file mode 100644
index 0000000..8b4b99e
--- /dev/null
+++ b/libnm-gtk/nm-bt-item.c
@@ -0,0 +1,75 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program 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.
+ *
+ * This program 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include "nm-bt-item.h"
+
+G_DEFINE_TYPE (NMBtItem, nm_bt_item, NM_TYPE_DEVICE_ITEM)
+
+NMListItem *
+nm_bt_item_new (NMClient *client,
+                NMDeviceBt *device,
+                NMSettingsConnectionInterface *connection)
+{
+    g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+    g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
+    g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection), NULL);
+
+    return (NMListItem *) g_object_new (NM_TYPE_BT_ITEM,
+                                        NM_LIST_ITEM_TYPE_NAME, _("bluetooth"),
+                                        NM_CONNECTION_ITEM_CLIENT, client,
+                                        NM_CONNECTION_ITEM_CONNECTION, connection,
+                                        NM_DEVICE_ITEM_DEVICE, device,
+                                        NULL);
+}
+
+static int
+priority (NMListItem *item)
+{
+    return NM_LIST_ITEM_PRIORITY_DEV_BT + NM_LIST_ITEM_CLASS (nm_bt_item_parent_class)->priority (item);
+}
+
+/*****************************************************************************/
+
+static void
+notify (GObject *object, GParamSpec *spec)
+{
+    /* If the connection is removed from the item, request deletion */
+    if (spec && !g_strcmp0 (spec->name, NM_CONNECTION_ITEM_CONNECTION) && 
+        !nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)))
+
+        nm_list_item_request_remove (NM_LIST_ITEM (object));
+}
+
+static void
+nm_bt_item_init (NMBtItem *self)
+{
+    g_object_set (self, NM_LIST_ITEM_ICON, "nm-device-wwan", NULL);
+}
+
+static void
+nm_bt_item_class_init (NMBtItemClass *klass)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+    object_class->notify = notify;
+
+    list_class->priority = priority;
+}
diff --git a/libnm-gtk/nm-bt-item.h b/libnm-gtk/nm-bt-item.h
new file mode 100644
index 0000000..87a672a
--- /dev/null
+++ b/libnm-gtk/nm-bt-item.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program 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.
+ *
+ * This program 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_BT_ITEM_H
+#define NM_BT_ITEM_H
+
+#include <glib-object.h>
+#include <nm-device-bt.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_BT_ITEM            (nm_bt_item_get_type ())
+#define NM_BT_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_BT_ITEM, NMBtItem))
+#define NM_BT_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_BT_ITEM, NMBtItemClass))
+#define NM_IS_BT_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_BT_ITEM))
+#define NM_IS_BT_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_BT_ITEM))
+#define NM_BT_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_BT_ITEM, NMBtItemClass))
+
+typedef struct {
+    NMDeviceItem parent;
+} NMBtItem;
+
+typedef struct {
+    NMDeviceItemClass parent_class;
+} NMBtItemClass;
+
+GType nm_bt_item_get_type (void);
+
+NMListItem *nm_bt_item_new (NMClient *client,
+                            NMDeviceBt *device,
+                            NMSettingsConnectionInterface *connection);
+
+G_END_DECLS
+
+#endif /* NM_BT_ITEM_H */
diff --git a/libnm-gtk/nm-bt-provider.c b/libnm-gtk/nm-bt-provider.c
new file mode 100644
index 0000000..4736dae
--- /dev/null
+++ b/libnm-gtk/nm-bt-provider.c
@@ -0,0 +1,72 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program 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.
+ *
+ * This program 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-bt-provider.h"
+#include "nm-bt-item.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMBtProvider, nm_bt_provider, NM_TYPE_DEVICE_PROVIDER)
+
+NMItemProvider *
+nm_bt_provider_new (NMClient *client,
+                    NMDeviceBt *device)
+{
+    g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+    g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
+
+    return (NMItemProvider *) g_object_new (NM_TYPE_BT_PROVIDER,
+                                            NM_ITEM_PROVIDER_CLIENT, client,
+                                            NM_DEVICE_PROVIDER_DEVICE, device,
+                                            NULL);
+}
+
+static void
+bt_added (NMItemProvider *provider,
+          NMSettingsConnectionInterface *connection)
+{
+    NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+    NMDevice *device;
+
+    if (!nm_device_provider_ready (device_provider))
+        return;
+
+    device = nm_device_provider_get_device (device_provider);
+    if (utils_connection_valid_for_device (NM_CONNECTION (connection), device, NULL)) {
+        NMListItem *item;
+
+        item = nm_bt_item_new (nm_item_provider_get_client (provider), NM_DEVICE_BT (device), connection);
+        g_debug ("Added bt item");
+        nm_item_provider_item_added (provider, item);
+    }
+}
+
+/*****************************************************************************/
+
+static void
+nm_bt_provider_init (NMBtProvider *self)
+{
+}
+
+static void
+nm_bt_provider_class_init (NMBtProviderClass *klass)
+{
+    NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+    item_class->connection_added = bt_added;
+}
diff --git a/libnm-gtk/nm-bt-provider.h b/libnm-gtk/nm-bt-provider.h
new file mode 100644
index 0000000..dcde2d3
--- /dev/null
+++ b/libnm-gtk/nm-bt-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program 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.
+ *
+ * This program 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_BT_PROVIDER_H
+#define NM_BT_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-device-bt.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_BT_PROVIDER            (nm_bt_provider_get_type ())
+#define NM_BT_PROVIDER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_BT_PROVIDER, NMBtProvider))
+#define NM_BT_PROVIDER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_BT_PROVIDER, NMBtProviderClass))
+#define NM_IS_BT_PROVIDER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_BT_PROVIDER))
+#define NM_IS_BT_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_BT_PROVIDER))
+#define NM_BT_PROVIDER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_BT_PROVIDER, NMBtProviderClass))
+
+typedef struct {
+    NMDeviceProvider parent;
+} NMBtProvider;
+
+typedef struct {
+    NMDeviceProviderClass parent_class;
+} NMBtProviderClass;
+
+GType nm_bt_provider_get_type (void);
+
+NMItemProvider *nm_bt_provider_new (NMClient *client,
+                                    NMDeviceBt *device);
+
+G_END_DECLS
+
+#endif /* NM_BT_PROVIDER_H */
diff --git a/libnm-gtk/nm-device-handler.c b/libnm-gtk/nm-device-handler.c
index 31fba3f..feda6eb 100644
--- a/libnm-gtk/nm-device-handler.c
+++ b/libnm-gtk/nm-device-handler.c
@@ -21,12 +21,14 @@
 #include <nm-device-wifi.h>
 #include <nm-gsm-device.h>
 #include <nm-cdma-device.h>
+#include <nm-device-bt.h>
 
 #include "nm-device-handler.h"
 #include "nm-ethernet-provider.h"
 #include "nm-wifi-provider.h"
 #include "nm-gsm-provider.h"
 #include "nm-cdma-provider.h"
+#include "nm-bt-provider.h"
 
 G_DEFINE_TYPE (NMDeviceHandler, nm_device_handler, G_TYPE_OBJECT)
 
@@ -91,6 +93,8 @@ create_provider (NMDeviceHandler *self, NMDevice *device)
         provider = nm_gsm_provider_new (priv->client, NM_GSM_DEVICE (device));
     else if (type == NM_TYPE_CDMA_DEVICE)
         provider = nm_cdma_provider_new (priv->client, NM_CDMA_DEVICE (device));
+    else if (type == NM_TYPE_DEVICE_BT)
+        provider = nm_bt_provider_new (priv->client, NM_DEVICE_BT (device));
     else {
         g_warning ("Unknown device type %s", G_OBJECT_TYPE_NAME (device));
         provider = NULL;
diff --git a/libnm-gtk/nm-list-item.h b/libnm-gtk/nm-list-item.h
index 15988d9..02d6045 100644
--- a/libnm-gtk/nm-list-item.h
+++ b/libnm-gtk/nm-list-item.h
@@ -53,6 +53,7 @@ typedef enum {
 #define NM_LIST_ITEM_PRIORITY_DEV_WIFI      98
 #define NM_LIST_ITEM_PRIORITY_DEV_GSM       97
 #define NM_LIST_ITEM_PRIORITY_DEV_CDMA      96
+#define NM_LIST_ITEM_PRIORITY_DEV_BT        95
 
 typedef struct {
     GInitiallyUnowned parent;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index db07d9c..934405a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
 network-manager-netbook.desktop.in
+libnm-gtk/nm-bt-item.c
 libnm-gtk/nm-ethernet-item.c
 libnm-gtk/nm-wifi-item.c
 libnm-gtk/nm-gsm-item.c
diff --git a/src/nmn-applet.c b/src/nmn-applet.c
index c4fc329..f06c199 100644
--- a/src/nmn-applet.c
+++ b/src/nmn-applet.c
@@ -245,6 +245,42 @@ enable_3g_setup (NmnApplet *applet)
     modems_toggled (priv->model, nmn_model_modems_get_active (priv->model), applet);
 }
 
+/* enable/disable Bluetooth button */
+
+static void
+enable_bt_toggled (NbtkGtkLightSwitch *w,
+                   gboolean active,
+                   gpointer user_data)
+{
+    NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+    nmn_model_bt_toggled (priv->model, active);
+}
+
+static void
+bt_toggled (NmnModel *model,
+            gboolean active,
+            gpointer user_data)
+{
+    NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+    g_signal_handlers_block_by_func (priv->model, enable_bt_toggled, user_data);
+    nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_bt), active);
+    g_signal_handlers_unblock_by_func (priv->model, enable_bt_toggled, user_data);
+}
+
+static void
+enable_bt_setup (NmnApplet *applet)
+{
+    NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+    g_signal_connect (priv->enable_bt, "switch-flipped", G_CALLBACK (enable_bt_toggled), applet);
+    gtk_widget_show (priv->enable_bt);
+
+    g_signal_connect (priv->model, "bt-toggled", G_CALLBACK (bt_toggled), applet);
+    bt_toggled (priv->model, nmn_model_bt_get_active (priv->model), applet);
+}
+
 /* enable/disable Offline mode button */
 
 static void
@@ -467,6 +503,7 @@ constructor (GType type,
     enable_wifi_setup (applet);
     enable_ethernet_setup (applet);
     enable_3g_setup (applet);
+    enable_bt_setup (applet);
     enable_network_setup (applet);
     add_new_connection_setup (applet);
     add_new_connection_hide (NULL, applet);
diff --git a/src/nmn-list.c b/src/nmn-list.c
index fc6a70c..08a241c 100644
--- a/src/nmn-list.c
+++ b/src/nmn-list.c
@@ -373,6 +373,7 @@ nmn_list_set_model (NmnList *list,
             g_signal_connect_swapped (model, "ethernet-toggled",     G_CALLBACK (switches_flipped), list);
             g_signal_connect_swapped (model, "wifi-toggled",         G_CALLBACK (switches_flipped), list);
             g_signal_connect_swapped (model, "modems-toggled",       G_CALLBACK (switches_flipped), list);
+            g_signal_connect_swapped (model, "bt-toggled",           G_CALLBACK (switches_flipped), list);
             g_signal_connect_swapped (model, "offline-mode-toggled", G_CALLBACK (switches_flipped), list);
         }
     }
diff --git a/src/nmn-model.c b/src/nmn-model.c
index 53ae9a6..957f4f4 100644
--- a/src/nmn-model.c
+++ b/src/nmn-model.c
@@ -26,6 +26,7 @@
 #include "nm-wifi-item.h"
 #include "nm-gsm-item.h"
 #include "nm-cdma-item.h"
+#include "nm-bt-item.h"
 
 G_DEFINE_TYPE (NmnModel, nmn_model, GTK_TYPE_TREE_MODEL_FILTER)
 
@@ -33,6 +34,7 @@ enum {
     ETHERNET_TOGGLED,
     WIFI_TOGGLED,
     MODEMS_TOGGLED,
+    BT_TOGGLED,
     OFFLINE_MODE_TOGGLED,
 
     LAST_SIGNAL
@@ -50,6 +52,7 @@ typedef struct {
     gboolean ethernet_active;
     gboolean wifi_active;
     gboolean modems_active;
+    gboolean bt_active;
     gboolean offline_mode_active;
 
     gboolean disposed;
@@ -253,6 +256,58 @@ nmn_model_modems_toggled (NmnModel *self,
 }
 
 gboolean
+nmn_model_bt_get_active (NmnModel *self)
+{
+    g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+    return GET_PRIVATE (self)->bt_active;
+}
+
+static void
+bt_deactive (NmnModel *self)
+{
+    GtkTreeModel *child_model;
+    GtkTreeIter iter;
+    gboolean valid;
+
+    child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (self));
+    valid = gtk_tree_model_get_iter_first (child_model, &iter);
+    while (valid) {
+        NMListItem *item = NULL;
+
+        gtk_tree_model_get (child_model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+        if (item) {
+            if (NM_IS_BT_ITEM (item) && nm_list_item_get_status (item) != NM_LIST_ITEM_STATUS_DISCONNECTED)
+                nm_list_item_disconnect (item);
+
+            g_object_unref (item);
+        }
+
+        valid = gtk_tree_model_iter_next (child_model, &iter);
+    }
+}
+
+void
+nmn_model_bt_toggled (NmnModel *self,
+                      gboolean active)
+{
+    NmnModelPrivate *priv;
+
+    g_return_if_fail (NMN_IS_MODEL (self));
+
+    priv = GET_PRIVATE (self);
+    if (priv->bt_active != active) {
+        /* FIXME: Save in gconf? */
+        priv->bt_active = active;
+        gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+        if (!active)
+            bt_deactive (self);
+
+        g_signal_emit (self, signals[BT_TOGGLED], 0, active);
+    }
+}
+
+gboolean
 nmn_model_offline_mode_get_active (NmnModel *self)
 {
     g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
@@ -322,6 +377,8 @@ model_row_visible_func (GtkTreeModel *model,
             visible = priv->modems_active;
         else if (NM_IS_CDMA_ITEM (item))
             visible = priv->modems_active;
+        else if (NM_IS_BT_ITEM (item))
+            visible = priv->bt_active;
 
         g_object_unref (item);
     }
@@ -378,6 +435,7 @@ nmn_model_init (NmnModel *model)
     priv->ethernet_active = TRUE;
     priv->wifi_active = TRUE;
     priv->modems_active = TRUE;
+    priv->bt_active = TRUE;
     priv->offline_mode_active = FALSE;
 }
 
@@ -482,6 +540,16 @@ nmn_model_class_init (NmnModelClass *class)
          G_TYPE_NONE, 1,
          G_TYPE_BOOLEAN);
 
+    signals[BT_TOGGLED] = g_signal_new 
+        ("bt-toggled",
+         G_OBJECT_CLASS_TYPE (class),
+         G_SIGNAL_RUN_LAST,
+         G_STRUCT_OFFSET (NmnModelClass, bt_toggled),
+         NULL, NULL,
+         g_cclosure_marshal_VOID__BOOLEAN,
+         G_TYPE_NONE, 1,
+         G_TYPE_BOOLEAN);
+
     signals[OFFLINE_MODE_TOGGLED] = g_signal_new 
         ("offline-mode-toggled",
          G_OBJECT_CLASS_TYPE (class),
diff --git a/src/nmn-model.h b/src/nmn-model.h
index a74e3e4..c5f3615 100644
--- a/src/nmn-model.h
+++ b/src/nmn-model.h
@@ -48,6 +48,9 @@ typedef struct {
     void (*modems_toggled) (NmnModel *self,
                             gboolean active);
 
+    void (*bt_toggled) (NmnModel *self,
+                        gboolean active);
+
     void (*offline_mode_toggled) (NmnModel *self,
                                   gboolean active);
 } NmnModelClass;
@@ -73,6 +76,10 @@ gboolean    nmn_model_modems_get_active       (NmnModel *self);
 void        nmn_model_modems_toggled          (NmnModel *self,
                                                gboolean active);
 
+gboolean    nmn_model_bt_get_active           (NmnModel *self); 
+void        nmn_model_bt_toggled              (NmnModel *self,
+                                               gboolean active);
+
 gboolean    nmn_model_offline_mode_get_active (NmnModel *self);
 void        nmn_model_offline_mode_toggled    (NmnModel *self,
                                                gboolean active);



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