Index: /sandbox/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1920)
+++ /sandbox/filemanager/setup/phpgw_pt-br.lang	(revision 1922)
@@ -150,5 +150,7 @@
 Preferences	filemanager	pt-br	Preferências
 Search	filemanager	pt-br	Pesquisar
-Edit columns	filemanger	pt-br	Editar colunas
+View	filemanger	pt-br	Vizualização
+View as list	filemanager	pt-br	Ver como lista
+View as icons	filemanager	pt-br	Ver como ícones
 Type	filemanager	pt-br	Tipo
 Cancel	filemanager	pt-br	Cancelar
Index: /sandbox/filemanager/inc/class.user.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.user.inc.php	(revision 1893)
+++ /sandbox/filemanager/inc/class.user.inc.php	(revision 1922)
@@ -119,4 +119,6 @@
 		}
 		function save_preferences(){
+			unset($_SESSION['phpgw_info']['user']['preferences']['filemanager']);
+			$_SESSION['phpgw_info']['user']['preferences']['filemanager'] = unserialize($this->preferences);
 			/* See if preferences exists or not */
 			$query = "SELECT count(preference_owner) FROM phpgw_preferences WHERE preference_app = 'filemanager' AND preference_owner = ".$this->user_id." LIMIT 1";
Index: /sandbox/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1908)
+++ /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1922)
@@ -541,5 +541,18 @@
 				/* small keys to safe bandwidth */
 				$tuple['name'] = $files['name'];
-				$tuple['icon'] = $this->mime_icon($files['mime_type']);
+				if ($_SESSION['phpgw_info']['user']['preferences']['filemanager']['viewIcons'] == 1){
+					if ($files['mime_type'] == 'image/png' || 
+						$files['mime_type'] == 'image/gif' || 
+						$files['mime_type'] == 'image/jpg')
+					{
+						$filename = str_replace('=','',base64_encode($tuple['name']));
+						$pathname = str_replace('=','',base64_encode($this->path));
+						$tuple['icon'] = './index.php?menuaction=filemanager.vfs_functions.summary&file='.$filename.'&path='.$pathname;
+					}
+					else
+						$tuple['icon'] =  $this->mime_icon($files['mime_type'],64);
+				}
+				else
+					$tuple['icon'] = $this->mime_icon($files['mime_type']);
 				$tuple['type'] = $files['type'];
 				$tuple['creatd'] = $this->vfs_functions->dateString2timeStamp($files['created']);
Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1921)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1922)
@@ -317,51 +317,67 @@
 	fl.init();
 	fl.clear();
-	var newpage;
-	var sp_hd = '<span name="head" style="cursor: pointer; cursor: hand;" onclick="reloadFiles(\'';
-	var sp_tl = '</span></td>';
-	newpage = '<table cellspacing="0" cellpadding="2" width="100%"><tbody><tr class="message_header">';
-	newpage += fl.td+'<input onclick="selectAll(this)" type="checkbox"></td><td></td><td></td>';
-	newpage += fl.td+sp_hd+'name\')" id="name">'+get_lang('file name')+sp_tl;
-    	if (preferences.mime_type =='1')
-		newpage += fl.td+sp_hd+'mime\')" id="mime">'+get_lang('mime type')+sp_tl;
-	if (preferences.size =='1')
-		newpage += fl.td+sp_hd+'size\')" id="size">'+get_lang('size')+'</a>'+sp_tl;
-	if (preferences.created =='1')
-		newpage += fl.td+sp_hd+'creatd\')" id="creatd">'+get_lang('created')+'</a>'+sp_tl;
-	if (preferences.modified =='1')
-		newpage += fl.td+sp_hd+'modifd\')" id="modifd">'+get_lang('modified')+'</a>'+sp_tl;
-	if (preferences.owner =='1')
-		newpage += fl.td+sp_hd+'owner\')" id="owner">'+get_lang('owner')+'</a>'+sp_tl;
-	if (preferences.createdby_id =='1')
-		newpage += fl.td+sp_hd+'creatdby\')" id="creatdby">'+get_lang('created by')+'</a>'+sp_tl;
-	if (preferences.modifiedby_id =='1')
-		newpage += fl.td+sp_hd+'modifdby\')" id="modifdby">'+get_lang('modified by')+'</a>'+sp_tl;
-	if (preferences.comment =='1')
-		newpage += fl.td+sp_hd+'comm\')" id="comm">'+get_lang('comment')+'</a>'+sp_tl;
-	if (preferences.version =='1') newpage += fl.td+sp_hd+'vers\')" id="vers">'+get_lang('version')+'</a>'+sp_tl+'</tr>';
-	if (files != null)
-	for (var i=0; i < files.length; i++)
+	var newpage = '';
+	if (preferences.viewIcons == 1){
+		for (var i=0; i < files.length; i++)
+		{
+			newicon = '<div class="icon">';
+			newicon += '<a href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">';
+			newicon += '<img src="'+(files[i].icon)+'">';
+			newicon += '<span class="iconCaption">'+files[i].name+'</span>';
+			newicon += '</a></div>';
+			newpage += newicon;
+		}
+
+		fl.element.innerHTML = newpage;
+	}
+	else
 	{
-		newpage += '<tr>';
-		newpage += fl.createLine(files[i]);
-		newpage += '</tr>';
-	}
-	else
-		newpage = "<b>"+get_lang('no files in this directory.')+"</b>";
-	fl.element.innerHTML = newpage;
-	header = document.getElementsByName('head');
-	for (var i=0; i < header.length; i++)
-	{
-		if (header[i].id == criteria){
-			header[i].style.fontWeight = 'bold';
-			arrow = document.createElement('IMG');
-			if (order_type == '1')
-				arrow.src = templatePath+'images/arrow_ascendant.gif';
-			else
-				arrow.src = templatePath+'images/arrow_descendant.gif';
-			header[i].appendChild(arrow);
-		}
-	}
-	fl.drawStripes();
+		var sp_hd = '<span name="head" style="cursor: pointer; cursor: hand;" onclick="reloadFiles(\'';
+		var sp_tl = '</span></td>';
+		newpage = '<table cellspacing="0" cellpadding="2" width="100%"><tbody><tr class="message_header">';
+		newpage += fl.td+'<input onclick="selectAll(this)" type="checkbox"></td><td></td><td></td>';
+		newpage += fl.td+sp_hd+'name\')" id="name">'+get_lang('file name')+sp_tl;
+		if (preferences.mime_type =='1')
+			newpage += fl.td+sp_hd+'mime\')" id="mime">'+get_lang('mime type')+sp_tl;
+		if (preferences.size =='1')
+			newpage += fl.td+sp_hd+'size\')" id="size">'+get_lang('size')+'</a>'+sp_tl;
+		if (preferences.created =='1')
+			newpage += fl.td+sp_hd+'creatd\')" id="creatd">'+get_lang('created')+'</a>'+sp_tl;
+		if (preferences.modified =='1')
+			newpage += fl.td+sp_hd+'modifd\')" id="modifd">'+get_lang('modified')+'</a>'+sp_tl;
+		if (preferences.owner =='1')
+			newpage += fl.td+sp_hd+'owner\')" id="owner">'+get_lang('owner')+'</a>'+sp_tl;
+		if (preferences.createdby_id =='1')
+			newpage += fl.td+sp_hd+'creatdby\')" id="creatdby">'+get_lang('created by')+'</a>'+sp_tl;
+		if (preferences.modifiedby_id =='1')
+			newpage += fl.td+sp_hd+'modifdby\')" id="modifdby">'+get_lang('modified by')+'</a>'+sp_tl;
+		if (preferences.comment =='1')
+			newpage += fl.td+sp_hd+'comm\')" id="comm">'+get_lang('comment')+'</a>'+sp_tl;
+		if (preferences.version =='1') newpage += fl.td+sp_hd+'vers\')" id="vers">'+get_lang('version')+'</a>'+sp_tl+'</tr>';
+		if (files != null)
+			for (var i=0; i < files.length; i++)
+			{
+				newpage += '<tr>';
+				newpage += fl.createLine(files[i]);
+				newpage += '</tr>';
+			}
+		else
+			newpage = "<b>"+get_lang('no files in this directory.')+"</b>";
+		fl.element.innerHTML = newpage;
+		header = document.getElementsByName('head');
+		for (var i=0; i < header.length; i++)
+		{
+			if (header[i].id == criteria){
+				header[i].style.fontWeight = 'bold';
+				arrow = document.createElement('IMG');
+				if (order_type == '1')
+					arrow.src = templatePath+'images/arrow_ascendant.gif';
+				else
+					arrow.src = templatePath+'images/arrow_descendant.gif';
+				header[i].appendChild(arrow);
+			}
+		}
+		fl.drawStripes();
+	}
 	folderList.updateQuota(returnData.quota.quotaSize,returnData.quota.usedSpace);
 }
@@ -568,5 +584,5 @@
 			elements[3]['img'] = templatePath+'images/mime16_directory.png';
 			elements[4] = new Array();
-			elements[4]['text'] = get_lang('Edit Columns');
+			elements[4]['text'] = get_lang('View');
 			elements[4]['url'] = "javascript:EditColumns()";
 			elements[4]['img'] = templatePath+'images/editpaste.png';
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1889)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1922)
@@ -204,7 +204,10 @@
 		return;
 	}
+	var checkList = (preferences['viewList'] == '1' ? 'checked="checked"': '');
+	var checkIcons = (preferences['viewIcons'] == '1' ? 'checked="checked"': '');
+	var typeHTML = '<input name="prefView" value="viewList" '+checkList+' type="radio">'+get_lang('view as list')+'<input name="prefView" '+checkIcons+' value="viewIcons" type="radio">'+get_lang('view as icons')+'<br>';
 	var check = function(type) { if (preferences[type] =='1') return 'checked'; else return '';};
 	var inputHTML = '<input name="prefView" type="checkbox" value="';
-	form = inputHTML+'mime_type" '+check('mime_type')+'>'+get_lang('type')+'<br>'+
+	form = typeHTML+inputHTML+'mime_type" '+check('mime_type')+'>'+get_lang('type')+'<br>'+
 		inputHTML+'size" '+check('size')+'>'+get_lang('size')+'<br>'+
 		inputHTML+'created" '+check('created')+'>'+get_lang('created')+'<br>'+
Index: /sandbox/filemanager/templates/default/main.css
===================================================================
--- /sandbox/filemanager/templates/default/main.css	(revision 1829)
+++ /sandbox/filemanager/templates/default/main.css	(revision 1922)
@@ -21,4 +21,20 @@
     line-height:150%;
     margin: -10px 0  -10px 0;
+
+}
+.icon {
+	float:left;
+	padding-right: 25px;
+	padding-top: 40px;
+	width: 140px;
+	display:table-cell;
+}
+.iconCaption{
+	display:table-caption;
+	font-family:sans-serif;
+	font-size:10px;
+	overflow:hidden;
+	position:fixed;
+	width:140px;
 
 }
