[anjuta] symbol-db: always return a pixbuf, even if type and access are null.
- From: Massimo Cora' <mcora src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: always return a pixbuf, even if type and access are null.
- Date: Sun, 7 Feb 2010 15:32:07 +0000 (UTC)
commit ab0f7320351060b4d012b52ea9272cf2c9234ad8
Author: Massimo Corà <mcora src gnome org>
Date: Sun Feb 7 15:27:09 2010 +0100
symbol-db: always return a pixbuf, even if type and access are null.
plugins/symbol-db/symbol-db-engine-utils.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-utils.c b/plugins/symbol-db/symbol-db-engine-utils.c
index 30a4665..37466cf 100644
--- a/plugins/symbol-db/symbol-db-engine-utils.c
+++ b/plugins/symbol-db/symbol-db-engine-utils.c
@@ -247,27 +247,29 @@ symbol_db_util_get_pixbuf (const gchar *node_type, const gchar *node_access)
GdkPixbuf *pix;
if (!pixbufs_hash)
{
+ /* lazy loading */
sdb_util_load_symbol_pixbufs ();
}
- DEBUG_PRINT ("symbol_db_view_get_pixbuf: node_type %s node_access %s",
- node_type, node_access);
+ /*DEBUG_PRINT ("symbol_db_view_get_pixbuf: node_type %s node_access %s",
+ node_type, node_access);*/
- g_return_val_if_fail (node_type != NULL, NULL);
-
/* is there a better/quicker method to retrieve pixbufs? */
- if (node_access != NULL)
+ if (node_type != NULL && node_access != NULL)
{
search_node = g_strdup_printf ("%s%s", node_access, node_type);
}
- else
+ else if (node_type != NULL)
{
/* we will not free search_node gchar, so casting here is ok. */
search_node = (gchar*)node_type;
}
+ else {
+ search_node = "othersvars";
+ }
pix = GDK_PIXBUF (g_hash_table_lookup (pixbufs_hash, search_node));
- if (node_access)
+ if (node_type != NULL && node_access != NULL)
{
g_free (search_node);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]