[gnome-control-center/gnome-3-12] network: Remove use of temporary variable



commit 6e7ede77c9a29242e70ed6683356e8d206d2247e
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 8678a74..9791b07 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -935,7 +935,6 @@ out:
 static void
 panel_add_proxy_device (CcNetworkPanel *panel)
 {
-        gchar *title;
         GtkListStore *liststore_devices;
         GtkTreeIter iter;
         NetProxy *proxy;
@@ -955,8 +954,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,
@@ -964,7 +962,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]