Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 8857)
+++ wp-includes/script-loader.php	(working copy)
@@ -257,6 +257,13 @@
 			'uid' => $userid,
 			'time' => time()
 		) );
+
+		$scripts->add( 'posts', '/wp-admin/js/posts.js', array('columns'), '20080910' );
+
+		$scripts->add( 'columns', '/wp-admin/js/columns.js', false, '20080910' );
+		$scripts->localize( 'columns', 'columnsL10n', array(
+			'requestFile' => admin_url('admin-ajax.php'),
+		) );
 	}
 }
 
Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revision 8857)
+++ wp-admin/admin-ajax.php	(working copy)
@@ -704,6 +704,17 @@
 	if ( is_array($hidden) )
 		update_usermeta($current_user->ID, 'meta-box-hidden_'.$page, $hidden);
 break;
+case 'hidden-columns' :
+	check_ajax_referer( 'hiddencolumns', 'hiddencolumnsnonce' );
+	$hidden = isset( $_POST['hidden'] )? $_POST['hidden'] : '';
+	$hidden = explode( ',', $_POST['hidden'] );
+	$page = isset( $_POST['page'] )? $_POST['page'] : '';
+	if ( !preg_match( '/^[a-z-]+$/', $page ) ) {
+		die(-1);
+	}
+	$current_user = wp_get_current_user();
+	if ( is_array($hidden) )
+		update_usermeta($current_user->ID, "manage-$page-columns-hidden", $hidden);
 case 'get-permalink':
 	check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
 	$post_id = isset($_POST['post_id'])? intval($_POST['post_id']) : 0;
Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 8857)
+++ wp-admin/includes/template.php	(working copy)
@@ -674,10 +674,18 @@
 	<tr id='post-<?php echo $post->ID; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
 <?php
 	$posts_columns = wp_manage_posts_columns();
-	foreach($posts_columns as $column_name=>$column_display_name) {
+	$hidden = (array) get_user_option( 'manage-post-columns-hidden' );
+	foreach ( $posts_columns as $column_name=>$column_display_name ) {
+		$class = "class=\"$column_name column-$column_name\"";
 
-		switch($column_name) {
+		$style = '';
+		if ( in_array($column_name, $hidden) )
+			$style = ' style="display:none;"';
 
+		$attributes = "$class$style";
+
+		switch ($column_name) {
+
 		case 'cb':
 		?>
 		<th scope="row" class="check-column"><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /><?php } ?></th>
@@ -686,6 +694,7 @@
 
 		case 'modified':
 		case 'date':
+			$attributes = 'class="date column-date"' . $style;
 			if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
 				$t_time = $h_time = __('Unpublished');
 			} else {
@@ -709,15 +718,16 @@
 			}
 
 			if ( 'excerpt' == $mode ) { ?>
-		<td class="date"><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td>
+		<td <?php echo $attributes ?>><?php echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode) ?></td>
 		<?php } else { ?>
-		<td class="date"><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td>
+		<td <?php echo $attributes ?>><abbr title="<?php echo $t_time ?>"><?php echo apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) ?></abbr></td>
 		<?php }
 		break;
 
 		case 'title':
+			$attributes = 'class="post-title column-title"' . $style;
 		?>
-		<td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
+		<td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong>
 		<?php
 			if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); }
 
@@ -742,7 +752,7 @@
 
 		case 'categories':
 		?>
-		<td class="categories"><?php
+		<td <?php echo $attributes ?>><?php
 			$categories = get_the_category();
 			if ( !empty( $categories ) ) {
 				$out = array();
@@ -758,7 +768,7 @@
 
 		case 'tags':
 		?>
-		<td class="tags"><?php
+		<td <?php echo $attributes ?>><?php
 			$tags = get_the_tags();
 			if ( !empty( $tags ) ) {
 				$out = array();
@@ -773,8 +783,9 @@
 		break;
 
 		case 'comments':
+			$attributes = 'class="comments column-comments num"' . $style;
 		?>
-		<td class="comments num"><div class="post-com-count-wrapper">
+		<td <?php echo $attributes ?>><div class="post-com-count-wrapper">
 		<?php
 			$pending_phrase = sprintf( __('%s pending'), number_format( $pending_comments ) );
 			if ( $pending_comments )
@@ -789,13 +800,13 @@
 
 		case 'author':
 		?>
-		<td class="author"><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>
+		<td <?php echo $attributes ?>><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>
 		<?php
 		break;
 
 		case 'status':
 		?>
-		<td class="status">
+		<td <?php echo $attributes ?>>
 		<a href="<?php the_permalink(); ?>" title="<?php echo attribute_escape(sprintf(__('View "%s"'), $title)); ?>" rel="permalink">
 		<?php
 			switch ( $post->post_status ) {
@@ -1917,4 +1928,28 @@
 	}	
 }
 
+function manage_columns_prefs($page) {
+	if ( 'post' == $page )
+		$columns = wp_manage_posts_columns();
+	elseif ( 'page' == $page )
+		$columns = wp_manage_pages_columns();
+	elseif ( 'media' == $page )
+		$columns = wp_manage_media_columns();
+	else return;
+
+	$hidden = (array) get_user_option( "manage-$page-columns-hidden" );
+
+	foreach ( $columns as $column => $title ) {
+		// Can't hide these
+		if ( 'cb' == $column || 'title' == $column )
+			continue;
+		if ( 'comments' == $column )
+			$title = __('Comments');
+		$id = "$column-hide";
+		echo '<label for="' . $id . '">';
+		echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . (! in_array($column, $hidden) ? ' checked="checked"' : '') . ' />';
+		echo "$title</label>\n";
+	}
+}
+
 ?>
Index: wp-admin/js/posts.js
===================================================================
--- wp-admin/js/posts.js	(revision 0)
+++ wp-admin/js/posts.js	(revision 0)
@@ -0,0 +1,24 @@
+jQuery(document).ready( function($) {
+	columns.init('post');
+
+	// Edit Settings
+	$('#show-settings-link').click(function () {
+		$('#edit-settings').slideDown('normal', function(){
+			$('#show-settings-link').hide();
+			$('#hide-settings-link').show();
+			
+		});
+		$('#show-settings').addClass('show-settings-opened');
+		return false;
+	});
+	
+	$('#hide-settings-link').click(function () {
+		$('#edit-settings').slideUp('normal', function(){
+			$('#hide-settings-link').hide();
+			$('#show-settings-link').show();
+			$('#show-settings').removeClass('show-settings-opened');
+		});
+		
+		return false;
+	});
+});
\ No newline at end of file

Property changes on: wp-admin/js/posts.js
___________________________________________________________________
Name: svn:eol-stye
   + native

Index: wp-admin/js/columns.js
===================================================================
--- wp-admin/js/columns.js	(revision 0)
+++ wp-admin/js/columns.js	(revision 0)
@@ -0,0 +1,33 @@
+(function($) {
+	columns = {
+		init : function(page) {
+			$('.hide-column-tog').click( function() {
+				var column = jQuery(this).val();
+				var show = jQuery(this).attr('checked');
+				if ( show ) {
+					jQuery('.column-' + column).show();
+				} else {
+					jQuery('.column-' + column).hide();
+				}
+				save_manage_columns_state(page);
+			} );
+
+			if ( $.browser.msie ) {
+				$('#side-sortables').append( '<div id="make-it-tall"></div>' );
+			} else {
+				$('#side-sortables').append( '<div id="make-it-tall" style="margin-bottom: -2000px; padding-bottom: 2001px"></div>' );
+			}
+			$('#wpbody-content').css( 'overflow', 'hidden' );
+		}
+	}
+}(jQuery));
+
+function save_manage_columns_state(page) {
+	var hidden = jQuery('.manage-column').filter(':hidden').map(function() { return this.id; }).get().join(',');
+	jQuery.post(columnsL10n.requestFile, {
+		action: 'hidden-columns',
+		hidden: hidden,
+		hiddencolumnsnonce: jQuery('#hiddencolumnsnonce').val(),
+		page: page
+	});
+}
\ No newline at end of file

Property changes on: wp-admin/js/columns.js
___________________________________________________________________
Name: svn:eol-stye
   + native

Index: wp-admin/edit-post-rows.php
===================================================================
--- wp-admin/edit-post-rows.php	(revision 8857)
+++ wp-admin/edit-post-rows.php	(working copy)
@@ -12,16 +12,24 @@
 	<thead>
 	<tr>
 
-<?php $posts_columns = wp_manage_posts_columns(); ?>
-<?php foreach($posts_columns as $post_column_key => $column_display_name) {
+<?php
+$posts_columns = wp_manage_posts_columns(); 
+$hidden = (array) get_user_option( 'manage-post-columns-hidden' );
+foreach ( $posts_columns as $post_column_key => $column_display_name ) {
 	if ( 'cb' === $post_column_key )
 		$class = ' class="check-column"';
 	elseif ( 'comments' === $post_column_key )
-		$class = ' class="num"';
+		$class = ' class="manage-column column-comments num"';
+	elseif ( 'modified' === $post_column_key )
+		$class = ' class="manage-column column-date"';
 	else
-		$class = '';
+		$class = " class=\"manage-column column-$post_column_key\"";
+
+	$style = '';
+	if ( in_array($post_column_key, $hidden) )
+		$style = ' style="display:none;"';
 ?>
-	<th scope="col"<?php echo $class; ?>><?php echo $column_display_name; ?></th>
+	<th scope="col"<?php echo "id=\"$post_column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>
 <?php } ?>
 
 	</tr>
Index: wp-admin/edit.php
===================================================================
--- wp-admin/edit.php	(revision 8857)
+++ wp-admin/edit.php	(working copy)
@@ -51,8 +51,8 @@
 $parent_file = 'edit.php';
 wp_enqueue_script('admin-forms');
 wp_enqueue_script('inline-edit');
+wp_enqueue_script('posts');
 
-
 list($post_stati, $avail_post_stati) = wp_edit_posts_query();
 
 if ( 1 == count($posts) && is_singular() ) {
@@ -74,6 +74,19 @@
 <div class="wrap">
 
 <form id="posts-filter" action="" method="get">
+
+<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Show Settings') ?></a>
+<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Settings') ?></a></div>
+
+<div id="edit-settings" class="hide-if-js hide-if-no-js">
+<div id="edit-settings-wrap">
+<h5><?php _e('Show on screen') ?></h5>
+<div class="metabox-prefs">
+<?php manage_columns_prefs('post') ?>
+<br class="clear" />
+</div></div>
+</div>
+
 <h2><?php
 if ( is_single() ) {
 	printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title));
@@ -226,6 +239,8 @@
 
 <?php include( 'edit-post-rows.php' ); ?>
 
+<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
+
 </form>
 
 <div id="ajax-response"></div>
