@@ -336,39 +336,10 @@ column_get_type( void )
336336 return ( column_type );
337337}
338338
339- static gint
340- iobject_name_compare ( iObject * a , iObject * b )
341- {
342- return ( strcasecmp ( a -> name , b -> name ) );
343- }
344-
345- /* Search for the column before this name in alphabetical order.
346- */
347- static Column *
348- column_find_previous ( Column * col )
349- {
350- Workspace * ws = col -> ws ;
351-
352- GSList * columns ;
353- Column * previous_col ;
354- int i ;
355-
356- columns = icontainer_get_children ( ICONTAINER ( ws ) );
357- columns = g_slist_sort ( columns , (GCompareFunc ) iobject_name_compare );
358- i = g_slist_index ( columns , col );
359- previous_col = NULL ;
360- if ( i > 0 )
361- previous_col = COLUMN ( g_slist_nth_data ( columns , i - 1 ) );
362- g_slist_free ( columns );
363-
364- return ( previous_col );
365- }
366-
367339Column *
368340column_new ( Workspace * ws , const char * name )
369341{
370342 Column * col ;
371- Column * previous_col ;
372343
373344 if ( workspace_column_find ( ws , name ) ) {
374345 error_top ( _ ( "Name clash." ) );
@@ -383,14 +354,8 @@ column_new( Workspace *ws, const char *name )
383354
384355 subcolumn_new ( NULL , col );
385356
386- if ( (previous_col = column_find_previous ( col )) ) {
387- col -> x = previous_col -> x + 50 ;
388- col -> y = previous_col -> y ;
389- }
390- else {
391- col -> x = ws -> vp .left ;
392- col -> y = ws -> vp .top ;
393- }
357+ col -> x = ws -> vp .left + 50 ;
358+ col -> y = ws -> vp .top ;
394359
395360 column_set_last_new ( col );
396361
0 commit comments