[gnome-control-center] network: Remove use of temporary variable
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Remove use of temporary variable
- Date: Thu, 19 Mar 2015 15:34:07 +0000 (UTC)
commit f6f4e7b774cf33f6841db328042e44a4c39df310
Author: Bastien Nocera <hadess hadess net>
Date: Wed Mar 18 18:16:26 2015 +0100
network: Remove use of temporary variable
No need to copy a static string before using it.
https://bugzilla.gnome.org/show_bug.cgi?id=746411
panels/network/cc-network-panel.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index 4edae7a..cd8385e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -945,7 +945,6 @@ out:
static void
panel_add_proxy_device (CcNetworkPanel *panel)
{
- gchar *title;
GtkListStore *liststore_devices;
GtkTreeIter iter;
NetProxy *proxy;
@@ -965,8 +964,7 @@ panel_add_proxy_device (CcNetworkPanel *panel)
/* add proxy to device list */
liststore_devices = GTK_LIST_STORE (gtk_builder_get_object (panel->priv->builder,
"liststore_devices"));
- title = g_strdup_printf ("%s", _("Network proxy"));
- net_object_set_title (NET_OBJECT (proxy), title);
+ net_object_set_title (NET_OBJECT (proxy), _("Network proxy"));
gtk_list_store_append (liststore_devices, &iter);
gtk_list_store_set (liststore_devices,
&iter,
@@ -974,7 +972,6 @@ panel_add_proxy_device (CcNetworkPanel *panel)
PANEL_DEVICES_COLUMN_SORT, "9",
PANEL_DEVICES_COLUMN_OBJECT, proxy,
-1);
- g_free (title);
g_object_unref (proxy);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]