network: populate some of the data for mobile broadband connections

This commit is contained in:
Richard Hughes 2010-12-15 19:59:26 +00:00
parent 3e1053c502
commit ed2353bf12
2 changed files with 38 additions and 5 deletions

View file

@ -842,6 +842,35 @@ panel_populate_wireless_device (CcNetworkPanel *panel, PanelDeviceItem *item)
g_variant_unref (bitrate);
}
/**
* 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:
**/
@ -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:

View file

@ -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>