[svn-commits] russell: branch russell/gmenuselect r58943 - /team/russell/gmenuselect/menuse...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Mar 15 16:24:44 MST 2007


Author: russell
Date: Thu Mar 15 18:24:44 2007
New Revision: 58943

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58943
Log:
add some cosmetic things

Modified:
    team/russell/gmenuselect/menuselect/menuselect_gtk.c

Modified: team/russell/gmenuselect/menuselect/menuselect_gtk.c
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/menuselect/menuselect_gtk.c?view=diff&rev=58943&r1=58942&r2=58943
==============================================================================
--- team/russell/gmenuselect/menuselect/menuselect_gtk.c (original)
+++ team/russell/gmenuselect/menuselect/menuselect_gtk.c Thu Mar 15 18:24:44 2007
@@ -264,6 +264,7 @@
 			COLUMN_SELECTED, TRUE,
 			-1);
 		AST_LIST_TRAVERSE(&cat->members, mem, list) {
+			char name_buf[64];
 			char dep_buf[64] = "";
 			char use_buf[64] = "";
 			char cnf_buf[64] = "";
@@ -289,9 +290,15 @@
 					strncat(cnf_buf, ", ", sizeof(cnf_buf) - strlen(cnf_buf) - 1);
 			}
 
+			snprintf(name_buf, sizeof(name_buf), "%s", mem->name);
+			if (mem->depsfailed == HARD_FAILURE)
+				strncat(name_buf, " (Failed Deps.)", sizeof(name_buf) - strlen(name_buf) - 1);
+			if (mem->conflictsfailed == HARD_FAILURE)
+				strncat(name_buf, " (In Conflict)", sizeof(name_buf) - strlen(name_buf) - 1);
+
 			gtk_tree_store_append(store, &iter2, &iter);
 			gtk_tree_store_set(store, &iter2,
-				COLUMN_NAME, mem->name,
+				COLUMN_NAME, name_buf,
 				COLUMN_SELECTED, mem->enabled,
 				COLUMN_DEPS, dep_buf,
 				COLUMN_USES, use_buf,
@@ -301,6 +308,9 @@
 	}
 
 	tree = (GtkTreeView *) gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	gtk_tree_view_set_enable_tree_lines(tree, TRUE);
+	gtk_tree_view_set_grid_lines(tree, GTK_TREE_VIEW_GRID_LINES_BOTH);
+
 	renderer = gtk_cell_renderer_text_new();
 	column = gtk_tree_view_column_new_with_attributes("Name",
 				renderer, "text", COLUMN_NAME, NULL);



More information about the svn-commits mailing list