[gnome-control-center/gnome-3-8] network: Set connection editor title for wired
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-8] network: Set connection editor title for wired
- Date: Mon, 15 Apr 2013 12:28:09 +0000 (UTC)
commit 9b1cce39b1b2aef19f1d02bb177e1ccbe8fa883c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 12 22:03:56 2013 -0400
network: Set connection editor title for wired
https://bugzilla.gnome.org/show_bug.cgi?id=693780
panels/network/net-device-ethernet.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/net-device-ethernet.c b/panels/network/net-device-ethernet.c
index addaf4b..e525b3e 100644
--- a/panels/network/net-device-ethernet.c
+++ b/panels/network/net-device-ethernet.c
@@ -246,7 +246,7 @@ editor_done (NetConnectionEditor *editor,
}
static void
-show_details_for_row (GtkButton *button, NetDeviceEthernet *device)
+show_details (GtkButton *button, NetDeviceEthernet *device, const gchar *title)
{
GtkWidget *row;
NMConnection *connection;
@@ -265,11 +265,30 @@ show_details_for_row (GtkButton *button, NetDeviceEthernet *device)
client = net_object_get_client (NET_OBJECT (device));
settings = net_object_get_remote_settings (NET_OBJECT (device));
editor = net_connection_editor_new (GTK_WINDOW (window), connection, nmdev, NULL, client, settings);
+ if (title)
+ net_connection_editor_set_title (editor, title);
g_signal_connect (editor, "done", G_CALLBACK (editor_done), device);
net_connection_editor_run (editor);
}
static void
+show_details_for_row (GtkButton *button, NetDeviceEthernet *device)
+{
+ show_details (button, device, NULL);
+}
+
+static void
+show_details_for_wired (GtkButton *button, NetDeviceEthernet *device)
+{
+ /* Translators: This is used as the title of the connection
+ * details window for ethernet, if there is only a single
+ * profile. It is also used to display ethernet in the
+ * device list.
+ */
+ show_details (button, device, _("Wired"));
+}
+
+static void
add_row (NetDeviceEthernet *device, NMConnection *connection)
{
GtkWidget *row;
@@ -550,7 +569,7 @@ device_ethernet_constructed (GObject *object)
device->details_button = GTK_WIDGET (gtk_builder_get_object (NET_DEVICE_ETHERNET (object)->builder,
"details_button"));
g_signal_connect (device->details_button, "clicked",
- G_CALLBACK (show_details_for_row), device);
+ G_CALLBACK (show_details_for_wired), device);
device->add_profile_button = GTK_WIDGET (gtk_builder_get_object (NET_DEVICE_ETHERNET
(object)->builder, "add_profile_button"));
g_signal_connect (device->add_profile_button, "clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]