[nm-applet] [PATCH] connection-editor: add support for 4G (LTE) connection type



Modes 4G preferred and 4G only added.
---
 src/connection-editor/ce-page-mobile.ui |    6 ++++++
 src/connection-editor/page-mobile.c     |   14 ++++++++++++++
 2 files changed, 20 insertions(+)

>From 40200a9b315b8c52cd6e076eddc85f7cf857c3c9 Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Sat, 8 Sep 2012 16:27:37 +0200
Subject: [PATCH] connection-editor: add support for 4G (LTE) connection type.

Modes 4G preferred and 4G only added.
---
 src/connection-editor/ce-page-mobile.ui |    6 ++++++
 src/connection-editor/page-mobile.c     |   14 ++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/connection-editor/ce-page-mobile.ui b/src/connection-editor/ce-page-mobile.ui
index 8d88c3f..3ffb0e6 100644
--- a/src/connection-editor/ce-page-mobile.ui
+++ b/src/connection-editor/ce-page-mobile.ui
@@ -23,6 +23,12 @@
       <row>
         <col id="0" translatable="yes">Prefer 2G (GPRS/EDGE)</col>
       </row>
+      <row>
+        <col id="0" translatable="yes">Prefer 4G (LTE)</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Use only 4G (LTE)</col>
+      </row>
     </data>
   </object>
       <object class="GtkVBox" id="MobilePage">
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index f1366c3..e86767f 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -69,6 +69,8 @@ typedef struct {
 #define NET_TYPE_2G          2
 #define NET_TYPE_PREFER_3G   3
 #define NET_TYPE_PREFER_2G   4
+#define NET_TYPE_PREFER_4G   5
+#define NET_TYPE_4G          6
 
 static void
 mobile_private_init (CEPageMobile *self)
@@ -130,6 +132,12 @@ populate_gsm_ui (CEPageMobile *self, NMConnection *connection)
 	case NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE:
 		type_idx = NET_TYPE_PREFER_2G;
 		break;
+	case NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G:
+		type_idx = NET_TYPE_PREFER_4G;
+		break;
+	case NM_SETTING_GSM_NETWORK_TYPE_4G:
+		type_idx = NET_TYPE_4G;
+		break;
 	case NM_SETTING_GSM_NETWORK_TYPE_ANY:
 	default:
 		type_idx = NET_TYPE_ANY;
@@ -438,6 +446,12 @@ gsm_ui_to_setting (CEPageMobile *self)
 	case NET_TYPE_PREFER_2G:
 		net_type = NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE;
 		break;
+	case NET_TYPE_PREFER_4G:
+		net_type = NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G;
+		break;
+	case NET_TYPE_4G:
+		net_type = NM_SETTING_GSM_NETWORK_TYPE_4G;
+		break;
 	case NET_TYPE_ANY:
 	default:
 		net_type = NM_SETTING_GSM_NETWORK_TYPE_ANY;
-- 
1.7.10.4



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