summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-12-15 19:59:26 +0000
committerRichard Hughes <richard@hughsie.com>2010-12-15 19:59:26 +0000
commited2353bf1281e001a0d22e34ae253af4d8ba8a49 (patch)
tree079360a4a8289fcffcb3eece0b8674c21b7725ce
parent3e1053c502a54c6690ae02bea4f05acf5b4e461a (diff)
network: populate some of the data for mobile broadband connections
-rw-r--r--panels/network/cc-network-panel.c33
-rw-r--r--panels/network/network.ui10
2 files changed, 38 insertions, 5 deletions
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 2c2edeeb7..ea640de6c 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -843,6 +843,35 @@ panel_populate_wireless_device (CcNetworkPanel *panel, PanelDeviceItem *item)
}
/**
+ * panel_populate_mobilebb_device:
+ **/
+static void
+panel_populate_mobilebb_device (CcNetworkPanel *panel, PanelDeviceItem *item)
+{
+ GtkWidget *widget;
+ GVariant *ip4;
+
+ /* set IP */
+ ip4 = g_dbus_proxy_get_cached_property (item->proxy, "Ip4Address");
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
+ "label_wireless_ip"));
+ panel_set_label_for_variant_ipv4 (widget, ip4);
+
+ /* hide until we get data from ModemManager */
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
+ "hbox_mobilebb_provider"));
+ gtk_widget_set_visible (widget, FALSE);
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
+ "hbox_mobilebb_speed"));
+ gtk_widget_set_visible (widget, FALSE);
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
+ "hbox_mobilebb_mac"));
+ gtk_widget_set_visible (widget, FALSE);
+
+ g_variant_unref (ip4);
+}
+
+/**
* panel_devices_treeview_clicked_cb:
**/
static void
@@ -921,6 +950,10 @@ panel_devices_treeview_clicked_cb (GtkTreeSelection *selection, CcNetworkPanel *
} else if (item->type == NM_DEVICE_TYPE_WIFI) {
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 1);
panel_populate_wireless_device (panel, item);
+ } else if (item->type == NM_DEVICE_TYPE_GSM ||
+ item->type == NM_DEVICE_TYPE_CDMA) {
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 4);
+ panel_populate_mobilebb_device (panel, item);
}
out:
diff --git a/panels/network/network.ui b/panels/network/network.ui
index 8dc60ea1f..1d754b025 100644
--- a/panels/network/network.ui
+++ b/panels/network/network.ui
@@ -576,7 +576,7 @@
<property name="border_width">12</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox21">
+ <object class="GtkHBox" id="hbox_mobilebb_mac">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
@@ -602,7 +602,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="labe_mobilebb_mac">
+ <object class="GtkLabel" id="lable_mobilebb_mac">
<property name="visible">True</property>
<property name="label">AA:BB:CC:DD:55:66:77:88</property>
</object>
@@ -620,7 +620,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox25">
+ <object class="GtkHBox" id="hbox_mobilebb_speed">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
@@ -664,7 +664,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox27">
+ <object class="GtkHBox" id="hbox_mobilebb_provider">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
@@ -708,7 +708,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox29">
+ <object class="GtkHBox" id="hbox_mobilebb_ip">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>