[gnome-control-center/gnome-3-14] network: Remove use of temporary variable
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-14] network: Remove use of temporary variable
- Date: Thu, 19 Mar 2015 15:41:35 +0000 (UTC)
commit 021b1df136c034eeb39ca20763ff843d1514be3b
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 6a8e249..4bb6cdd 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -956,7 +956,6 @@ out:
static void
panel_add_proxy_device (CcNetworkPanel *panel)
{
- gchar *title;
GtkListStore *liststore_devices;
GtkTreeIter iter;
NetProxy *proxy;
@@ -976,8 +975,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,
@@ -985,7 +983,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]