[gnome-control-center/wip/wireless-list] network: wifi page rework
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/wireless-list] network: wifi page rework
- Date: Tue, 3 Jul 2012 12:18:38 +0000 (UTC)
commit 0484ffacf73c3ff4bfef05dccf8ea935d37e8d79
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 3 00:19:41 2012 -0400
network: wifi page rework
This is incomplete work towards the wireless page as seen in
https://github.com/gnome-design-team/gnome-mockups/blob/master/system-settings/network/aday/png/wireless-panel.png
Currently working:
- Connect to hidden network
- Show details for active connection
- Forget button
- Go back to list
Next steps:
- hook up the Disconnect button
- add out-of-range networks to the list
- implement details for non-active connections
- add hotspot to the list
- implement hotspot details
- sort out details of the list look and feel
- clean up the code and the .ui file
panels/network/Makefile.am | 2 +
panels/network/cc-network-panel.c | 172 ++++--
panels/network/network.ui | 969 +++++++++++++++-------------
panels/network/panel-cell-renderer-arrow.c | 83 +++
panels/network/panel-cell-renderer-arrow.h | 61 ++
5 files changed, 772 insertions(+), 515 deletions(-)
---
diff --git a/panels/network/Makefile.am b/panels/network/Makefile.am
index 23e812d..761fc5f 100644
--- a/panels/network/Makefile.am
+++ b/panels/network/Makefile.am
@@ -28,6 +28,8 @@ libnetwork_la_SOURCES = \
panel-cell-renderer-security.h \
panel-cell-renderer-signal.c \
panel-cell-renderer-signal.h \
+ panel-cell-renderer-arrow.c \
+ panel-cell-renderer-arrow.h \
network-dialogs.c \
network-dialogs.h \
cc-network-panel.c \
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 0d000de..82c8b9c 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -53,6 +53,7 @@
#include "panel-cell-renderer-mode.h"
#include "panel-cell-renderer-signal.h"
#include "panel-cell-renderer-security.h"
+#include "panel-cell-renderer-arrow.h"
#include "network-dialogs.h"
@@ -1000,32 +1001,6 @@ add_access_point (CcNetworkPanel *panel, NMAccessPoint *ap, NMAccessPoint *activ
}
}
-static void
-add_access_point_other (CcNetworkPanel *panel)
-{
- CcNetworkPanelPrivate *priv = panel->priv;
- GtkListStore *liststore_wireless_network;
- GtkTreeIter treeiter;
-
- liststore_wireless_network = GTK_LIST_STORE (gtk_builder_get_object (priv->builder,
- "liststore_wireless_network"));
-
- gtk_list_store_append (liststore_wireless_network, &treeiter);
- gtk_list_store_set (liststore_wireless_network,
- &treeiter,
- PANEL_WIRELESS_COLUMN_ID, "ap-other...",
- /* TRANSLATORS: this is when the access point is not listed
- * in the dropdown (or hidden) and the user has to select
- * another entry manually */
- PANEL_WIRELESS_COLUMN_TITLE, C_("Wireless access point", "Other..."),
- /* always last */
- PANEL_WIRELESS_COLUMN_SORT, "",
- PANEL_WIRELESS_COLUMN_STRENGTH, 0,
- PANEL_WIRELESS_COLUMN_MODE, NM_802_11_MODE_UNKNOWN,
- PANEL_WIRELESS_COLUMN_SECURITY, NM_AP_SEC_UNKNOWN,
- -1);
-}
-
#if 0
static gchar *
ip4_address_as_string (guint32 ip)
@@ -1775,16 +1750,19 @@ refresh_header_ui (CcNetworkPanel *panel, NMDevice *device, const char *page_nam
wid_name = g_strdup_printf ("image_%s_device", page_name);
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name));
g_free (wid_name);
- gtk_image_set_from_icon_name (GTK_IMAGE (widget),
- panel_device_to_icon_name (device),
- GTK_ICON_SIZE_DIALOG);
+ if (widget)
+ gtk_image_set_from_icon_name (GTK_IMAGE (widget),
+ panel_device_to_icon_name (device),
+ GTK_ICON_SIZE_DIALOG);
/* set device kind */
wid_name = g_strdup_printf ("label_%s_device", page_name);
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, wid_name));
g_free (wid_name);
- gtk_label_set_label (GTK_LABEL (widget),
- panel_device_to_localized_string (device));
+
+ if (widget)
+ gtk_label_set_label (GTK_LABEL (widget),
+ panel_device_to_localized_string (device));
/* set up the device on/off switch */
wid_name = g_strdup_printf ("device_%s_off_switch", page_name);
@@ -1919,21 +1897,12 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
device_get_hotspot_security_details (panel, nm_device, &hotspot_secret, &hotspot_security);
}
- widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "start_hotspot_button"));
- gtk_widget_set_visible (widget, !is_hotspot);
-
sw = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
"device_wireless_off_switch"));
perm = nm_client_get_permission_result (panel->priv->client, NM_CLIENT_PERMISSION_WIFI_SHARE_OPEN);
can_start_hotspot = gtk_switch_get_active (GTK_SWITCH (sw)) &&
(perm == NM_CLIENT_PERMISSION_RESULT_YES ||
perm == NM_CLIENT_PERMISSION_RESULT_AUTH);
- gtk_widget_set_sensitive (widget, can_start_hotspot);
-
- widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "stop_hotspot_button"));
- gtk_widget_set_visible (widget, is_hotspot);
panel_set_widget_data (panel, "hotspot", "network_name", hotspot_ssid);
g_free (hotspot_ssid);
@@ -1969,11 +1938,7 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
"combobox_wireless_network_name"));
/* populate access point dropdown */
if (is_hotspot || state == NM_DEVICE_STATE_UNAVAILABLE) {
- gtk_widget_hide (heading);
- gtk_widget_hide (widget);
} else {
- gtk_widget_show (heading);
- gtk_widget_show (widget);
liststore_wireless_network = GTK_LIST_STORE (gtk_builder_get_object (panel->priv->builder,
"liststore_wireless_network"));
panel->priv->updating_device = TRUE;
@@ -1985,7 +1950,6 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
ap = NM_ACCESS_POINT (g_ptr_array_index (aps_unique, i));
add_access_point (panel, ap, active_ap, nm_device);
}
- add_access_point_other (panel);
if (active_ap == NULL) {
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
"combobox_wireless_network_name"));
@@ -1998,6 +1962,21 @@ device_refresh_wifi_ui (CcNetworkPanel *panel, NetDevice *device)
g_ptr_array_unref (aps_unique);
}
+ if (active_ap) {
+ const GByteArray *ssid;
+ const gchar *ssid_text;
+
+ ssid = nm_access_point_get_ssid (active_ap);
+ if (ssid)
+ ssid_text = nm_utils_escape_ssid (ssid->data, ssid->len);
+ else
+ ssid_text = "";
+
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "wireless-network-name-label"));
+
+ gtk_label_set_text (GTK_LABEL (widget), ssid_text);
+ }
+
/* setup wireless button */
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
"button_wireless_button"));
@@ -3132,10 +3111,6 @@ wireless_ap_changed_cb (GtkComboBox *combo_box, CcNetworkPanel *panel)
-1);
g_debug ("try to connect to WIFI network %s [%s]",
ssid_target, object_path);
- if (g_strcmp0 (object_path, "ap-other...") == 0) {
- connect_to_hidden_network (panel);
- goto out;
- }
/* look for an existing connection we can use */
list = nm_remote_settings_list_connections (panel->priv->remote_settings);
@@ -3674,6 +3649,26 @@ network_add_shell_header_widgets_cb (gpointer user_data)
}
static void
+show_wifi_network (GtkCellRenderer *c, const gchar *path, gpointer user_data)
+{
+ CcNetworkPanel *panel = CC_NETWORK_PANEL (user_data);
+ GtkWidget *nb;
+
+ nb = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "wireless-notebook"));
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (nb), 1);
+}
+
+static void
+go_back_to_wireless_list (gpointer user_data)
+{
+ CcNetworkPanel *panel = CC_NETWORK_PANEL (user_data);
+ GtkWidget *nb;
+
+ nb = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder, "wireless-notebook"));
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (nb), 0);
+}
+
+static void
cc_network_panel_init (CcNetworkPanel *panel)
{
DBusGConnection *bus = NULL;
@@ -3688,6 +3683,8 @@ cc_network_panel_init (CcNetworkPanel *panel)
GtkTreeSortable *sortable;
GtkWidget *widget;
GtkWidget *toplevel;
+ GtkTreeViewColumn *column;
+ GtkCellArea *area;
panel->priv = NETWORK_PANEL_PRIVATE (panel);
@@ -3869,6 +3866,69 @@ cc_network_panel_init (CcNetworkPanel *panel)
"security", PANEL_WIRELESS_COLUMN_SECURITY,
NULL);
+ /* set up wireless list */
+ column = GTK_TREE_VIEW_COLUMN (gtk_builder_get_object (panel->priv->builder,
+ "wireless-list-column"));
+ area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (column));
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+ g_object_set (renderer,
+ "follow-state", TRUE,
+ "icon-name", "object-select-symbolic",
+ NULL);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "visible", PANEL_WIRELESS_COLUMN_ACTIVE,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "text", PANEL_WIRELESS_COLUMN_TITLE,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+ renderer = panel_cell_renderer_mode_new ();
+ gtk_cell_renderer_set_padding (renderer, 4, 0);
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+ g_object_set (renderer, "follow-state", TRUE, NULL);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "mode", PANEL_WIRELESS_COLUMN_MODE,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+ renderer = panel_cell_renderer_signal_new ();
+ gtk_cell_renderer_set_padding (renderer, 4, 0);
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+ g_object_set (renderer, "follow-state", TRUE, NULL);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "signal", PANEL_WIRELESS_COLUMN_STRENGTH,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+ renderer = panel_cell_renderer_security_new ();
+ gtk_cell_renderer_set_padding (renderer, 4, 0);
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+ g_object_set (renderer, "follow-state", TRUE, NULL);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "security", PANEL_WIRELESS_COLUMN_SECURITY,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+
+ renderer = panel_cell_renderer_arrow_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (column), renderer, FALSE);
+ g_object_set (renderer,
+ "follow-state", TRUE,
+ "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
+ NULL);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (column), renderer,
+ "visible", PANEL_WIRELESS_COLUMN_ACTIVE,
+ NULL);
+ gtk_cell_area_cell_set (area, renderer, "align", TRUE, NULL);
+ g_signal_connect (renderer, "activate",
+ G_CALLBACK (show_wifi_network), panel);
+
/* use NetworkManager client */
panel->priv->client = nm_client_new ();
g_signal_connect (panel->priv->client, "notify::" NM_CLIENT_MANAGER_RUNNING,
@@ -3909,14 +3969,14 @@ cc_network_panel_init (CcNetworkPanel *panel)
G_CALLBACK (mobilebb_enabled_toggled), panel);
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "start_hotspot_button"));
- g_signal_connect (widget, "clicked",
- G_CALLBACK (start_hotspot), panel);
- widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
- "stop_hotspot_button"));
- g_signal_connect (widget, "clicked",
- G_CALLBACK (stop_hotspot), panel);
+ "hidden-wireless-button"));
+ g_signal_connect_swapped (widget, "clicked",
+ G_CALLBACK (connect_to_hidden_network), panel);
+ widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
+ "wireless-back-button"));
+ g_signal_connect_swapped (widget, "clicked",
+ G_CALLBACK (go_back_to_wireless_list), panel);
widget = GTK_WIDGET (gtk_builder_get_object (panel->priv->builder,
"button_wired_options"));
diff --git a/panels/network/network.ui b/panels/network/network.ui
index 8ee15cf..0cd1c47 100644
--- a/panels/network/network.ui
+++ b/panels/network/network.ui
@@ -703,264 +703,47 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkNotebook" id="wireless-notebook">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="spacing">6</property>
+ <property name="show-tabs">False</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkScrolledWindow" id="wireless-swin">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">6</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">automatic</property>
<child>
- <object class="GtkImage" id="image_wireless_device">
+ <object class="GtkViewport" id="wireless-vport">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
- <property name="xalign">1</property>
- <property name="pixel_size">48</property>
- <property name="icon_name">network-wireless</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <child>
+ <object class="GtkBox" id="wireless-list-box">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkBox" id="wireless-heading-box">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="valign">start</property>
- <property name="hexpand">True</property>
- <property name="spacing">3</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin-left">12</property>
+ <property name="margin-right">12</property>
+ <property name="margin-top">12</property>
+ <property name="margin-bottom">6</property>
<child>
- <object class="GtkLabel" id="label_wireless_device">
+ <object class="GtkLabel" id="wireless-heading">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label">Wireless</property>
- <property name="ellipsize">end</property>
+ <property name="hexpand">True</property>
+ <property name="halign">start</property>
<attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="scale" value="1.2"/>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.2"/>
</attributes>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_status">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Not connected</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_mac">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Hardware Address</property>
- <property name="mnemonic_widget">label_wireless_mac</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_ipv4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">IPv4 Address</property>
- <property name="mnemonic_widget">label_wireless_ipv4</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_ipv6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">IPv6 Address</property>
- <property name="mnemonic_widget">label_wireless_ipv6</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_route">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Default Route</property>
- <property name="mnemonic_widget">label_wireless_route</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_dns">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">DNS</property>
- <property name="mnemonic_widget">label_wireless_dns</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_mac">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">AA:BB:CC:DD:55:66:77:88</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_ipv4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">127.0.0.1</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_ipv6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">::1</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_route">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">127.0.0.1</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">7</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_dns">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label">127.0.0.1</property>
- <property name="wrap">True</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">8</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment_wireless_switch">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
- <child>
+ </child>
+ <child>
<object class="GtkSwitch" id="device_wireless_off_switch">
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">start</property>
- <property name="use_action_appearance">False</property>
<child internal-child="accessible">
<object class="AtkObject" id="wireless_off_a11y">
<property name="accessible-name" translatable="yes">Device Off</property>
@@ -969,247 +752,515 @@
</object>
</child>
</object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_wireless_security">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Security</property>
- <property name="mnemonic_widget">label_wireless_security</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
</child>
<child>
- <object class="GtkLabel" id="heading_wireless_network_name">
+ <object class="GtkTreeView" id="wireless-list">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">_Network Name</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">combobox_wireless_network_name</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_hotspot_network_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Network Name</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="heading_hotspot_security_key">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">Security Key</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">10</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label_wireless_security">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">WPA</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="combobox_wireless_network_name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="headers-visible">False</property>
+ <property name="margin-left">12</property>
+ <property name="margin-right">12</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<property name="model">liststore_wireless_network</property>
- <property name="has_entry">True</property>
- <property name="entry_text_column">1</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxentry-entry">
- <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="wireless-list-selection">
+ <property name="mode">single</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="wireless-list-column">
</object>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
</child>
<child>
- <object class="GtkLabel" id="label_hotspot_network_name">
+ <object class="GtkButton" id="hidden-wireless-button">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">My Hot Spot</property>
- <property name="selectable">True</property>
+ <property name="label">Connect to a _Hidden Network</property>
+ <property name="use-underline">True</property>
+ <property name="margin-left">12</property>
+ <property name="margin-right">12</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">12</property>
+ <property name="halign">start</property>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">9</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
</child>
- <child>
- <object class="GtkLabel" id="label_hotspot_security_key">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">My Secret</property>
- <property name="selectable">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">10</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
+ </object>
</child>
- <child>
- <object class="GtkButton" id="button_wireless_button">
- <property name="label" translatable="yes">_Forget Network</property>
- <property name="use_underline">True</property>
- <property name="use_action_appearance">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
+ </object>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">12</property>
- <child>
- <object class="GtkButton" id="start_hotspot_button">
- <property name="label" translatable="yes">_Use as Hotspot...</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
- <property name="valign">end</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="stop_hotspot_button">
- <property name="label" translatable="yes">_Stop Hotspot...</property>
- <property name="use_action_appearance">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">start</property>
- <property name="valign">end</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">1</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="wireless-top-hbox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkButton" id="wireless-back-button">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">False</property>
+ <child>
+ <object class="GtkArrow" id="wireless-back-arrow">
+ <property name="visible">True</property>
+ <property name="arrow-type">left</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <property name="halign">fill</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">False</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="wireless-network-name-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Connected</property>
+ <property name="ellipsize">end</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.2"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_status">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Not connected</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="wireless-disconnect-button">
+ <property name="visible">True</property>
+ <property name="use-underline">True</property>
+ <property name="label">_Disconnect</property>
+ <property name="valign">center</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="row_spacing">10</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_mac">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Hardware Address</property>
+ <property name="mnemonic_widget">label_wireless_mac</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_ipv4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">IPv4 Address</property>
+ <property name="mnemonic_widget">label_wireless_ipv4</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_ipv6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">IPv6 Address</property>
+ <property name="mnemonic_widget">label_wireless_ipv6</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">6</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_route">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Default Route</property>
+ <property name="mnemonic_widget">label_wireless_route</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_dns">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">DNS</property>
+ <property name="mnemonic_widget">label_wireless_dns</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">8</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_mac">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">AA:BB:CC:DD:55:66:77:88</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_ipv4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">127.0.0.1</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_ipv6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">::1</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">6</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_route">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">127.0.0.1</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">7</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_dns">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label">127.0.0.1</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">8</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment_wireless_switch">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_security">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Security</property>
+ <property name="mnemonic_widget">label_wireless_security</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_wireless_network_name">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">_Network Name</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">combobox_wireless_network_name</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_hotspot_network_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Network Name</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">9</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="heading_hotspot_security_key">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">Security Key</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">10</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_wireless_security">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">WPA</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="combobox_wireless_network_name">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore_wireless_network</property>
+ <property name="has_entry">True</property>
+ <property name="entry_text_column">1</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxentry-entry">
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_hotspot_network_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">My Hot Spot</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">9</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_hotspot_security_key">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">My Secret</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">10</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">12</property>
+ <child>
+ <object class="GtkButton" id="button_wireless_button">
+ <property name="label" translatable="yes">_Forget</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">start</property>
+ <property name="valign">end</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_wireless_options">
+ <property name="label" translatable="yes">_Options...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">end</property>
+ <property name="valign">end</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
<property name="position">1</property>
</packing>
- </child>
- <child>
- <object class="GtkButton" id="button_wireless_options">
- <property name="label" translatable="yes">_Options...</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="halign">end</property>
- <property name="valign">end</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ </child>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label16">
@@ -1355,7 +1406,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">SuperTel Supremo </property>
+ <property name="label">SuperTel Supremo </property>
<property name="selectable">True</property>
</object>
<packing>
diff --git a/panels/network/panel-cell-renderer-arrow.c b/panels/network/panel-cell-renderer-arrow.c
new file mode 100644
index 0000000..385e4c8
--- /dev/null
+++ b/panels/network/panel-cell-renderer-arrow.c
@@ -0,0 +1,83 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+
+#include "panel-cell-renderer-arrow.h"
+
+enum {
+ ACTIVATE,
+ LAST_SIGNAL
+};
+
+static gint signals[LAST_SIGNAL];
+
+G_DEFINE_TYPE (PanelCellRendererArrow, panel_cell_renderer_arrow, GTK_TYPE_CELL_RENDERER_PIXBUF)
+
+static gint
+panel_cell_renderer_arrow_activate (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *background_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
+{
+ g_signal_emit (cell, signals[ACTIVATE], 0, path);
+ return TRUE;
+}
+
+static void
+panel_cell_renderer_arrow_class_init (PanelCellRendererArrowClass *class)
+{
+ GtkCellRendererClass *r_class = GTK_CELL_RENDERER_CLASS (class);
+
+ r_class->activate = panel_cell_renderer_arrow_activate;
+
+ signals[ACTIVATE] =
+ g_signal_new ("activate",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (PanelCellRendererArrowClass, activate),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+}
+
+
+static void
+panel_cell_renderer_arrow_init (PanelCellRendererArrow *renderer)
+{
+}
+
+GtkCellRenderer *
+panel_cell_renderer_arrow_new (void)
+{
+ return g_object_new (PANEL_TYPE_CELL_RENDERER_ARROW,
+ "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE,
+ "icon-name", "go-next-symbolic",
+ NULL);
+}
+
diff --git a/panels/network/panel-cell-renderer-arrow.h b/panels/network/panel-cell-renderer-arrow.h
new file mode 100644
index 0000000..6eae1c1
--- /dev/null
+++ b/panels/network/panel-cell-renderer-arrow.h
@@ -0,0 +1,61 @@
+/* -*- Arrow: C; tab-width: 8; indent-tabs-arrow: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef PANEL_CELL_RENDERER_ARROW_H
+#define PANEL_CELL_RENDERER_ARROW_H
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+#include "nm-device.h"
+#include "nm-access-point.h"
+
+#define PANEL_TYPE_CELL_RENDERER_ARROW (panel_cell_renderer_arrow_get_type())
+#define PANEL_CELL_RENDERER_ARROW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PANEL_TYPE_CELL_RENDERER_ARROW, PanelCellRendererArrow))
+#define PANEL_CELL_RENDERER_ARROW_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST((cls), PANEL_TYPE_CELL_RENDERER_ARROW, PanelCellRendererArrowClass))
+#define PANEL_IS_CELL_RENDERER_ARROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PANEL_TYPE_CELL_RENDERER_ARROW))
+#define PANEL_IS_CELL_RENDERER_ARROW_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE((cls), PANEL_TYPE_CELL_RENDERER_ARROW))
+#define PANEL_CELL_RENDERER_ARROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PANEL_TYPE_CELL_RENDERER_ARROW, PanelCellRendererArrowClass))
+
+G_BEGIN_DECLS
+
+typedef struct _PanelCellRendererArrow PanelCellRendererArrow;
+typedef struct _PanelCellRendererArrowClass PanelCellRendererArrowClass;
+
+struct _PanelCellRendererArrow
+{
+ GtkCellRendererPixbuf parent;
+};
+
+struct _PanelCellRendererArrowClass
+{
+ GtkCellRendererPixbufClass parent_class;
+
+ void (*activate) (PanelCellRendererArrow *arrow, const gchar *path);
+};
+
+GType panel_cell_renderer_arrow_get_type (void);
+GtkCellRenderer *panel_cell_renderer_arrow_new (void);
+
+G_END_DECLS
+
+#endif /* PANEL_CELL_RENDERER_ARROW_H */
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]