diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2014-09-29 10:51:28 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2014-10-13 18:38:53 +0200 |
commit | b9349ff61fd84ddc2f365e1aa51ef3fbe637772d (patch) | |
tree | 3cc947079e4069d9896702651b4c690e0b6ecc9e | |
parent | 68da027d1850a4b5c39a3b578e582ce85f87330d (diff) | |
download | network-manager-applet-jk/bluetooth-editor.tar.gz |
fixup! editor: Add support for editing Bluetooth connectionsjk/bluetooth-editor
-rw-r--r-- | src/connection-editor/connection-helpers.c | 7 | ||||
-rw-r--r-- | src/connection-editor/page-bluetooth.c | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c index 1d748670..e1650ec9 100644 --- a/src/connection-editor/connection-helpers.c +++ b/src/connection-editor/connection-helpers.c @@ -29,6 +29,7 @@ #include "page-wifi.h" #include "page-mobile.h" #include "page-wimax.h" +#include "page-bluetooth.h" #include "page-dsl.h" #include "page-infiniband.h" #include "page-bond.h" @@ -123,6 +124,12 @@ get_connection_type_list (void) data.virtual = FALSE; g_array_append_val (array, data); + data.name = _("Bluetooth"); + data.new_connection_func = bluetooth_connection_new; + data.setting_type = NM_TYPE_SETTING_BLUETOOTH; + data.virtual = FALSE; + g_array_append_val (array, data); + data.name = _("DSL"); data.new_connection_func = dsl_connection_new; data.setting_type = NM_TYPE_SETTING_PPPOE; diff --git a/src/connection-editor/page-bluetooth.c b/src/connection-editor/page-bluetooth.c index b1fa0a18..2d3d80d4 100644 --- a/src/connection-editor/page-bluetooth.c +++ b/src/connection-editor/page-bluetooth.c @@ -175,3 +175,23 @@ ce_page_bluetooth_class_init (CEPageBluetoothClass *bluetooth_class) /* virtual methods */ parent_class->validate = validate; } + +void +bluetooth_connection_new (GtkWindow *parent, + const char *detail, + NMRemoteSettings *settings, + PageNewConnectionResultFunc result_func, + gpointer user_data) +{ + NMConnection *connection; + + connection = ce_page_new_connection (_("Bluetooth connection %d"), + NM_SETTING_BLUETOOTH_SETTING_NAME, + FALSE, + settings, + user_data); + nm_connection_add_setting (connection, nm_setting_bluetooth_new ()); + + (*result_func) (connection, FALSE, NULL, user_data); +} + |