gegl r2737 - in trunk: . bin



Author: neo
Date: Thu Nov 13 12:22:39 2008
New Revision: 2737
URL: http://svn.gnome.org/viewvc/gegl?rev=2737&view=rev

Log:
2008-11-13  Sven Neumann  <sven gimp org>

	* bin/editor-optype.c (gegl_typeeditor_optype): fixed string and
	avoid an unnecessary strdup.



Modified:
   trunk/ChangeLog
   trunk/bin/editor-optype.c

Modified: trunk/bin/editor-optype.c
==============================================================================
--- trunk/bin/editor-optype.c	(original)
+++ trunk/bin/editor-optype.c	Thu Nov 13 12:22:39 2008
@@ -380,16 +380,16 @@
                         GtkSizeGroup   *col2,
                         GeglNodeEditor *node_editor)
 {
-  GtkWidget *hbox;
-  GtkWidget *label = NULL;
-  GtkWidget *hbox2;
-  GtkWidget *entry;
+  GtkWidget   *hbox;
+  GtkWidget   *label = NULL;
+  GtkWidget   *hbox2;
+  GtkWidget   *entry;
   GtkEntryCompletion *completion;
   GtkTreeModel *completion_model;
-  GtkWidget *button;
-  GtkWidget *button_arrow;
-  char     *current_type;
-  GeglNode  *item = NULL;
+  GtkWidget   *button;
+  GtkWidget   *button_arrow;
+  const gchar *current_type;
+  GeglNode    *item = NULL;
 
   if (node_editor)
     item =node_editor->node;
@@ -411,11 +411,13 @@
 
   if (item)
     {
-  current_type = g_strdup (gegl_node_get_operation (item));
+      current_type = gegl_node_get_operation (item);
     }
   else
     {
-      current_type = g_strdup ("Write the name of a GEGL operation to apply or examine use the dropdown menu in the upper right");
+      current_type =
+	"Write the name of a GEGL operation to apply "
+	"or use the dropdown menu to the right";
     }
 
   if (label) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
@@ -433,7 +435,6 @@
   if (current_type)
     {
       gtk_entry_set_text (GTK_ENTRY (entry), current_type);
-      g_free (current_type);
     }
   gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
   gtk_entry_set_completion (GTK_ENTRY (entry), completion);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]