Beispiel #1
0
static void
workspaceview_layout_loop( WorkspaceLayout *layout )
{
	layout->cview = NULL;
	layout->area.left = INT_MAX;
	slist_map( layout->undone_columns,
		(SListMapFn) workspaceview_layout_find_leftmost, layout );

	layout->current_columns = NULL;
	layout->area.width = GTK_WIDGET( layout->cview )->allocation.width;
	slist_map( layout->undone_columns,
		(SListMapFn) workspaceview_layout_find_similar_x, layout );

	layout->current_columns = g_slist_sort( layout->current_columns,
		(GCompareFunc) workspaceview_layout_sort_y );

	layout->out_y = workspaceview_layout_top;
	slist_map( layout->current_columns,
		(SListMapFn) workspaceview_layout_set_pos, layout );

	layout->out_x += layout->area.width + workspaceview_layout_hspacing;

	slist_map( layout->current_columns,
		(SListMapFn) workspaceview_layout_strike, layout );

	IM_FREEF( g_slist_free, layout->current_columns );
}
Beispiel #2
0
/* Rethink the global trace_flags.
 */
static void
trace_global_rethink( void )
{
    trace_flags = 0;

    slist_map( trace_all, (SListMapFn) trace_global_rethink_sub, NULL );
}
Beispiel #3
0
void
icontainer_pos_renumber( iContainer *icontainer )
{
	int n = 0;
	GSList *changed;

#ifdef DEBUG_VERBOSE
{
	int i;

	printf( "icontainer_pos_renumber: " );
	iobject_print( IOBJECT( icontainer ) );
	printf( "\tbefore:\n" );
	i = 0;
	icontainer_map( icontainer, 
		(icontainer_map_fn) icontainer_print_element, &i, NULL );
}
#endif /*DEBUG_VERBOSE*/

	changed = NULL;
	icontainer_map( icontainer,
		(icontainer_map_fn) icontainer_pos_renumber_sub, &n, &changed );

	/* Tell all the children that have been renumbered.
	 */
#ifdef DEBUG_VERBOSE
	if( g_slist_length( changed ) > 1 ) {
		printf( "icontainer_pos_renumber: renumbering %d children! ",
			g_slist_length( changed ) );
		iobject_print( IOBJECT( icontainer ) );
	}
#endif /*DEBUG_VERBOSE*/
	slist_map( changed,
		(SListMapFn) icontainer_pos_changed, NULL );
	g_slist_free( changed );
	iobject_changed( IOBJECT( icontainer ) );

#ifdef DEBUG_VERBOSE
{
	int i;

	printf( "icontainer_pos_renumber: " );
	iobject_print( IOBJECT( icontainer ) );
	printf( "\tafter:\n" );
	i = 0;
	icontainer_map( icontainer, 
		(icontainer_map_fn) icontainer_print_element, &i, NULL );
}
#endif /*DEBUG_VERBOSE*/
}
Beispiel #4
0
static void
stringset_destroy( GtkObject *object )
{
	Stringset *ss;

	g_return_if_fail( object != NULL );
	g_return_if_fail( IS_STRINGSET( object ) );

	ss = STRINGSET( object );

	slist_map( ss->children,
		(SListMapFn) stringset_child_destroy, NULL );
	UNREF( ss->group );

	if( GTK_OBJECT_CLASS( stringset_parent_class )->destroy )
		GTK_OBJECT_CLASS( stringset_parent_class )->destroy( object );
}
Beispiel #5
0
static void
iimage_dispose( GObject *gobject )
{
	iImage *iimage;

#ifdef DEBUG
	printf( "iimage_dispose %p\n", gobject );
#endif /*DEBUG*/

	g_return_if_fail( gobject != NULL );
	g_return_if_fail( IS_IIMAGE( gobject ) );

	iimage = IIMAGE( gobject );

	slist_map( iimage->classmodels, 
		(SListMapFn) classmodel_iimage_unlink, iimage );
	g_assert( !iimage->classmodels );

	G_OBJECT_CLASS( parent_class )->dispose( gobject );
}
Beispiel #6
0
Datei: row.c Projekt: imclab/nip2
static void
row_dispose( GObject *gobject )
{
	Row *row = ROW( gobject );

#ifdef DEBUG_NEW
	/* Can't use row_name_print(), we may not have a parent.
	 */
	printf( "row_dispose: %s", NN( IOBJECT( row )->name ) );
	if( row->sym ) 
		printf( " (%s)", symbol_name( row->sym ) );
	printf( "\n" );
#endif /*DEBUG_NEW*/

	/* Reset state. Also see row_parent_remove().
	 */
	row_hide_dependents( row );
	if( row->expr )
		expr_error_clear( row->expr );
	if( row->top_col && row->top_col->last_select == row )
		row->top_col->last_select = NULL;
	row_deselect( row );

	/* Break all recomp links.
	 */
	slist_map( row->parents, (SListMapFn) row_link_break, row );
	slist_map( row->children, (SListMapFn) row_link_break_rev, row );
	g_assert( !row->parents && !row->children );
	(void) slist_map( row->recomp, (SListMapFn) row_dirty_clear, NULL );
	if( row->top_row )
		row->top_row->recomp_save = 
			g_slist_remove( row->top_row->recomp_save, row );
	IM_FREEF( g_slist_free, row->recomp_save );

	g_assert( !row->recomp );

	if( row->expr ) {
		g_assert( row->expr->row == row );

		/* If we're a local row, we will have a private expr 
		 * allocated for us. Junk it.
		 */
		if( row != row->top_row ) 
			icontainer_child_remove( ICONTAINER( row->expr ) );
		else {
			/* Top-level row, we were zapping the sym's expr.
			 * Break the link to it.
			 */
			row->expr->row = NULL;
			row->expr = NULL;
		}
	}

	/* Is this a top-level row? Kill the symbol too. Need to do this after
	 * sorting out row->expr, since otherwise killing the symbol will kill
	 * us again in turn.
	 */
	if( row == row->top_row ) 
		IDESTROY( row->sym );

	G_OBJECT_CLASS( parent_class )->dispose( gobject );
}