[gnome-commander/treeview: 19/19] noop: code cleanup



commit e02c09aa392377c61023a7fbee5d86feb1492e4d
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Aug 15 13:56:52 2010 +0200

    noop: code cleanup

 src/gnome-cmd-foldview-control.cc   |   51 ++++++-------
 src/gnome-cmd-foldview-gvfs.cc      |   43 ++++++------
 src/gnome-cmd-foldview-gvfs.h       |   38 +++++-----
 src/gnome-cmd-foldview-model.cc     |   54 +++++++-------
 src/gnome-cmd-foldview-private.h    |   84 +++++++++++-----------
 src/gnome-cmd-foldview-treestore.cc |  135 +++++++++++++++++------------------
 src/gnome-cmd-foldview-treestore.h  |   42 +++++------
 src/gnome-cmd-foldview-view.cc      |   63 +++++++---------
 src/gnome-cmd-foldview.cc           |   16 ++---
 9 files changed, 252 insertions(+), 274 deletions(-)
---
diff --git a/src/gnome-cmd-foldview-control.cc b/src/gnome-cmd-foldview-control.cc
index 5b4c355..17e50d7 100644
--- a/src/gnome-cmd-foldview-control.cc
+++ b/src/gnome-cmd-foldview-control.cc
@@ -123,7 +123,7 @@
 //  ***************************************************************************
 GcmdGtkFoldview::View::ctx_menu GcmdGtkFoldview:: s_context_menu =
 {
-	NULL, (gint)2,	
+	NULL, (gint)2,
 	{
 		{
 			_("Directory"), (gint)3,
@@ -182,7 +182,7 @@ void GcmdGtkFoldview::control_init_instance()
 
 
 gboolean GcmdGtkFoldview::control_create()
-{   
+{
 	//g_signal_connect (this, "destroy", G_CALLBACK (__TEST__), NULL);
 
 	return TRUE;
@@ -283,9 +283,9 @@ void GcmdGtkFoldview::control_context_menu_populate_add_section(
 		{
 			// connect with new ctx data
 			e->a_handle = g_signal_connect(
-				e->a_widget, 
-				"activate", 
-				e->a_desc.a_callback, 
+				e->a_widget,
+				"activate",
+				e->a_desc.a_callback,
 				(gpointer)ctxdata);
 		}
 
@@ -295,7 +295,7 @@ void GcmdGtkFoldview::control_context_menu_populate_add_section(
 }
 
 void GcmdGtkFoldview::Control_set_active_tab(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_set_active_tab(ctxdata->d_path_selected);
@@ -327,7 +327,7 @@ void GcmdGtkFoldview::control_set_active_tab(GtkTreePath *path)
 }
 
 void GcmdGtkFoldview::Control_open_new_tab(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_open_new_tab(ctxdata->d_path_selected);
@@ -360,7 +360,7 @@ void GcmdGtkFoldview::control_open_new_tab(GtkTreePath *path)
 }
 
 void GcmdGtkFoldview::Control_set_new_root(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_set_new_root(ctxdata);
@@ -415,7 +415,7 @@ GcmdGtkFoldview::eSyncState GcmdGtkFoldview::control_sync_check()
 }
 
 void GcmdGtkFoldview::Control_sync_update(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_sync_update(ctxdata);
@@ -427,7 +427,7 @@ void GcmdGtkFoldview::control_sync_update(GcmdGtkFoldview::View::ctx_menu_data *
 	GtkTreeIter		iter			= Model::Iter_zero;
 	//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 	//gwr_inf("control_sync_update");
-	
+
 	if ( control_sync_check() != SYNC_Y_LIST_Y )
 	{
 		//gwr_wng("control_sync_update:not SYNC_Y_LIST_Y:%03i", control_sync_check());
@@ -440,12 +440,12 @@ void GcmdGtkFoldview::control_sync_update(GcmdGtkFoldview::View::ctx_menu_data *
 	uri = model.iter_get_uri_new(&iter);
 	if ( uri == NULL )
 		return;
-	
+
 	control_gcmd_file_list_set_connection(a_synced_list, uri);
 }
 
 void GcmdGtkFoldview::Control_unsync_treeview(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_unsync_treeview();
@@ -481,7 +481,7 @@ void GcmdGtkFoldview::control_unsync_treeview()
 }
 
 void GcmdGtkFoldview::Control_sync_treeview(
-	GtkMenuItem				*menu_item, 
+	GtkMenuItem				*menu_item,
 	View::ctx_menu_data		*ctxdata)
 {
 	ctxdata->a_foldview->control_sync_treeview(ctxdata);
@@ -592,7 +592,7 @@ void GcmdGtkFoldview::control_iter_expand_callback_1(gvfs_async *ga)
 	gboolean							b					= FALSE;
 	//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 	gdk_threads_enter();														// _GDK_LOCK_
-	
+
 	foldview		= GcmdFoldview();
 
 	ls				= (gvfs_async_load_subdirs*)(ga->ad());
@@ -616,7 +616,7 @@ void GcmdGtkFoldview::control_iter_expand_callback_1(gvfs_async *ga)
 	for ( i = 0 ; i != count ; i++ )
 	{
 		file = ls->element(i);
-		CIE_INF("ciec_1:%s", file->name());		
+		CIE_INF("ciec_1:%s", file->name());
 
 		// determine icon number for the file element
 		GcmdGtkFoldview::View::eIcon	icon	= GcmdGtkFoldview::View::eIconUnknown;
@@ -650,7 +650,7 @@ void GcmdGtkFoldview::control_iter_expand_callback_1(gvfs_async *ga)
 		// NOTHING here ! Because the sort function mix all - iter or path !!!
 		//child_uri = foldview->model.iter_get_uri_new(child_iter);
 		//foldview->control_check_if_empty(child_iter);
-		//gnome_vfs_uri_unref(child_uri);	
+		//gnome_vfs_uri_unref(child_uri);
 	}
 
 	//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -722,7 +722,7 @@ GcmdGtkFoldview::control_iter_expand(
 	// new uri that will be destroyed at the end of GVFS callback
 	parent_uri = model.iter_get_uri_new(parent);
 
-	// string representing the GtkTreePath of the parent ; we dont use 
+	// string representing the GtkTreePath of the parent ; we dont use
 	// a GtkTreePath directly,since it is a GtkObject and maybe invalided
 	// when GVFS callback code will run. Neither use we any GtkTreeIter.
 #ifdef __GTS__
@@ -774,7 +774,7 @@ void GcmdGtkFoldview::control_check_if_empty_callback_1(gvfs_async *ga)
 	GtkTreeIter							parent_iter	= GcmdGtkFoldview::Model::Iter_zero;
 	//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 	gdk_threads_enter();														// _GDK_LOCK_
-	
+
 	foldview		= GcmdFoldview();
 
 	ls				= (gvfs_async_load_subdirs*)(ga->ad());
@@ -817,7 +817,7 @@ void GcmdGtkFoldview::control_check_if_empty_callback_1(gvfs_async *ga)
 	// delete user data
 	delete ga->cd();
 
-	gdk_threads_leave();	
+	gdk_threads_leave();
 
 }
 //  MULTITHREAD
@@ -851,7 +851,7 @@ void GcmdGtkFoldview::control_check_if_empty(GtkTreeIter *parent)
 	// new uri that will be destroyed at the end of GVFS callback
 	parent_uri = model.iter_get_uri_new(parent);
 
-	// string representing the GtkTreePath of the parent ; we dont use 
+	// string representing the GtkTreePath of the parent ; we dont use
 	// a GtkTreePath directly,since it is a GtkObject and maybe invalided
 	// when GVFS callback code will run. Neither use we any GtkTreeIter.
 #ifdef __GTS__
@@ -949,13 +949,13 @@ void GcmdGtkFoldview::control_gcmd_file_list_set_connection(
 		// Avoid gcmd to call gtk_object_destroy on access-denied directories   // __GWR_TODO__
 		// and lost+found in GnomeCmdFileList::on_dir_list_failed(...)
 		//
-		// The problem is that gcmd cant handle correctly such directories 
+		// The problem is that gcmd cant handle correctly such directories
 		// when calling GnomeCmdFileList::set_connection,set_directory,
 		// goto_directory, ...I think you get the same result if you bookmark
 		// (manually) such a directory
 		//
-		// Since gcmd increase GnomeCmdFile->ref_cnt until infinite (!), 
-		// I feel allowed to call gnome_cmd_dir_ref rather than 
+		// Since gcmd increase GnomeCmdFile->ref_cnt until infinite (!),
+		// I feel allowed to call gnome_cmd_dir_ref rather than
 		// g_object_ref_sink :)
 		//g_object_ref_sink(gnomecmddir);
 		gnome_cmd_dir_ref(gnomecmddir);
@@ -997,7 +997,7 @@ void GcmdGtkFoldview::control_connection_combo_update()
 		// dont add connection if
 		// it is closed AND it is not a device AND it is not smb
 		if  (
-				!gnome_cmd_con_is_open (con)		&& 
+				!gnome_cmd_con_is_open (con)		&&
 				!GNOME_CMD_IS_CON_DEVICE (con)		&&
 				!GNOME_CMD_IS_CON_SMB (con)
 			)  continue;
@@ -1015,6 +1015,3 @@ void GcmdGtkFoldview::control_connection_combo_update()
 	else
 		combo->select_data(model.connection());
 }
-
-
-
diff --git a/src/gnome-cmd-foldview-gvfs.cc b/src/gnome-cmd-foldview-gvfs.cc
index 4c51e91..1b2cfdf 100644
--- a/src/gnome-cmd-foldview-gvfs.cc
+++ b/src/gnome-cmd-foldview-gvfs.cc
@@ -120,7 +120,7 @@ void gwr_gvfs_err(const char* fmt, ...)
 //  ###########################################################################
 
 //
-//  Hope it is standard C++ 
+//  Hope it is standard C++
 //
 //  new in code -> operator new -> constructor
 //  delete in code -> destructor -> operator delete
@@ -138,7 +138,7 @@ gvfs_file::gvfs_file(gchar *name, GnomeVFSResult result, GnomeVFSFilePermissions
 gvfs_file::~gvfs_file()
 {
 	//printf("==>~gvfs_fil()\n");
-	g_free (d_name);					
+	g_free (d_name);
 }
 
 
@@ -326,7 +326,7 @@ static  guint32					GVFS_qstack_size	= 0;
 
 static  GnomeVFSAsyncHandle**	GVFS_qstack_el		= NULL;
 static  guint32*				GVFS_qstack_ix		= NULL;
-static  guint32					GVFS_qstack_ff		= 0; 
+static  guint32					GVFS_qstack_ff		= 0;
 
 gboolean GVFS_qstack_initialized()
 {
@@ -546,8 +546,8 @@ void* gvfs_async_load_subdirs::operator new(size_t size, GnomeVFSURI* parent_uri
 	//guint			element_size,
 	//guint			reserved_size);		growness
 	ls->array() = g_array_sized_new(
-		FALSE, 
-		TRUE, 
+		FALSE,
+		TRUE,
 		sizeof(gvfs_file*),
 		10);
 	ls->len()   = 0;
@@ -585,7 +585,7 @@ void gvfs_async_load_subdirs ::operator delete (void *p)
 //.............................................................................
 // Add entries...goto is the best
 //.............................................................................
-static void 
+static void
 GVFS_async_load_subdirectories_callback(
 	GnomeVFSAsyncHandle		*handle,
 	GnomeVFSResult			result,
@@ -613,7 +613,7 @@ GVFS_async_load_subdirectories_callback(
 	ALSC_INF("alsc:[%03i] entries:%03i list:%16x parent:[%s]%s", ga->hi(), entries_read, list, ls->ppath(), ls->puri()->text);
 
 	// counter
-	count   = 0;						
+	count   = 0;
 
 	// handle the '0-entry-case'
 	if ( entries_read == 0 )
@@ -623,7 +623,7 @@ GVFS_async_load_subdirectories_callback(
 
 	// init loop - we have at least one entry
 	l = g_list_first(list);
-	
+
 lab_loop:
 
 	count++;
@@ -647,14 +647,14 @@ lab_loop:
 			ALSC_WNG("alsc:[%03i][0x%16x] [%03i][%03i][%03i] [broken link, ignored]<%s>", ga->hi(), l, count, added, ga->mr(), info->name);
 			break;
 		}
-	
+
 		added++;
-		
+
 		ALSC_INF("alsc:[%03i][0x%16x] [%03i][%03i][%03i] S<%s>", ga->hi(), l, count, added, ga->mr(), info->name);
 
 		lnk = new() gvfs_symlink(g_strdup(info->name), info->permissions, info->flags );
 		ls->append( (gvfs_file*)lnk );
-		
+
 		// if the caller want partial listing
 		if  (
 				( ga->mr()  >= 0		)  &&
@@ -666,7 +666,7 @@ lab_loop:
 
 		//.....................................................................
 		case GNOME_VFS_FILE_TYPE_DIRECTORY :
-			
+
 		if  ( GVFS_vfsinfo_is_true_directory(info) )
 		{
 			added++;
@@ -677,7 +677,7 @@ lab_loop:
 			dir = new() gvfs_dir(g_strdup(info->name), info->permissions, info->flags);
 
 			ls->append( (gvfs_file*)dir );
-			
+
 			// if the caller want partial listing
 			if  (
 					( ga->mr()  >= 0		)  &&
@@ -691,16 +691,16 @@ lab_loop:
 		default:
 		ALSC_INF("alsc:[%03i][0x%16x] [%03i][%03i][%03i]  <%s>", ga->hi(), l, count, added, ga->mr(), info->name);
 	}
-	
+
 	// if gvfs bugs on entries_read, we bug too with this
-	if ( count == entries_read )		
+	if ( count == entries_read )
 		goto lab_no_more_entry;
 
 	l = g_list_next(l);
 
 	goto lab_loop;
 
-//.............................................................................	
+//.............................................................................
 lab_no_more_entry:
 
 	// if OK, simply return, we will be re-called for further entries
@@ -717,10 +717,10 @@ lab_no_more_entry:
 	// else an error as occured : result is not OK, neither EOF.
 	// this occurs for example with symlinks, or access-denied directories ;
 	// show a little warning, and do as EOF, since there is no more entry.
-	ALSC_INF("alsc:[%03i][0x%16x]  (NO ENTRY - Jumping to EOF):%s", 
+	ALSC_INF("alsc:[%03i][0x%16x]  (NO ENTRY - Jumping to EOF):%s",
 		ga->hi(), l, gnome_vfs_result_to_string(result));
-	
-//.............................................................................	
+
+//.............................................................................
 lab_eof:
 
 	ALSC_INF("alsc:[%03i][0x%16x] (EOF)", ga->hi(), l);
@@ -739,7 +739,7 @@ lab_eof:
 	// "Final end"
 	return;
 
-//.............................................................................	
+//.............................................................................
 lab_abort:
 
 	ALSC_INF("alsc:[%03i][0x%16x] (ABORT)", ga->hi(), l);
@@ -802,8 +802,7 @@ void GVFS_async_load_subdirectories(
 			),
 		GVFS_ITEMS_PER_NOTIFICATION,
 		//GNOME_VFS_PRIORITY_DEFAULT,
-		GNOME_VFS_PRIORITY_MIN,  
+		GNOME_VFS_PRIORITY_MIN,
 		GVFS_async_load_subdirectories_callback,
 		(gpointer)ga);
 }
-
diff --git a/src/gnome-cmd-foldview-gvfs.h b/src/gnome-cmd-foldview-gvfs.h
index 437e707..66f483f 100644
--- a/src/gnome-cmd-foldview-gvfs.h
+++ b/src/gnome-cmd-foldview-gvfs.h
@@ -61,7 +61,7 @@ void gwr_gvfs_err(const char* fmt, ...);
 						|						+-------------- gvfs_async_user_callback
 						|						|
 						|						+-------------- user_data
-						|						
+						|
 						+-------------------------------------- gvfs_async_load_subdirs
 
 */
@@ -81,7 +81,7 @@ struct gvfs_file
 	public:
 	gchar*&							name()			{ return d_name;	}
 	GcmdGtkFoldview::eFileAccess&	access()		{ return a_access;  }
-	
+
 	gboolean						flagged_symlink()   { return  ( (a_vfsflags & GNOME_VFS_FILE_FLAGS_SYMLINK) != 0	);	}
 	gboolean						is_symlink()		{ return ( a_vfstype == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK		);  }
 	gboolean						is_dir()			{ return ( a_vfstype == GNOME_VFS_FILE_TYPE_DIRECTORY			);  }
@@ -104,11 +104,11 @@ struct gvfs_symlink : gvfs_file
 	private:
 	GArray		*d_array;
 	guint		a_array_card;
-	
+
 	public:
 	void		append(gvfs_symlink* link)
 				{
-					
+
 				}
 	private:
 	gvfs_file   *d_target;
@@ -150,7 +150,7 @@ struct gvfs_async
 	gpointer&					ad()		{ return a_async_data;		}
 
 	public:
-	void*		operator new	(size_t size, gint32 handle_index, gint max_result, gvfs_async_caller_data* caller_data)   
+	void*		operator new	(size_t size, gint32 handle_index, gint max_result, gvfs_async_caller_data* caller_data)
 				{
 					gvfs_async	*ga	= g_try_new0(gvfs_async, 1);
 
@@ -159,7 +159,7 @@ struct gvfs_async
 						gwr_err("gvfs_async::new:g_try_new0 failed");
 						return ga;
 					}
-					
+
 					// no up & down function, since we have no inheritance
 					// for this struct
 					ga->a_handle_index	= handle_index;
@@ -169,14 +169,14 @@ struct gvfs_async
 					return ga;
 				}
 
-	void		operator delete (void *p)		
-				{  
-					g_free (p);						
+	void		operator delete (void *p)
+				{
+					g_free (p);
 				}
 };
 
 //-----------------------------------------------------------------------------
-//  Caller part : 
+//  Caller part :
 //  * gvfs_async_callback
 //  * struct gvfs_async_caller_data
 //-----------------------------------------------------------------------------
@@ -188,7 +188,7 @@ struct  gvfs_async_caller_data
 	gpointer					a_user_data;
 
 	public:
-	void*		operator new	(size_t size, gvfs_async_user_callback callback, gpointer p)   
+	void*		operator new	(size_t size, gvfs_async_user_callback callback, gpointer p)
 				{
 					gvfs_async_caller_data	*cd	= g_try_new0(gvfs_async_caller_data, 1);
 
@@ -197,16 +197,16 @@ struct  gvfs_async_caller_data
 						gwr_err("gvfs_async_caller_data::new:g_try_new0 failed");
 						return cd;
 					}
-					
+
 					cd->a_callback		= callback;
 					cd->a_user_data		= p;
 
 					return cd;
 				}
 
-	void		operator delete (void *p)		
-				{  
-					g_free (p);						
+	void		operator delete (void *p)
+				{
+					g_free (p);
 				}
 };
 
@@ -237,7 +237,7 @@ struct gvfs_async_load_subdirs
 	gint		a_array_card;
 	public:
 	GArray*&							array()			{ return m_array;		}
-	gint&								len()			{ return a_array_card;	} 
+	gint&								len()			{ return a_array_card;	}
 
 	gvfs_file*	element(gint i)	{ return g_array_index(m_array, gvfs_file*, i);	}
 
@@ -247,10 +247,10 @@ struct gvfs_async_load_subdirs
 				g_array_append_val(m_array, file);
 				a_array_card++;
 			}
-			
+
 	public:
-	void*		operator new	(size_t size, GnomeVFSURI* parent_uri, gchar *parent_path) ; 
-	void		operator delete (void *p);		
+	void*		operator new	(size_t size, GnomeVFSURI* parent_uri, gchar *parent_path) ;
+	void		operator delete (void *p);
 };
 
 
diff --git a/src/gnome-cmd-foldview-model.cc b/src/gnome-cmd-foldview-model.cc
index f75f1b4..6688309 100644
--- a/src/gnome-cmd-foldview-model.cc
+++ b/src/gnome-cmd-foldview-model.cc
@@ -67,7 +67,7 @@ GcmdGtkFoldview::Model::Rowlike::Rowlike(gchar *_utf8_name, gint _icon)
 {
 	d_utf8_name		= g_strdup( _utf8_name );
 	a_icon			= _icon;
-	
+
 	// collate key
 	glong l = g_utf8_strlen(d_utf8_name, -1);
 	d_utf8_collate_key = g_utf8_collate_key_for_filename(d_utf8_name, l);
@@ -78,20 +78,20 @@ GcmdGtkFoldview::Model::Rowlike::~Rowlike()
 	g_free(d_utf8_collate_key);
 }
 
-const   gchar*  
+const   gchar*
 GcmdGtkFoldview::Model::Rowlike::utf8_collate_key()
-{ 
-	return d_utf8_collate_key;	
+{
+	return d_utf8_collate_key;
 }
-const   gchar*	
+const   gchar*
 GcmdGtkFoldview::Model::Rowlike::utf8_name()
-{ 
-	return d_utf8_name;			
+{
+	return d_utf8_name;
 }
-gint	
+gint
 GcmdGtkFoldview::Model::Rowlike::icon()
-{ 
-	return a_icon;				
+{
+	return a_icon;
 }
 
 
@@ -158,7 +158,7 @@ void GcmdGtkFoldview::Model::release_objects()
 		g_object_unref(m_treestore);
 		m_treestore = NULL;
 	}
-	
+
 #endif
 }
 
@@ -169,7 +169,7 @@ GtkTreeIter* GcmdGtkFoldview::Model::Iter_new(GtkTreeIter* iter)
 {
 	GtkTreeIter *new_iter = g_new0(GtkTreeIter,1);
 
-	if ( iter != NULL )	
+	if ( iter != NULL )
 		*new_iter = *iter;
 
 	return new_iter;
@@ -245,7 +245,7 @@ void	GcmdGtkFoldview::Model::Root::unset()
 		gwr_inf("model_root::unset:info is null, destroying nothing");
 	}
 
-	m_uri		= NULL; 
+	m_uri		= NULL;
 	m_info		= NULL;
 }
 
@@ -269,7 +269,7 @@ gint GcmdGtkFoldview::Model::Compare(
 	if ( str_a[0] == '.' )  a_dotted = TRUE;
 	if ( str_b[0] == '.' )  b_dotted = TRUE;
 
-	if ( a_dotted && !b_dotted ) 
+	if ( a_dotted && !b_dotted )
 	{
 		g_free(str_a);
 		g_free(str_b);
@@ -290,7 +290,7 @@ gint GcmdGtkFoldview::Model::Compare(
 }
 
 //=============================================================================
-//  given an iter, return a mallocated 
+//  given an iter, return a mallocated
 //  * GnomeVFSURI   representing the full path
 //  * gchar*		representing the iter string
 //  ( is GtkTreeModel sucking ??? )
@@ -370,7 +370,7 @@ GnomeVFSURI* GcmdGtkFoldview::Model::iter_get_uri_new(GtkTreeIter *final)
 	// new uri
 	uri = GVFS_uri_new(strUri);
 	return uri;
-	
+
 #endif
 }
 
@@ -392,7 +392,7 @@ gchar* GcmdGtkFoldview::Model::iter_get_string_new(GtkTreeIter *iter)
 	str = g_strdup( r->utf8_name() );
 
 #endif
-	
+
 	return str;
 }
 
@@ -406,7 +406,7 @@ gchar* GcmdGtkFoldview::Model::iter_get_string_new(GtkTreeIter *iter)
 	GValue v = {0};
 	gtk_tree_model_get_value(treemodel(), iter, 0, &v);
 	str_const = g_value_get_string(&v);
-	
+
 #endif
 
 	str = (char*)str_const;
@@ -471,7 +471,7 @@ void GcmdGtkFoldview::Model::set_value(GtkTreeIter *iter, gchar* text, gint icon
 
 #else
 
-	
+
 	Rowlike* r = new Rowlike(text, icon);
 
 	GValue v = {0};
@@ -487,9 +487,9 @@ void GcmdGtkFoldview::Model::set_value(GtkTreeIter *iter, gchar* text, gint icon
 //  set value for first child -> control
 //=============================================================================
 void GcmdGtkFoldview::Model::iter_replace_first_child(
-	GtkTreeIter				*parent, 
-	GtkTreeIter				*child, 
-	gchar*					text, 
+	GtkTreeIter				*parent,
+	GtkTreeIter				*child,
+	gchar*					text,
 	gint					icon)
 {
 #ifdef __GTS__
@@ -521,9 +521,9 @@ void GcmdGtkFoldview::Model::iter_replace_first_child(
 //  we create the model_iter_set_first_child above just for fun.
 //=============================================================================
 void GcmdGtkFoldview::Model::iter_replace_dummy_child(
-	GtkTreeIter				*parent, 
+	GtkTreeIter				*parent,
 	GtkTreeIter				*child,
-	gchar*					text, 
+	gchar*					text,
 	gint					icon)
 {
 	gint	n = 0;
@@ -580,7 +580,7 @@ gboolean GcmdGtkFoldview::Model::iter_remove(GtkTreeIter *iter)
 //=============================================================================
 gint GcmdGtkFoldview::Model::iter_remove_children(GtkTreeIter *parent)
 {
-#ifdef __GTS__ 
+#ifdef __GTS__
 
 	gint				count   = 0;
 	//gchar				*str	= NULL;
@@ -588,7 +588,7 @@ gint GcmdGtkFoldview::Model::iter_remove_children(GtkTreeIter *parent)
 
 	//  Code with iter_remove, that is not recursive, but does not
 	//  return the number of nodes removed
-	//	
+	//
 	while ( gtk_tree_model_iter_children( treemodel(), &child, parent) )
 	{
 		gtk_tree_store_remove(treestore(), &child);
@@ -596,7 +596,7 @@ gint GcmdGtkFoldview::Model::iter_remove_children(GtkTreeIter *parent)
 
 	//  Code with iter_remove, that returns the number of nodes removed
 	//  but is unuselessly recursive
-	//	
+	//
 	//	while ( gtk_tree_model_iter_children( treemodel(), &child, parent) )
 	//	{
 	//		//str = iter_get_string_new(&child);
diff --git a/src/gnome-cmd-foldview-private.h b/src/gnome-cmd-foldview-private.h
index 28e72f0..0297745 100644
--- a/src/gnome-cmd-foldview-private.h
+++ b/src/gnome-cmd-foldview-private.h
@@ -22,7 +22,7 @@
 #ifndef __GCMDGTKFOLDVIEW_PRIVATE_H__
 #define __GCMDGTKFOLDVIEW_PRIVATE_H__
 
-/******************************************************************************							
+/******************************************************************************
 
 	C++
 	Contain variadic macros
@@ -38,7 +38,7 @@
 		..................... facultative  / later ............................
 
 		sync file_list when it is not active ( in a hidden tab )
-			
+
 		Bookmarks
 
 		Notification from filesystem ( very hard to do, we're really going
@@ -66,7 +66,7 @@ DONE	symlinks icons show little white pixel when selected its ugly
 
 DONE	foldview correct position on show / hide ( cmdline, buttonbar, ... )
 
-DONE	(Finally) gcmd crashes when opening access-denied folder from treeview 
+DONE	(Finally) gcmd crashes when opening access-denied folder from treeview
 		in tab, after showing an alert
 
 DONE	Going crazy with correct theming of treeview with selectionned items,
@@ -83,19 +83,19 @@ DONE	? mutex on handles : no, gvfs_async calls are queued
 		concurrency between gtk & gvfs
 
 DONE	why GVFS_qstack_ff / GVFS_qstack_size  is always n-2 / n ??? should be n / n
-		-> because t' affiches ff _avant_ update et qsize au lieu de qsize - 1, 
+		-> because t' affiches ff _avant_ update et qsize au lieu de qsize - 1,
 		stupid, ça fait un décalage de 2
 
 DONE	Comments cleanup
-	
+
 DONE	Private logging for gvfs ops
 
-DONE	Cancel all async ops 
-	
+DONE	Cancel all async ops
+
 DONE	Big Bug in checking type of GnomeVFSFileInfo : GNOME_VFS_FILE_TYPE_...
-		are distinct values - it is not a bitfield, triple fuck, spended time 
+		are distinct values - it is not a bitfield, triple fuck, spended time
 		on that
-	
+
 	---------------------------------------------------------------------------
 	TODO EPIOTR
 
@@ -133,7 +133,7 @@ DONE	* after opening foldview, cmdline is moved from bottom to top -
 
 
 
-*******************************************************************************							
+*******************************************************************************
 						HELPERS LOGGERS
 						===============
 
@@ -151,7 +151,7 @@ void gnome_cmd_file_log(gchar *str, GnomeCmdFile *file)
 {
 	gchar   temp[1024];
 
-	sprintf(temp, "fil:[0x%08x %3s][%03i-%03i] [h:xxxxxxxx] [mu:xxx] [%s] [%s]\n", 
+	sprintf(temp, "fil:[0x%08x %3s][%03i-%03i] [h:xxxxxxxx] [mu:xxx] [%s] [%s]\n",
 		file,
 		g_object_is_floating(file) ? "FLO" : "REF",
 		((GInitiallyUnowned*)file)->ref_count,
@@ -176,12 +176,12 @@ void gnome_cmd_dir_log(const gchar *str, GnomeCmdDir *dir)
 		return;
 	}
 
-	sprintf(temp, "dir:[0x%08x %3s][%03i-%03i] [h:0x%08x] [mu:xxx] [%s] [%s]\n", 
+	sprintf(temp, "dir:[0x%08x %3s][%03i-%03i] [h:0x%08x] [mu:xxx] [%s] [%s]\n",
 		dir,
 		g_object_is_floating(dir) ? "FLO" : "REF",
 		((GInitiallyUnowned*)dir)->ref_count,
 		gnome_cmd_file_get_ref_count(GNOME_CMD_FILE(dir)),
-		gnome_cmd_dir_get_handle(dir), 
+		gnome_cmd_dir_get_handle(dir),
 		//dir->priv->monitor_users,
 		GNOME_CMD_FILE_INFO(dir)->uri != NULL ? GNOME_CMD_FILE_INFO(dir)->uri->text : "no uri",
 		str);
@@ -301,7 +301,7 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
 
 
 
-*******************************************************************************							
+*******************************************************************************
 
 					WIDGET HIERARCHY FOR GTK-FOLDVIEW
 					=================================
@@ -320,7 +320,7 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
 		GtkWidget *info_label;
 
 
-*******************************************************************************							
+*******************************************************************************
 
 				WIDGET HIERARCHY FOR GNOME-CMD-FILE-SELECTOR
 				============================================
@@ -333,12 +333,12 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
 		+--------------------- GnomeCmdFileList
 
 
-*******************************************************************************							
+*******************************************************************************
 
 						GTK+ DRAG & DROP SYNOPSIS
 						=========================
 
-			
+
 		"drag-begin"									SRC
 
 		"drag-motion"												DST
@@ -355,13 +355,13 @@ void GnomeCmdFileList::set_directory(GnomeCmdDir *dir)
 			|
 		"drag-data-received"										DST
 			|
-			|									
+			|
 		"drag-end"										SRC
 
-	
+
 	+   "drag-failed"									SRC
 		"drag-data-delete"								SRC
-		
+
 ******************************************************************************/
 #include <glib.h>
 #include <glib-object.h>
@@ -481,8 +481,8 @@ struct GcmdGtkFoldview
 		// For fixing the moving gutter of the pane
 		gulong		a_size_request_handle;
 		gint		a_size_request_width;
-		
-		// We have a m_parent member because of callbacks, for calling 
+
+		// We have a m_parent member because of callbacks, for calling
 		// the controller
 		private:
 		GtkWidget   *a_this;
@@ -511,7 +511,7 @@ struct GcmdGtkFoldview
 		//---------------------------------------------------------------------
 		private:
 		GdkPixbuf		*m_pixbuf[50];
-	
+
 		public:
 		enum eIcon
 		{
@@ -525,7 +525,7 @@ struct GcmdGtkFoldview
 			eIconSymlinkToDirReadOnly		,
 			eIconSymlinkToDirForbidden
 		};
-		
+
 		private:
 		gboolean		icons_load();
 		void			icons_unload();
@@ -561,10 +561,10 @@ struct GcmdGtkFoldview
 
 		private:
 		GtkTreeSelection	*selection()		{ return gtk_tree_view_get_selection(treeview()); }
-		gint				selection_count()	
+		gint				selection_count()
 							{
 								// Note: gtk_tree_selection_count_selected_rows() does not
-								//   exist in gtk+-2.0, only in gtk+ >= v2.2 ! 
+								//   exist in gtk+-2.0, only in gtk+ >= v2.2 !
  								return 	gtk_tree_selection_count_selected_rows(selection());
 							}
 
@@ -578,7 +578,7 @@ struct GcmdGtkFoldview
 		static 	void		signal_row_collapsed(GtkTreeView *tree_view,
 			GtkTreeIter		*iter, GtkTreePath *path,gpointer user_data);
 
-		static  gboolean	signal_button_press_event(GtkWidget *tree_view, 
+		static  gboolean	signal_button_press_event(GtkWidget *tree_view,
 							GdkEventButton *event, gpointer user_data);
 
 		static 	void		signal_drag_begin(GtkWidget *widget,
@@ -612,7 +612,7 @@ struct GcmdGtkFoldview
 										gtk_tree_path_free(d_path_clicked);
 									}
 								}
-			   
+
 			void	*operator   new(size_t size)	{  return g_new0(ctx_menu_data, 1);  }
 			void	operator	delete(void *p)		{  g_free(p);  }
 		};
@@ -621,7 +621,7 @@ struct GcmdGtkFoldview
 		{
 			gboolean	a_connect;
 			gchar		*a_text;
-			GCallback   a_callback;				
+			GCallback   a_callback;
 		};
 		struct  ctx_menu_entry
 		{
@@ -653,7 +653,7 @@ struct GcmdGtkFoldview
 		//---------------------------------------------------------------------
 		public:
 		void	update_style();
-		
+
 	} view;
 	//=========================================================================
 	//  Model
@@ -695,7 +695,7 @@ struct GcmdGtkFoldview
 		GtkTreeSortable	*treesortable()	{ return GTK_TREE_SORTABLE(m_treestore);}
 
 		//
-		//  Instead of storing boring G_TYPES vars in the store, we can store 
+		//  Instead of storing boring G_TYPES vars in the store, we can store
 		//  anything that inherits from GnomeCmdFoldviewTreestore::Data
 		//  when using GnomeCmdFoldviewTreestore :)
 		//
@@ -711,16 +711,16 @@ struct GcmdGtkFoldview
 			Rowlike(gchar *_utf8_name, gint _icon);
 			~Rowlike();
 			//.................................................................
-			public:	
+			public:
 			const   gchar*  utf8_collate_key();
 			const   gchar*	utf8_name();
 					gint	icon();
 		};
 
 #endif
-		
+
 		// Treemodel methods. These methods use either
-		// GtkTreestore or CnomeCmdFoldviewTreestore, depending on the 
+		// GtkTreestore or CnomeCmdFoldviewTreestore, depending on the
 		// #define __GTS__ above.
 
 		//
@@ -774,13 +774,13 @@ struct GcmdGtkFoldview
 		//---------------------------------------------------------------------
 		private:
 		GnomeCmdCon		*m_con;
-		
-		public:					
+
+		public:
 		void			connection(GnomeCmdCon *con)	{ m_con = con;		}
 		GnomeCmdCon*	connection()					{ return m_con;		}
-		
+
 	} model;
-	
+
 	//=========================================================================
 	//  Controller
 	//=========================================================================
@@ -802,12 +802,12 @@ struct GcmdGtkFoldview
 	static  void	Control_g_object_dispose	(GObject*);
 	static  void	Control_g_object_finalize   (GObject*);
 	static  void	Control_g_object_init		(GcmdGtkFoldview *foldview);
-	
+
 			gint	control_ref_count()
 					{
 						return ((GInitiallyUnowned*)this)->ref_count;
 					}
-	
+
 	//-------------------------------------------------------------------------
 	// divers
 	//-------------------------------------------------------------------------
@@ -836,7 +836,7 @@ struct GcmdGtkFoldview
 			void		control_iter_expand_p(GnomeVFSURI *parent_uri, gchar *parent_path);
 	public:
 			void		control_iter_expand(GtkTreeIter *parent);
-	
+
 	//-------------------------------------------------------------------------
 	// context menu actions
 	//-------------------------------------------------------------------------
@@ -848,7 +848,7 @@ struct GcmdGtkFoldview
 	static  void		Control_set_active_tab	(GtkMenuItem*, View::ctx_menu_data*);
 	static  void		Control_open_new_tab	(GtkMenuItem*, View::ctx_menu_data*);
 	static  void		Control_set_new_root	(GtkMenuItem*, View::ctx_menu_data*);
-	
+
 	private:
 	enum eSyncState
 	{
diff --git a/src/gnome-cmd-foldview-treestore.cc b/src/gnome-cmd-foldview-treestore.cc
index 720ba02..9ebf215 100644
--- a/src/gnome-cmd-foldview-treestore.cc
+++ b/src/gnome-cmd-foldview-treestore.cc
@@ -1,6 +1,6 @@
 #include <string.h>
 #include "gnome-cmd-foldview-treestore.h"
- 
+
 //  ###########################################################################
 //  ###																		###
 //  ##																		 ##
@@ -138,7 +138,7 @@ gint GnomeCmdFoldviewTreestore::node::Count = 0;
 	(_iter)->user_data	= NULL;												\
 	(_iter)->user_data2	= NULL;												\
 	(_iter)->user_data3	= NULL;
-	
+
 //=============================================================================
 
   /**
@@ -190,7 +190,7 @@ void*	GnomeCmdFoldviewTreestore::node::operator new(
 	**/
 
 //=============================================================================
-void	
+void
 GnomeCmdFoldviewTreestore::node::operator delete(
 void *p)
 {
@@ -477,7 +477,7 @@ generic_append:
 	// Note : I have never seen d_nodes change in append case
 	d_nodes = g_array_append_val(d_nodes, node);
 
-	// modify the previous node so its ->next field points to the newly 
+	// modify the previous node so its ->next field points to the newly
 	// created node ; do that only if we didnt create the first node.
 	if ( a_card != 0 )
 	{
@@ -518,7 +518,7 @@ generic_insert:
 		temp->a_pos++;
 		temp = temp->next();
 	}
-	
+
 	a_card++;
 	return node;
 }
@@ -647,8 +647,8 @@ GnomeCmdFoldviewTreestore::node_block::purge_and_update()
 //  ###																		###
 //  ###########################################################################
 
-GnomeCmdFoldviewTreestore::eRenderFlags 
-	GnomeCmdFoldviewTreestore::Render_flags = 
+GnomeCmdFoldviewTreestore::eRenderFlags
+	GnomeCmdFoldviewTreestore::Render_flags =
 		(GnomeCmdFoldviewTreestore::eRenderFlags)
 			(   GnomeCmdFoldviewTreestore::eSortDescending			|
 				GnomeCmdFoldviewTreestore::eSortCaseSensitive
@@ -664,7 +664,7 @@ GnomeCmdFoldviewTreestore::eRenderFlags
 	**/
 
 //=============================================================================
-inline gboolean 
+inline gboolean
 GnomeCmdFoldviewTreestore::iter_is_valid(
 	GtkTreeIter *iter)
 {
@@ -770,15 +770,15 @@ GnomeCmdFoldviewTreestore::node* node)
 	**/
 
 //=============================================================================
-void 
+void
 GnomeCmdFoldviewTreestore::add_child(
 	GtkTreeIter							*in_parent,
-	GtkTreeIter							*out_child, 
+	GtkTreeIter							*out_child,
 	GnomeCmdFoldviewTreestore::Data		*data)
 {
 	GnomeCmdFoldviewTreestore::node				*n_parent	= NULL;
 	GnomeCmdFoldviewTreestore::node				*n_child	= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_if_fail( iter_is_valid_but_may_be_null(in_parent) );
 
 	// try to set node_root
@@ -817,7 +817,7 @@ void GnomeCmdFoldviewTreestore::set_value(
 	GValue		*value)
 {
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_if_fail ( iter_is_valid(in) );
 	g_return_if_fail ( value );
 
@@ -854,7 +854,7 @@ gint GnomeCmdFoldviewTreestore::remove_children(
 	GtkTreeIter *in)
 {
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( iter_is_valid(in), 0 );
 
 	NODE_FROM_ITER(node, in);
@@ -875,7 +875,7 @@ gint GnomeCmdFoldviewTreestore::remove_children(
 	**/
 
 //=============================================================================
-gint 
+gint
 GnomeCmdFoldviewTreestore::clear()
 {
 	gint count = 0;
@@ -884,7 +884,7 @@ GnomeCmdFoldviewTreestore::clear()
 	if ( !d_node_root )
 		return 0;
 
-	// Quickly purge all beyond node_root	
+	// Quickly purge all beyond node_root
 	count = d_node_root->children()->purge();
 
 	// delete node_root
@@ -894,9 +894,9 @@ GnomeCmdFoldviewTreestore::clear()
 
 	// Set pointer to NULL
 	d_node_root = NULL;
-	
+
 	gwr_inf("GnomeCmdFoldviewTreestore::clear:%03i nodes deleted", count);
-	
+
 	return count;
 }
 
@@ -916,7 +916,7 @@ GnomeCmdFoldviewTreestore::clear()
   /**
 	*   GnomeCmdFoldviewTreestore::get_flags:
 	*
-	*   Tells the rest of the world whether our tree model has any special 
+	*   Tells the rest of the world whether our tree model has any special
 	*   characteristics. In our case, tree iters are non persistent
 	*
 	**/
@@ -926,10 +926,10 @@ GtkTreeModelFlags
 GnomeCmdFoldviewTreestore::get_flags(GtkTreeModel *tree_model)
 {
   g_return_val_if_fail (IS_GNOME_CMD_FOLDVIEW_TREESTORE(tree_model), (GtkTreeModelFlags)0);
- 
+
   return (GtkTreeModelFlags)0;
 }
- 
+
 //=============================================================================
 
   /**
@@ -944,10 +944,10 @@ gint
 GnomeCmdFoldviewTreestore::get_n_columns(GtkTreeModel *tree_model)
 {
   //g_return_val_if_fail (IS_GNOME_CMD_FOLDVIEW_TREESTORE(tree_model), 0);
- 
+
   return 1;
 }
- 
+
 //=============================================================================
 
   /**
@@ -965,7 +965,7 @@ GnomeCmdFoldviewTreestore::get_column_type(
 {
   g_return_val_if_fail (IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), G_TYPE_INVALID);
   g_return_val_if_fail (index == 0, G_TYPE_INVALID);
- 
+
   return G_TYPE_POINTER;
 }
 
@@ -990,7 +990,7 @@ GnomeCmdFoldviewTreestore::get_iter(
 	GnomeCmdFoldviewTreestore::node_block		*block		= NULL;
 	gint          *indices = NULL, pos = 0, depth =0;
 	gint		i = 0;
-	//......................................................................... 
+	//.........................................................................
 	g_assert( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel) );
 	g_assert( path!=NULL );
 
@@ -1029,8 +1029,8 @@ GnomeCmdFoldviewTreestore::get_iter(
 	ITER_FROM_NODE(treestore, iter, node);
 	return TRUE;
 }
- 
- 
+
+
 //=============================================================================
 
   /**
@@ -1049,7 +1049,7 @@ GnomeCmdFoldviewTreestore::get_path(
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GtkTreePath									*path		= NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), NULL );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid(iter), NULL);
@@ -1069,8 +1069,8 @@ GnomeCmdFoldviewTreestore::get_path(
 
 	return path;
 }
- 
- 
+
+
 //=============================================================================
 
   /**
@@ -1090,7 +1090,7 @@ GnomeCmdFoldviewTreestore::get_value(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel) );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_if_fail ( treestore->iter_is_valid(iter) );
@@ -1103,8 +1103,8 @@ GnomeCmdFoldviewTreestore::get_value(
 	g_value_init(value, G_TYPE_POINTER);
 	g_value_set_pointer(value, node->data());
 }
- 
- 
+
+
 //=============================================================================
 
   /**
@@ -1122,7 +1122,7 @@ GnomeCmdFoldviewTreestore::iter_next(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), FALSE );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid(iter), FALSE );
@@ -1137,8 +1137,8 @@ GnomeCmdFoldviewTreestore::iter_next(
 	ITER_FROM_NODE(treestore, iter, node);
 	return TRUE;
 }
- 
- 
+
+
 //=============================================================================
 
   /**
@@ -1146,9 +1146,9 @@ GnomeCmdFoldviewTreestore::iter_next(
 	*
 	*   Returns TRUE or FALSE depending on whether the row specified by
 	*   'parent' has any children. If it has children, then 'iter' is set to
-	*   point to the first child. 
+	*   point to the first child.
 	*
-	*   Special case: if 'parent' is NULL, then the first top-level row should 
+	*   Special case: if 'parent' is NULL, then the first top-level row should
 	*   be returned if it exists.
 	*
 	**/
@@ -1162,7 +1162,7 @@ GnomeCmdFoldviewTreestore::iter_children(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), FALSE );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid_but_may_be_null(iter_parent), FALSE );
@@ -1187,13 +1187,13 @@ GnomeCmdFoldviewTreestore::iter_children(
 
 	return FALSE;
 }
- 
+
 //=============================================================================
 
   /**
 	*   GnomeCmdFoldviewTreestore::iter_has_child:
 	*
-	*   Returns TRUE or FALSE depending on whether the row specified by 'iter' 
+	*   Returns TRUE or FALSE depending on whether the row specified by 'iter'
 	*   has any children.
 	*
 	**/
@@ -1206,7 +1206,7 @@ GnomeCmdFoldviewTreestore::iter_has_child(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), FALSE );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid(iter), FALSE );
@@ -1216,8 +1216,8 @@ GnomeCmdFoldviewTreestore::iter_has_child(
 
 	return node->children()->card() != 0 ? TRUE : FALSE;
 }
- 
- 
+
+
 //=============================================================================
 
   /**
@@ -1237,7 +1237,7 @@ GnomeCmdFoldviewTreestore::iter_n_children(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), 0 );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid_but_may_be_null(iter), 0 );
@@ -1251,14 +1251,14 @@ GnomeCmdFoldviewTreestore::iter_n_children(
 
 	return node->children()->card();
 }
- 
- 
+
+
 //=============================================================================
 
   /**
 	*   GnomeCmdFoldviewTreestore::iter_nth_child:
 	*
-	*   If the row specified by 'parent' has any children, set 'iter' to the 
+	*   If the row specified by 'parent' has any children, set 'iter' to the
 	*   n-th child and return TRUE if it exists, otherwise FALSE.
 	*
 	*   Special case : if 'parent' is NULL, we need to set 'iter' to the n-th
@@ -1277,7 +1277,7 @@ GnomeCmdFoldviewTreestore::iter_nth_child(
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
 	GnomeCmdFoldviewTreestore::node_block		*block		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), FALSE );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid_but_may_be_null(iter_parent), FALSE );
@@ -1318,7 +1318,7 @@ GnomeCmdFoldviewTreestore::iter_parent(
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
 	GnomeCmdFoldviewTreestore::node				*node		= NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_val_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(treemodel), FALSE );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(treemodel);
 	g_return_val_if_fail ( treestore->iter_is_valid(iter_child), FALSE );
@@ -1330,12 +1330,12 @@ GnomeCmdFoldviewTreestore::iter_parent(
 	node = node->parent();
 	g_assert( node );
 	ITER_FROM_NODE(treestore, iter_parent, node);
-	 
+
 	return TRUE;
 }
- 
- 
- 
+
+
+
 //  ###########################################################################
 //  ###																		###
 //  ##																		 ##
@@ -1356,8 +1356,8 @@ static void gnome_cmd_foldview_treestore_finalize(GObject *object);
 
   /**
 	*   gnome_cmd_foldview_treestore_init:
-	*   
-	*   This is called everytime a new custom list object instance is created 
+	*
+	*   This is called everytime a new custom list object instance is created
 	*   (we do that in gnome_cmd_foldview_treestore_new).
 	*
 	**/
@@ -1386,10 +1386,10 @@ static void
 gnome_cmd_foldview_treestore_class_init(GnomeCmdFoldviewTreestoreClass *klass)
 {
   GObjectClass *object_class;
- 
+
   parent_class = (GObjectClass*) g_type_class_peek_parent (klass);
   object_class = (GObjectClass*) klass;
- 
+
   object_class->finalize = gnome_cmd_foldview_treestore_finalize;
 }
 
@@ -1398,8 +1398,8 @@ gnome_cmd_foldview_treestore_class_init(GnomeCmdFoldviewTreestoreClass *klass)
   /**
 	*   gnome_cmd_foldview_treestore_tree_model_init:
 	*
-	*   Init callback for the interface registration in 
-	*   gnome_cmd_foldview_treestore_get_type. Here we override the 
+	*   Init callback for the interface registration in
+	*   gnome_cmd_foldview_treestore_get_type. Here we override the
 	*   GtkTreeModel interface functions that we implement.
 	*
 	**/
@@ -1428,7 +1428,7 @@ gnome_cmd_foldview_treestore_tree_model_init (GtkTreeModelIface *iface)
   /**
 	*   gnome_cmd_foldview_treestore_finalize:
 	*
-	*   This is called just before an instance is destroyed. Free dynamically 
+	*   This is called just before an instance is destroyed. Free dynamically
 	*   allocated memory here.
 	*
 	**/
@@ -1438,7 +1438,7 @@ static void
 gnome_cmd_foldview_treestore_finalize(GObject *object)
 {
 	GnomeCmdFoldviewTreestore					*treestore  = NULL;
-	//......................................................................... 
+	//.........................................................................
 	g_return_if_fail ( IS_GNOME_CMD_FOLDVIEW_TREESTORE(object) );
 	treestore = GNOME_CMD_FOLDVIEW_TREESTORE(object);
 
@@ -1498,7 +1498,7 @@ gnome_cmd_foldview_treestore_get_type (void)
 		/* Now register our GtkTreeModel interface with the type system */
 		g_type_add_interface_static (gnome_cmd_foldview_treestore_type, GTK_TYPE_TREE_MODEL, &tree_model_info);
 	}
- 
+
   return gnome_cmd_foldview_treestore_type;
 }
 
@@ -1514,15 +1514,10 @@ GnomeCmdFoldviewTreestore*
 gnome_cmd_foldview_treestore_new(void)
 {
   GnomeCmdFoldviewTreestore *t;
- 
+
   t = (GnomeCmdFoldviewTreestore*) g_object_new (GNOME_CMD_FOLDVIEW_TREESTORE_TYPE, NULL);
- 
+
   g_assert( t != NULL );
- 
+
   return t;
 }
-
- 
- 
-
-
diff --git a/src/gnome-cmd-foldview-treestore.h b/src/gnome-cmd-foldview-treestore.h
index 9166b1e..43ea462 100644
--- a/src/gnome-cmd-foldview-treestore.h
+++ b/src/gnome-cmd-foldview-treestore.h
@@ -3,11 +3,11 @@
 
 #include <gtk/gtk.h>
 
-//***************************************************************************** 
+//*****************************************************************************
 //
 //  Docs
 //
-//***************************************************************************** 
+//*****************************************************************************
 /*
 
 	GtkTreeIter usage:
@@ -18,19 +18,19 @@
 		gpointer	user_data3  : treestore's user data
 	}
 
-	So for each valid GtkTreeIter, we have iter->node->data() == iter->user_data3 ; 
+	So for each valid GtkTreeIter, we have iter->node->data() == iter->user_data3 ;
 	and a treestore's user can just do : get_iter(path), then (user's_type*)iter->user_data3
 	instead of treestore->get_value(g_value_stuff...)
 	Note that treestore code does that as well...
-	
-	
+
+
 */
 
-//***************************************************************************** 
+//*****************************************************************************
 //
 //					Object definition
 //
-//***************************************************************************** 
+//*****************************************************************************
 #define GNOME_CMD_FOLDVIEW_TREESTORE_TYPE            (gnome_cmd_foldview_treestore_get_type())
 
 #define GNOME_CMD_FOLDVIEW_TREESTORE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_CMD_FOLDVIEW_TREESTORE_TYPE, GnomeCmdFoldviewTreestore))
@@ -63,10 +63,10 @@ struct GnomeCmdFoldviewTreestore
 		Data();
 		virtual ~Data() = 0;	// forbid instantiation
 	};
-	
+
 	//=========================================================================
 	//
-	//								Nodes 
+	//								Nodes
 	//
 	//=========================================================================
 	struct node_block;
@@ -88,7 +88,7 @@ struct GnomeCmdFoldviewTreestore
 		public:
 		void*		operator new	(size_t size, gint _depth, gint _pos, node *_parent, GnomeCmdFoldviewTreestore::Data* _data);
 		public:
-		void		operator delete (void *p);	
+		void		operator delete (void *p);
 		//.................................................................
 		public:
 		const gchar*		log();
@@ -125,7 +125,7 @@ struct GnomeCmdFoldviewTreestore
 		//.................................................................
 		public:
 		void*		operator new	(size_t size, guint _depth, node *_parent);
-		void		operator delete (void *p);	
+		void		operator delete (void *p);
 		//.................................................................
 		public:
 		gint				card()		{ return a_card;	}
@@ -187,13 +187,13 @@ struct GnomeCmdFoldviewTreestore
 	static  gboolean	Render_sort_case_sensitive()	{ return Render_flags & eSortCaseSensitive;		}
 	static  gboolean	Render_sort_ascending()			{ return Render_flags & eSortAscending;			}
 	static  gboolean	Render_sort_descending()		{ return Render_flags & eSortDescending;		}
-	
+
 	public:
 	gboolean	set_render_flags(eRenderFlags flags)
 				{
 					eRenderFlags old = Render_flags;
 					Render_flags = flags;
-					
+
 					if ( Render_sort_case_sensitive() )
 					{
 						if ( !Render_sort_ascending() && !Render_sort_descending() )
@@ -235,8 +235,8 @@ struct GnomeCmdFoldviewTreestore
 	//.........................................................................
 	public:
 	// iter validation
-	inline gboolean iter_is_valid(GtkTreeIter*);	
-	inline gboolean	iter_is_valid_but_may_be_null(GtkTreeIter*);	
+	inline gboolean iter_is_valid(GtkTreeIter*);
+	inline gboolean	iter_is_valid_but_may_be_null(GtkTreeIter*);
 	// private helpers for sending signals
 	private:
 	void	emit_row_inserted   (node*);
@@ -245,30 +245,28 @@ struct GnomeCmdFoldviewTreestore
 	public:
 	void	add_child			(GtkTreeIter *in_parent,	GtkTreeIter *out_child, GnomeCmdFoldviewTreestore::Data*);
 	void	set_value			(GtkTreeIter *in,			gint column, GValue *value);
-	gint	remove_children		(GtkTreeIter *in);	
+	gint	remove_children		(GtkTreeIter *in);
 	gint	clear();
 };
 
 GType         					gnome_cmd_foldview_treestore_get_type   (void);
 GnomeCmdFoldviewTreestore*		gnome_cmd_foldview_treestore_new		(void);
 
- 
-//***************************************************************************** 
+
+//*****************************************************************************
 //
 //					Class Definition
 //
-//***************************************************************************** 
+//*****************************************************************************
 #define GNOME_CMD_FOLDVIEW_TREESTORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GNOME_CMD_FOLDVIEW_TREESTORE_TYPE, GnomeCmdFoldviewTreestoreClass))
 #define IS_GNOME_CMD_FOLDVIEW_TREESTORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GNOME_CMD_FOLDVIEW_TREESTORE_TYPE))
 #define GNOME_CMD_FOLDVIEW_TREESTORE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GNOME_CMD_FOLDVIEW_TREESTORE_TYPE, GnomeCmdFoldviewTreestoreClass))
 
 typedef struct _GnomeCmdFoldviewTreestoreClass  GnomeCmdFoldviewTreestoreClass;
- 
+
 struct _GnomeCmdFoldviewTreestoreClass
 {
   GObjectClass parent_class;
 };
- 
 
- 
 #endif
diff --git a/src/gnome-cmd-foldview-view.cc b/src/gnome-cmd-foldview-view.cc
index d38d412..7c75e63 100644
--- a/src/gnome-cmd-foldview-view.cc
+++ b/src/gnome-cmd-foldview-view.cc
@@ -206,14 +206,14 @@ void signal_cursor_changed(
 	}
 
 	// Note: gtk_tree_selection_count_selected_rows() does not
-	//   exist in gtk+-2.0, only in gtk+ >= v2.2 ! 
+	//   exist in gtk+-2.0, only in gtk+ >= v2.2 !
 	tree_sel_card = gtk_tree_selection_count_selected_rows(tree_sel);
 
 	if ( tree_sel_card == 1 )
 	{
 		if ( gtk_tree_selection_get_selected( tree_sel, NULL, &iter_selected) )
 		{
-			
+
 		}
 		else
 		{
@@ -275,7 +275,7 @@ gboolean GcmdGtkFoldview::View::create(GtkWidget *_this, GtkTreeModel *_treemode
 	//gtk_object_set_data_full (GTK_OBJECT (m_this), "infolabel", m_info_label,
 	//	                      (GtkDestroyNotify) g_object_unref);
 	//gtk_misc_set_alignment (GTK_MISC (m_info_label), 0.0f, 0.5f);
-	
+
 	// create the scrollwindow that we'll place the treeview in
 	m_scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
 	/*
@@ -308,23 +308,23 @@ gboolean GcmdGtkFoldview::View::create(GtkWidget *_this, GtkTreeModel *_treemode
 	//			gint					n_targets,
 	//			GdkDragAction			actions);
 	//
-	//	typedef struct 
+	//	typedef struct
 	//	{
 	//	  gchar *target;
 	//	  guint  flags;
 	//	  guint  info;
-	//	} 
+	//	}
 	//  GtkTargetEntry;
 	//
-	//  typedef enum 
+	//  typedef enum
 	//  {
 	//	  GTK_TARGET_SAME_APP = 1 << 0,    /*< nick=same-app >*/
 	//	  GTK_TARGET_SAME_WIDGET = 1 << 1  /*< nick=same-widget >*/
-	//  } 
+	//  }
 	//  GtkTargetFlags;
 
-	//GtkTargetEntry  drag_source_entry[2]	= 
-	//	{ 
+	//GtkTargetEntry  drag_source_entry[2]	=
+	//	{
 	//		{   (gchar*)"text/plain", 0, 0X30 },
 	//		{   (gchar*)"text/plain", 0, 0X31 }
 	//	};
@@ -337,7 +337,7 @@ gboolean GcmdGtkFoldview::View::create(GtkWidget *_this, GtkTreeModel *_treemode
 	//	GDK_ACTION_PRIVATE );
 
     //g_signal_connect(m_treeview, "drag-begin", G_CALLBACK (signal_drag_begin), (gpointer)this);
-		
+
 	// columns
 	col0 = gtk_tree_view_column_new();
 	gtk_tree_view_column_set_title(col0, _("Folders"));
@@ -423,7 +423,7 @@ gboolean GcmdGtkFoldview::View::create(GtkWidget *_this, GtkTreeModel *_treemode
 
 	//-------------------------------------------------------------------------
 	// ref objects for showing / hiding since I dont understand gtk ref / unref
-	// g_object_ref(foldview()); 
+	// g_object_ref(foldview());
 	// Now I understand !
 
 //g_object_ref(m_con_hbox);
@@ -435,7 +435,7 @@ gboolean GcmdGtkFoldview::View::create(GtkWidget *_this, GtkTreeModel *_treemode
 
 	//-------------------------------------------------------------------------
 	// show, except the pane container
-	
+
 	//fs->update_concombo_visibility();
 	gtk_widget_show(m_con_combo);
 	//gtk_widget_show(m_vol_label);
@@ -462,7 +462,7 @@ void GcmdGtkFoldview::View::destroy()
 		GtkWidget   *m_info_label;
 
 		GdkPixbuf		*m_pixbuf[50];
-	
+
 		public:
 		enum eIcon
 		{
@@ -476,8 +476,8 @@ void GcmdGtkFoldview::View::destroy()
 			eIconSymlinkToDirReadOnly		,
 			eIconSymlinkToDirForbidden
 		};
-		
-		// Release 
+
+		// Release
 		icons_unload();
 
 
@@ -531,8 +531,8 @@ void	GcmdGtkFoldview::View::signal_row_collapsed(
 //  Buttons
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 gboolean GcmdGtkFoldview::View::signal_button_press_event(
-	GtkWidget	   *tree_view, 
-	GdkEventButton *event, 
+	GtkWidget	   *tree_view,
+	GdkEventButton *event,
 	gpointer		data)
 {
 	//  signal handled		: return TRUE
@@ -551,7 +551,7 @@ gboolean GcmdGtkFoldview::View::signal_button_press_event(
 	// get path to iter over which the user clicked
 	gtk_tree_view_get_path_at_pos(
 		GTK_TREE_VIEW(tree_view),
-		(gint) event->x, 
+		(gint) event->x,
 		(gint) event->y,
 		&path_clicked, NULL, NULL, NULL);
 
@@ -565,7 +565,7 @@ gboolean GcmdGtkFoldview::View::signal_button_press_event(
 	}
 
 	// Note: gtk_tree_selection_count_selected_rows() does not
-	//   exist in gtk+-2.0, only in gtk+ >= v2.2 ! 
+	//   exist in gtk+-2.0, only in gtk+ >= v2.2 !
 	tree_sel_card = gtk_tree_selection_count_selected_rows(tree_sel);
 
 	if ( tree_sel_card == 1 )
@@ -598,10 +598,10 @@ gboolean GcmdGtkFoldview::View::signal_button_press_event(
 	if ( ( event->type == GDK_BUTTON_PRESS )  &&  ( event->button == 1 ) )
 	{
 		// The GtkTreeSelection will be updated only
-		// in the next loop of gtk_main(), and when calling sync(), 
+		// in the next loop of gtk_main(), and when calling sync(),
 		// the path_selected is still the old selected item, not the
 		// clicked one.
-	
+
 		// So in the sync() function, we use path_clicked instead of
 		// path_selected
 
@@ -662,7 +662,7 @@ gboolean GcmdGtkFoldview::View::signal_button_press_event(
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 void GcmdGtkFoldview::View::signal_drag_begin(
 	GtkWidget	   *widget,
-	GdkDragContext *drag_context, 
+	GdkDragContext *drag_context,
 	gpointer		user_data)
 {
 	gwr_inf("View:signal_drag_begin");
@@ -680,7 +680,7 @@ gboolean GcmdGtkFoldview::View::context_menu_pop(ctx_menu_data *ctxdata)
 		if ( ctxdata->d_path_clicked )
 		{
 			if ( gtk_tree_path_compare(
-					ctxdata->d_path_clicked, 
+					ctxdata->d_path_clicked,
 					ctxdata->d_path_selected) == 0 )
 			{
 				ctxdata->a_foldview->control_context_menu_populate_add_section  (s_context_menu.a_widget, 0, ctxdata);
@@ -722,10 +722,10 @@ gboolean GcmdGtkFoldview::View::context_menu_pop(ctx_menu_data *ctxdata)
 	//	func				:	a user supplied function used to position the menu, or NULL. [allow-none]
 	//	data				:	user supplied data to be passed to func. [allow-none]
 	//	button				:	the mouse button which was pressed to initiate the event.
-	//	activate_time		:	the time at which the activation event occurred. 
+	//	activate_time		:	the time at which the activation event occurred.
 	gtk_menu_popup(
-		GTK_MENU(s_context_menu.a_widget), NULL, NULL, 
-		NULL, NULL, 
+		GTK_MENU(s_context_menu.a_widget), NULL, NULL,
+		NULL, NULL,
 		ctxdata->a_button, ctxdata->a_time);
 
 	return TRUE;
@@ -739,7 +739,7 @@ gboolean GcmdGtkFoldview::View::click_left_single(ctx_menu_data *ctxdata)
 	// simulate a callback, avoiding accessing to GcmdGtkFoldview singleton
 	GcmdGtkFoldview::Control_sync_update(NULL, ctxdata);
 
-	// tell gtk to continue signal treatment, else treeview wont 
+	// tell gtk to continue signal treatment, else treeview wont
 	// expand / collapse anymore if that was the arrow that was clicked
 	return FALSE;
 }
@@ -794,12 +794,3 @@ void GcmdGtkFoldview::View::update_style()
 	gtk_widget_set_style (GTK_WIDGET(treeview()), style_foldview);
 	((GnomeCmdCombo*)connection_combo())->update_style();
 }
-	
-	
-
-
-
-
-
-
-
diff --git a/src/gnome-cmd-foldview.cc b/src/gnome-cmd-foldview.cc
index e50b089..d30fbc5 100644
--- a/src/gnome-cmd-foldview.cc
+++ b/src/gnome-cmd-foldview.cc
@@ -200,9 +200,9 @@ GcmdGtkFoldview::eFileAccess GcmdGtkFoldview::Access_from_permissions(
 }
 
 GcmdGtkFoldview::View::eIcon GcmdGtkFoldview::View::Icon_from_type_permissions(
-	GnomeVFSFileType		type, 
+	GnomeVFSFileType		type,
 	GnomeVFSFilePermissions permissions)
-{  
+{
 	eFileAccess	access  = eAccessUnknown;
 
 	access = Access_from_permissions(permissions);
@@ -211,9 +211,9 @@ GcmdGtkFoldview::View::eIcon GcmdGtkFoldview::View::Icon_from_type_permissions(
 }
 
 GcmdGtkFoldview::View::eIcon GcmdGtkFoldview::View::Icon_from_type_access(
-	GnomeVFSFileType				type, 
+	GnomeVFSFileType				type,
 	GcmdGtkFoldview::eFileAccess	access)
-{  
+{
 	if ( type == GNOME_VFS_FILE_TYPE_DIRECTORY )
 	{
 		switch ( access )
@@ -350,7 +350,7 @@ gcmdgtkfoldview_class_init (GcmdGtkFoldviewClass *klass)
 		g_cclosure_marshal_VOID__VOID,
 		G_TYPE_NONE, 0);
 
-	// For exiting properly 
+	// For exiting properly
     GtkObjectClass  *gtk_object_class   = GTK_OBJECT_CLASS  (klass);
     //GtkWidgetClass  *gtk_widget_class   = GTK_WIDGET_CLASS  (klass);
 	GObjectClass	*g_object_class		= G_OBJECT_CLASS	(klass);
@@ -377,7 +377,7 @@ gcmdgtkfoldview_new ()
 //  ##																		 ##
 //  ###																		###
 //  ###########################################################################
-void	
+void
 gnome_cmd_foldview_update_style(GtkWidget *widget)
 {
 	g_return_if_fail( widget != NULL );
@@ -385,7 +385,7 @@ gnome_cmd_foldview_update_style(GtkWidget *widget)
 	(GCMDGTKFOLDVIEW(widget))->view.update_style();
 }
 
-GtkWidget* 
+GtkWidget*
 gnome_cmd_foldview_get_instance()
 {
 	return GcmdWidget();
@@ -426,5 +426,3 @@ gboolean GcmdGtkFoldview::root_uri_set_2(GnomeVFSURI *uri)
 {
 	return control_root_uri_set(uri);
 }
-
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]