From 68bd9e5dc84f6f587942879e8dc287ab37f9a5e8 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Thu, 17 Dec 2009 23:23:36 +0000
Subject: [PATCH] add remove block for bluegene systems and removed alter grid
 for bluegene systems

---
 src/sview/block_info.c | 7 +++++++
 src/sview/sview.c      | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/sview/block_info.c b/src/sview/block_info.c
index 4213178f8b0..fe3506d6cad 100644
--- a/src/sview/block_info.c
+++ b/src/sview/block_info.c
@@ -147,6 +147,8 @@ static display_data_t options_data_block[] = {
 	 TRUE, ADMIN_PAGE},
 	{G_TYPE_STRING, BLOCK_PAGE, "Put block in free state",
 	 TRUE, ADMIN_PAGE},
+	{G_TYPE_STRING, BLOCK_PAGE, "Remove block",
+	 TRUE, ADMIN_PAGE},
 	{G_TYPE_STRING, JOB_PAGE, "Jobs", TRUE, BLOCK_PAGE},
 	{G_TYPE_STRING, PART_PAGE, "Partitions", TRUE, BLOCK_PAGE},
 	{G_TYPE_STRING, NODE_PAGE, "Base Partitions", TRUE, BLOCK_PAGE},
@@ -766,6 +768,11 @@ extern int update_state_block(GtkDialog *dialog,
 			 "in an error state?",
 			 blockid);
 		block_msg.state = RM_PARTITION_ERROR;
+	} else if(!strcasecmp("Remove block", type)) {
+		snprintf(tmp_char, sizeof(tmp_char),
+			 "Are you sure you want to remove block %s?",
+			 blockid);
+		block_msg.state = RM_PARTITION_NAV;
 	} else {
 		snprintf(tmp_char, sizeof(tmp_char),
 			 "Are you sure you want to put block %s "
diff --git a/src/sview/sview.c b/src/sview/sview.c
index fa34af103a8..3c3d3fede07 100644
--- a/src/sview/sview.c
+++ b/src/sview/sview.c
@@ -410,7 +410,9 @@ static GtkWidget *_get_menubar_menu(GtkWidget *window, GtkWidget *notebook)
 		"    </menu>"
 		"    <menu action='options'>"
 		"      <menuitem action='grid'/>"
+#ifndef HAVE_BG
 		"      <menuitem action='grid_specs'/>"
+#endif
 		"      <menuitem action='interval'/>"
 		"      <separator/>"
 		"      <menuitem action='admin'/>"
@@ -502,7 +504,7 @@ static GtkWidget *_get_menubar_menu(GtkWidget *window, GtkWidget *notebook)
 		{"manual", GTK_STOCK_HELP, "_Manual", "<control>m"},
 		{"grid_specs", GTK_STOCK_EDIT, "Set Grid _Properties",
 		 "<control>p", "Change Grid Properties",
-		 G_CALLBACK(change_grid_popup)}
+		 G_CALLBACK(change_grid_popup)},
 	};
 
 	GtkActionEntry admin_entries[] = {
-- 
GitLab