From: <amc...@us...> - 2006-09-04 04:11:54
|
Revision: 17153 http://svn.sourceforge.net/gaim/?rev=17153&view=rev Author: amc_grim Date: 2006-09-03 21:11:51 -0700 (Sun, 03 Sep 2006) Log Message: ----------- Let's not even bother creating and assigning variables until we need them and when we're sure we won't crash when already trying to get them. Modified Paths: -------------- trunk/gtk/gtkblist.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-09-04 04:08:07 UTC (rev 17152) +++ trunk/gtk/gtkblist.c 2006-09-04 04:11:51 UTC (rev 17153) @@ -4366,13 +4366,6 @@ int count; gboolean show = FALSE; GaimBlistNode* gnode; - GdkColor bgcolor; - GdkColor textcolor; - - if (gtkblist) { - bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; - textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; - } g_return_if_fail(node != NULL); @@ -4403,12 +4396,17 @@ GtkTreeIter iter; GtkTreePath *path; gboolean expanded; - + GdkColor bgcolor; + GdkColor textcolor; + if(!insert_node(list, gnode, &iter)) return; - path = gtk_tree_model_get_path(gtkblist->treemodel, &iter); - expanded = gtk_tree_view_row_expanded(gtkblist->treeview, path); + bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; + textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; + + path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter); + expanded = gtk_tree_view_row_expanded(GTK_TREE_VIEW(gtkblist->treeview), path); gtk_tree_path_free(path); esc = g_markup_escape_text(group->name, -1); @@ -4518,13 +4516,6 @@ GaimContact *contact; GaimBuddy *buddy; struct _gaim_gtk_blist_node *gtknode; - GdkColor bgcolor; - GdkColor textcolor; - - if (gtkblist) { - bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; - textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; - } if (GAIM_BLIST_NODE_IS_BUDDY(node)) cnode = node->parent; @@ -4555,6 +4546,11 @@ GdkPixbuf *status; char *mark; char *white; + GdkColor bgcolor; + GdkColor textcolor; + + bgcolor = gtkblist->treeview->style->base[GTK_STATE_ACTIVE]; + textcolor = gtkblist->treeview->style->text[GTK_STATE_ACTIVE]; status = gaim_gtk_blist_get_status_icon(cnode, (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons") ? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |