devhelp r1154 - in trunk: . src



Author: rhult
Date: Mon Oct  6 17:16:19 2008
New Revision: 1154
URL: http://svn.gnome.org/viewvc/devhelp?rev=1154&view=rev

Log:
2008-10-06  Richard Hult  <richard imendio com>

	* src/dh-search.c: (search_cell_data_func): Use the link instead
	of getting the name directly from the model, saves a copy/free and
	is more consistent with the other properties that we get.


Modified:
   trunk/ChangeLog
   trunk/src/dh-search.c

Modified: trunk/src/dh-search.c
==============================================================================
--- trunk/src/dh-search.c	(original)
+++ trunk/src/dh-search.c	Mon Oct  6 17:16:19 2008
@@ -2,7 +2,7 @@
 /*
  * Copyright (C) 2001-2003 CodeFactory AB
  * Copyright (C) 2001-2003 Mikael Hallendal <micke imendio com>
- * Copyright (C) 2005-2006 Imendio AB
+ * Copyright (C) 2005-2008 Imendio AB
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -431,7 +431,6 @@
 {
         DhSearch     *search;
         DhSearchPriv *priv;
-        gchar        *name;
         DhLink       *link;
         PangoStyle    style;
 
@@ -439,7 +438,6 @@
         priv = GET_PRIVATE (search);
 
         gtk_tree_model_get (tree_model, iter,
-                            DH_KEYWORD_MODEL_COL_NAME, &name,
                             DH_KEYWORD_MODEL_COL_LINK, &link,
                             -1);
 
@@ -450,10 +448,9 @@
         }
 
         g_object_set (cell,
-                      "text", name,
+                      "text", dh_link_get_name (link),
                       "style", style,
                       NULL);
-        g_free (name);
 }
 
 static GtkWidget *
@@ -649,4 +646,3 @@
 
         gtk_widget_grab_focus (priv->entry);
 }
-



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