diff options
Diffstat (limited to 'meta-gnome/recipes-connectivity')
-rw-r--r-- | meta-gnome/recipes-connectivity/network-manager-applet/files/0001-Add-support-for-AP-mode-setting-for-wifi-sharing.patch | 132 | ||||
-rw-r--r-- | meta-gnome/recipes-connectivity/network-manager-applet/files/0002-Use-AP-mode-for-network-sharing-if-device-supports-it.patch | 48 | ||||
-rw-r--r-- | meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.10.bb (renamed from meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.4.bb) | 11 |
3 files changed, 4 insertions, 187 deletions
diff --git a/meta-gnome/recipes-connectivity/network-manager-applet/files/0001-Add-support-for-AP-mode-setting-for-wifi-sharing.patch b/meta-gnome/recipes-connectivity/network-manager-applet/files/0001-Add-support-for-AP-mode-setting-for-wifi-sharing.patch deleted file mode 100644 index db7878e897..0000000000 --- a/meta-gnome/recipes-connectivity/network-manager-applet/files/0001-Add-support-for-AP-mode-setting-for-wifi-sharing.patch +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | From d789ef88a8806887bf1160bfa5d3d9eb47b6216c Mon Sep 17 00:00:00 2001 | ||
2 | From: "Marius B. Kotsbak" <marius@kotsbak.com> | ||
3 | Date: Mon, 11 Aug 2014 22:11:52 +0200 | ||
4 | Subject: [PATCH] Add support for AP mode setting for wifi sharing. | ||
5 | |||
6 | Upstream-Status: Pending [1] | ||
7 | |||
8 | [1] https://bugzilla.gnome.org/show_bug.cgi?id=734589 | ||
9 | --- | ||
10 | src/connection-editor/ce-page-wifi.ui | 3 +++ | ||
11 | src/connection-editor/page-wifi.c | 48 ++++++++++++++++++++--------------- | ||
12 | 2 files changed, 31 insertions(+), 20 deletions(-) | ||
13 | |||
14 | diff --git a/src/connection-editor/ce-page-wifi.ui b/src/connection-editor/ce-page-wifi.ui | ||
15 | index a7b8f20..0bd9130 100644 | ||
16 | --- a/src/connection-editor/ce-page-wifi.ui | ||
17 | +++ b/src/connection-editor/ce-page-wifi.ui | ||
18 | @@ -50,6 +50,9 @@ | ||
19 | <row> | ||
20 | <col id="0" translatable="yes">Ad-hoc</col> | ||
21 | </row> | ||
22 | + <row> | ||
23 | + <col id="0" translatable="yes">Shared AP</col> | ||
24 | + </row> | ||
25 | </data> | ||
26 | </object> | ||
27 | <object class="GtkTable" id="WifiPage"> | ||
28 | diff --git a/src/connection-editor/page-wifi.c b/src/connection-editor/page-wifi.c | ||
29 | index 8a25c64..e4b4df1 100644 | ||
30 | --- a/src/connection-editor/page-wifi.c | ||
31 | +++ b/src/connection-editor/page-wifi.c | ||
32 | @@ -58,6 +58,12 @@ typedef struct { | ||
33 | int last_channel; | ||
34 | } CEPageWifiPrivate; | ||
35 | |||
36 | +enum { | ||
37 | + WIFI_MODE_INFRASTRUCTURE, | ||
38 | + WIFI_MODE_ADHOC, | ||
39 | + WIFI_MODE_AP | ||
40 | +}; | ||
41 | + | ||
42 | static void | ||
43 | wifi_private_init (CEPageWifi *self) | ||
44 | { | ||
45 | @@ -245,23 +251,17 @@ mode_combo_changed_cb (GtkComboBox *combo, | ||
46 | CEPageWifiPrivate *priv = CE_PAGE_WIFI_GET_PRIVATE (self); | ||
47 | CEPage *parent = CE_PAGE (self); | ||
48 | GtkWidget *widget_band_label, *widget_chan_label, *widget_bssid_label; | ||
49 | - gboolean adhoc; | ||
50 | + gint wifi_mode; | ||
51 | + gboolean shared_wifi; | ||
52 | |||
53 | - switch (gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) { | ||
54 | - case 1: /* adhoc */ | ||
55 | - adhoc = TRUE; | ||
56 | - break; | ||
57 | - default: /* infrastructure */ | ||
58 | - adhoc = FALSE; | ||
59 | - break; | ||
60 | - } | ||
61 | + wifi_mode = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); | ||
62 | |||
63 | widget_band_label = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wifi_band_label")); | ||
64 | widget_chan_label = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wifi_channel_label")); | ||
65 | widget_bssid_label = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wifi_bssid_label")); | ||
66 | |||
67 | - if (adhoc) { | ||
68 | - /* For Ad-Hoc show Band and Channel */ | ||
69 | + if (WIFI_MODE_ADHOC == wifi_mode || WIFI_MODE_AP == wifi_mode) { | ||
70 | + /* For Ad-Hoc/AP show Band and Channel */ | ||
71 | gtk_widget_show (widget_band_label); | ||
72 | gtk_widget_show (GTK_WIDGET (priv->band)); | ||
73 | gtk_widget_show (widget_chan_label); | ||
74 | @@ -284,12 +284,13 @@ mode_combo_changed_cb (GtkComboBox *combo, | ||
75 | gtk_widget_show (GTK_WIDGET (priv->bssid)); | ||
76 | } | ||
77 | |||
78 | - gtk_widget_set_sensitive (widget_band_label, adhoc); | ||
79 | - gtk_widget_set_sensitive (GTK_WIDGET (priv->band), adhoc); | ||
80 | - gtk_widget_set_sensitive (widget_chan_label, adhoc); | ||
81 | - gtk_widget_set_sensitive (GTK_WIDGET (priv->channel), adhoc); | ||
82 | - gtk_widget_set_sensitive (widget_bssid_label, !adhoc); | ||
83 | - gtk_widget_set_sensitive (GTK_WIDGET (priv->bssid), !adhoc); | ||
84 | + shared_wifi = wifi_mode != WIFI_MODE_INFRASTRUCTURE; | ||
85 | + gtk_widget_set_sensitive (widget_band_label, shared_wifi); | ||
86 | + gtk_widget_set_sensitive (GTK_WIDGET (priv->band), shared_wifi); | ||
87 | + gtk_widget_set_sensitive (widget_chan_label, shared_wifi); | ||
88 | + gtk_widget_set_sensitive (GTK_WIDGET (priv->channel), shared_wifi); | ||
89 | + gtk_widget_set_sensitive (widget_bssid_label, !shared_wifi); | ||
90 | + gtk_widget_set_sensitive (GTK_WIDGET (priv->bssid), !shared_wifi); | ||
91 | |||
92 | ce_page_changed (CE_PAGE (self)); | ||
93 | } | ||
94 | @@ -348,9 +349,12 @@ populate_ui (CEPageWifi *self) | ||
95 | g_byte_array_free (ssid, TRUE); | ||
96 | |||
97 | /* Default to Infrastructure */ | ||
98 | - gtk_combo_box_set_active (priv->mode, 0); | ||
99 | + gtk_combo_box_set_active (priv->mode, WIFI_MODE_INFRASTRUCTURE); | ||
100 | if (mode && !strcmp (mode, "adhoc")) | ||
101 | - gtk_combo_box_set_active (priv->mode, 1); | ||
102 | + gtk_combo_box_set_active (priv->mode, WIFI_MODE_ADHOC); | ||
103 | + else if (mode && !strcmp (mode, "ap")) | ||
104 | + gtk_combo_box_set_active (priv->mode, WIFI_MODE_AP); | ||
105 | + | ||
106 | mode_combo_changed_cb (priv->mode, self); | ||
107 | g_signal_connect (priv->mode, "changed", G_CALLBACK (mode_combo_changed_cb), self); | ||
108 | g_free (mode); | ||
109 | @@ -506,6 +510,7 @@ ui_to_setting (CEPageWifi *self) | ||
110 | GByteArray *bssid = NULL; | ||
111 | GByteArray *device_mac = NULL; | ||
112 | GByteArray *cloned_mac = NULL; | ||
113 | + gint wifi_mode; | ||
114 | char *ifname = NULL; | ||
115 | const char *mode; | ||
116 | const char *band; | ||
117 | @@ -516,8 +521,11 @@ ui_to_setting (CEPageWifi *self) | ||
118 | |||
119 | ssid = ce_page_wifi_get_ssid (self); | ||
120 | |||
121 | - if (gtk_combo_box_get_active (priv->mode) == 1) | ||
122 | + wifi_mode = gtk_combo_box_get_active (priv->mode); | ||
123 | + if (WIFI_MODE_ADHOC == wifi_mode) | ||
124 | mode = "adhoc"; | ||
125 | + else if (WIFI_MODE_AP == wifi_mode) | ||
126 | + mode = "ap"; | ||
127 | else | ||
128 | mode = "infrastructure"; | ||
129 | |||
130 | -- | ||
131 | 2.1.0 | ||
132 | |||
diff --git a/meta-gnome/recipes-connectivity/network-manager-applet/files/0002-Use-AP-mode-for-network-sharing-if-device-supports-it.patch b/meta-gnome/recipes-connectivity/network-manager-applet/files/0002-Use-AP-mode-for-network-sharing-if-device-supports-it.patch deleted file mode 100644 index 4e3d7e2da1..0000000000 --- a/meta-gnome/recipes-connectivity/network-manager-applet/files/0002-Use-AP-mode-for-network-sharing-if-device-supports-it.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 7343b16113e378d04e40012abfe5bd96ca776968 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Marius B. Kotsbak" <marius@kotsbak.com> | ||
3 | Date: Tue, 12 Aug 2014 11:15:20 +0200 | ||
4 | Subject: [PATCH 2/2] Use AP mode for network sharing if device supports it. | ||
5 | |||
6 | Logic taken from similar functionality in gnome-control-center. | ||
7 | |||
8 | Upstream-Status: Backport [1] | ||
9 | |||
10 | [1] https://bug734589.bugzilla-attachments.gnome.org/attachment.cgi?id=283165 | ||
11 | --- | ||
12 | src/libnm-gtk/nm-wifi-dialog.c | 18 +++++++++++++++++- | ||
13 | 1 file changed, 17 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/libnm-gtk/nm-wifi-dialog.c b/src/libnm-gtk/nm-wifi-dialog.c | ||
16 | index 3532caa..ca72c96 100644 | ||
17 | --- a/src/libnm-gtk/nm-wifi-dialog.c | ||
18 | +++ b/src/libnm-gtk/nm-wifi-dialog.c | ||
19 | @@ -1226,10 +1226,26 @@ nma_wifi_dialog_get_connection (NMAWifiDialog *self, | ||
20 | s_wireless = (NMSettingWireless *) nm_setting_wireless_new (); | ||
21 | g_object_set (s_wireless, NM_SETTING_WIRELESS_SSID, validate_dialog_ssid (self), NULL); | ||
22 | |||
23 | + /* Fill device */ | ||
24 | + if (device) { | ||
25 | + combo = GTK_WIDGET (gtk_builder_get_object (priv->builder, "device_combo")); | ||
26 | + gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter); | ||
27 | + gtk_tree_model_get (priv->device_model, &iter, D_DEV_COLUMN, device, -1); | ||
28 | + g_object_unref (*device); | ||
29 | + } | ||
30 | + | ||
31 | if (priv->operation == OP_CREATE_ADHOC) { | ||
32 | NMSettingIP4Config *s_ip4; | ||
33 | |||
34 | - g_object_set (s_wireless, NM_SETTING_WIRELESS_MODE, "adhoc", NULL); | ||
35 | + const char *mode; | ||
36 | + | ||
37 | + /* Use real AP mode if the device supports it */ | ||
38 | + if (device && nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (*device)) & NM_WIFI_DEVICE_CAP_AP) | ||
39 | + mode = NM_SETTING_WIRELESS_MODE_AP; | ||
40 | + else | ||
41 | + mode = NM_SETTING_WIRELESS_MODE_ADHOC; | ||
42 | + | ||
43 | + g_object_set (s_wireless, NM_SETTING_WIRELESS_MODE, mode, NULL); | ||
44 | |||
45 | s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new (); | ||
46 | g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_SHARED, NULL); | ||
47 | -- | ||
48 | 1.8.3.1 | ||
diff --git a/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.4.bb b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.10.bb index e83ebb8651..33662d39cc 100644 --- a/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.4.bb +++ b/meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.0.10.bb | |||
@@ -2,18 +2,14 @@ SUMMARY = "GTK+ applet for NetworkManager" | |||
2 | LICENSE = "GPLv2" | 2 | LICENSE = "GPLv2" |
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
4 | 4 | ||
5 | DEPENDS = "gtk+3 libnotify libsecret networkmanager dbus-glib gconf libgnome-keyring iso-codes" | 5 | DEPENDS = "gtk+3 libnotify libsecret networkmanager dbus-glib gconf libgnome-keyring iso-codes nss" |
6 | 6 | ||
7 | inherit gnomebase gsettings gtk-icon-cache | 7 | inherit gnomebase gsettings gtk-icon-cache |
8 | 8 | ||
9 | GNOME_COMPRESS_TYPE = "xz" | 9 | GNOME_COMPRESS_TYPE = "xz" |
10 | 10 | ||
11 | SRC_URI += " \ | 11 | SRC_URI[archive.md5sum] = "86b17e1bf1a37c649874883b587c6db6" |
12 | file://0001-Add-support-for-AP-mode-setting-for-wifi-sharing.patch \ | 12 | SRC_URI[archive.sha256sum] = "b045ac3eaa68ccbbefe91510ad67b4002a7e09d1e5ce1c4bf9a67619bd2cf0eb" |
13 | file://0002-Use-AP-mode-for-network-sharing-if-device-supports-it.patch \ | ||
14 | " | ||
15 | SRC_URI[archive.md5sum] = "7fc2ed3f0c46ed41ddabe99d51513b1c" | ||
16 | SRC_URI[archive.sha256sum] = "2cc26f03d0011d2a067bd5205dc0c17d5aa0470020a8c36d319ae10e5728af72" | ||
17 | 13 | ||
18 | PACKAGECONFIG[bluetooth] = "--with-bluetooth,--without-bluetooth,gnome-bluetooth,gnome-bluetooth" | 14 | PACKAGECONFIG[bluetooth] = "--with-bluetooth,--without-bluetooth,gnome-bluetooth,gnome-bluetooth" |
19 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1,--without-modem-manager-1,modemmanager" | 15 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1,--without-modem-manager-1,modemmanager" |
@@ -29,6 +25,7 @@ do_configure_append() { | |||
29 | RDEPENDS_${PN} =+ "networkmanager" | 25 | RDEPENDS_${PN} =+ "networkmanager" |
30 | 26 | ||
31 | FILES_${PN} += " \ | 27 | FILES_${PN} += " \ |
28 | ${datadir}/appdata \ | ||
32 | ${datadir}/nm-applet/ \ | 29 | ${datadir}/nm-applet/ \ |
33 | ${datadir}/libnm-gtk/wifi.ui \ | 30 | ${datadir}/libnm-gtk/wifi.ui \ |
34 | " | 31 | " |