[gnome-control-center] network: populate some of the data for mobile broadband connections
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: populate some of the data for mobile broadband connections
- Date: Wed, 15 Dec 2010 19:59:36 +0000 (UTC)
commit ed2353bf1281e001a0d22e34ae253af4d8ba8a49
Author: Richard Hughes <richard hughsie com>
Date: Wed Dec 15 19:59:26 2010 +0000
network: populate some of the data for mobile broadband connections
panels/network/cc-network-panel.c | 33 +++++++++++++++++++++++++++++++++
panels/network/network.ui | 10 +++++-----
2 files changed, 38 insertions(+), 5 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 2c2edee..ea640de 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 8dc60ea..1d754b0 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]