Lines 28-33
Link Here
|
28 |
#include "nm-client.h" |
28 |
#include "nm-client.h" |
29 |
#include "nm-device.h" |
29 |
#include "nm-device.h" |
30 |
#include "nm-device-ethernet.h" |
30 |
#include "nm-device-ethernet.h" |
|
|
31 |
#include "nm-device-modem.h" |
31 |
#include "nm-device-wifi.h" |
32 |
#include "nm-device-wifi.h" |
32 |
#include "nm-utils.h" |
33 |
#include "nm-utils.h" |
33 |
#include "nm-active-connection.h" |
34 |
#include "nm-active-connection.h" |
Lines 376-383
panel_add_device (CcNetworkPanel *panel, NMDevice *device)
Link Here
|
376 |
|
377 |
|
377 |
/* do we have to get additonal data from ModemManager */ |
378 |
/* do we have to get additonal data from ModemManager */ |
378 |
type = nm_device_get_device_type (device); |
379 |
type = nm_device_get_device_type (device); |
379 |
if (type == NM_DEVICE_TYPE_GSM || |
380 |
if (type == NM_DEVICE_TYPE_MODEM) { |
380 |
type == NM_DEVICE_TYPE_CDMA) { |
|
|
381 |
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, |
381 |
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, |
382 |
G_DBUS_PROXY_FLAGS_NONE, |
382 |
G_DBUS_PROXY_FLAGS_NONE, |
383 |
NULL, |
383 |
NULL, |
Lines 400-414
panel_add_device (CcNetworkPanel *panel, NMDevice *device)
Link Here
|
400 |
|
400 |
|
401 |
/* make title a bit bigger */ |
401 |
/* make title a bit bigger */ |
402 |
title = g_strdup_printf ("<span size=\"large\">%s</span>", |
402 |
title = g_strdup_printf ("<span size=\"large\">%s</span>", |
403 |
panel_device_type_to_localized_string (nm_device_get_device_type (device))); |
403 |
panel_device_to_localized_string (device)); |
404 |
|
404 |
|
405 |
liststore_devices = GTK_LIST_STORE (gtk_builder_get_object (priv->builder, |
405 |
liststore_devices = GTK_LIST_STORE (gtk_builder_get_object (priv->builder, |
406 |
"liststore_devices")); |
406 |
"liststore_devices")); |
407 |
gtk_list_store_append (liststore_devices, &iter); |
407 |
gtk_list_store_append (liststore_devices, &iter); |
408 |
gtk_list_store_set (liststore_devices, |
408 |
gtk_list_store_set (liststore_devices, |
409 |
&iter, |
409 |
&iter, |
410 |
PANEL_DEVICES_COLUMN_ICON, panel_device_type_to_icon_name (nm_device_get_device_type (device)), |
410 |
PANEL_DEVICES_COLUMN_ICON, panel_device_to_icon_name (device), |
411 |
PANEL_DEVICES_COLUMN_SORT, panel_device_type_to_sortable_string (nm_device_get_device_type (device)), |
411 |
PANEL_DEVICES_COLUMN_SORT, panel_device_to_sortable_string (device), |
412 |
PANEL_DEVICES_COLUMN_TITLE, title, |
412 |
PANEL_DEVICES_COLUMN_TITLE, title, |
413 |
PANEL_DEVICES_COLUMN_ID, nm_device_get_udi (device), |
413 |
PANEL_DEVICES_COLUMN_ID, nm_device_get_udi (device), |
414 |
PANEL_DEVICES_COLUMN_TOOLTIP, NULL, |
414 |
PANEL_DEVICES_COLUMN_TOOLTIP, NULL, |
Lines 729-742
nm_device_refresh_item_ui (CcNetworkPanel *panel, NMDevice *device)
Link Here
|
729 |
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, |
729 |
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, |
730 |
"image_device")); |
730 |
"image_device")); |
731 |
gtk_image_set_from_icon_name (GTK_IMAGE (widget), |
731 |
gtk_image_set_from_icon_name (GTK_IMAGE (widget), |
732 |
panel_device_type_to_icon_name (type), |
732 |
panel_device_to_icon_name (device), |
733 |
GTK_ICON_SIZE_DIALOG); |
733 |
GTK_ICON_SIZE_DIALOG); |
734 |
|
734 |
|
735 |
/* set device kind */ |
735 |
/* set device kind */ |
736 |
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, |
736 |
widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, |
737 |
"label_device")); |
737 |
"label_device")); |
738 |
gtk_label_set_label (GTK_LABEL (widget), |
738 |
gtk_label_set_label (GTK_LABEL (widget), |
739 |
panel_device_type_to_localized_string (type)); |
739 |
panel_device_to_localized_string (device)); |
740 |
|
740 |
|
741 |
|
741 |
|
742 |
/* set device state */ |
742 |
/* set device state */ |
Lines 754-763
nm_device_refresh_item_ui (CcNetworkPanel *panel, NMDevice *device)
Link Here
|
754 |
} else if (type == NM_DEVICE_TYPE_WIFI) { |
754 |
} else if (type == NM_DEVICE_TYPE_WIFI) { |
755 |
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 1); |
755 |
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 1); |
756 |
sub_pane = "wireless"; |
756 |
sub_pane = "wireless"; |
757 |
} else if (type == NM_DEVICE_TYPE_GSM || |
757 |
} else if (type == NM_DEVICE_TYPE_MODEM) { |
758 |
type == NM_DEVICE_TYPE_CDMA) { |
758 |
NMDeviceModemCapabilities caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device)); |
759 |
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 4); |
759 |
if ((caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) || |
760 |
sub_pane = "mobilebb"; |
760 |
(caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)) { |
|
|
761 |
gtk_notebook_set_current_page (GTK_NOTEBOOK (widget), 4); |
762 |
sub_pane = "mobilebb"; |
763 |
} |
761 |
} |
764 |
} |
762 |
if (sub_pane == NULL) |
765 |
if (sub_pane == NULL) |
763 |
goto out; |
766 |
goto out; |
Lines 824-853
nm_device_refresh_item_ui (CcNetworkPanel *panel, NMDevice *device)
Link Here
|
824 |
active_ap); |
827 |
active_ap); |
825 |
} |
828 |
} |
826 |
|
829 |
|
827 |
} else if (type == NM_DEVICE_TYPE_GSM || |
830 |
} else if (type == NM_DEVICE_TYPE_MODEM) { |
828 |
type == NM_DEVICE_TYPE_CDMA) { |
831 |
NMDeviceModemCapabilities caps = nm_device_modem_get_current_capabilities (NM_DEVICE_MODEM (device)); |
829 |
|
832 |
|
830 |
/* IMEI */ |
833 |
if ((caps & NM_DEVICE_MODEM_CAPABILITY_GSM_UMTS) || |
831 |
str = g_object_get_data (G_OBJECT (device), |
834 |
(caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)) { |
832 |
"ControlCenter::EquipmentIdentifier"); |
835 |
/* IMEI */ |
833 |
panel_set_widget_data (panel, |
836 |
str = g_object_get_data (G_OBJECT (device), |
834 |
sub_pane, |
837 |
"ControlCenter::EquipmentIdentifier"); |
835 |
"imei", |
838 |
panel_set_widget_data (panel, |
836 |
str); |
839 |
sub_pane, |
|
|
840 |
"imei", |
841 |
str); |
837 |
|
842 |
|
838 |
/* operator name */ |
843 |
/* operator name */ |
839 |
str = g_object_get_data (G_OBJECT (device), |
844 |
str = g_object_get_data (G_OBJECT (device), |
840 |
"ControlCenter::OperatorName"); |
845 |
"ControlCenter::OperatorName"); |
841 |
panel_set_widget_data (panel, |
846 |
panel_set_widget_data (panel, |
842 |
sub_pane, |
847 |
sub_pane, |
843 |
"provider", |
848 |
"provider", |
844 |
str); |
849 |
str); |
845 |
|
850 |
|
846 |
/* device speed */ |
851 |
/* device speed */ |
847 |
panel_set_widget_data (panel, |
852 |
panel_set_widget_data (panel, |
848 |
sub_pane, |
853 |
sub_pane, |
849 |
"speed", |
854 |
"speed", |
850 |
NULL); |
855 |
NULL); |
|
|
856 |
} |
851 |
} |
857 |
} |
852 |
|
858 |
|
853 |
/* get IP4 parameters */ |
859 |
/* get IP4 parameters */ |