~ubuntu-branches/ubuntu/vivid/nip2/vivid-proposed

« back to all changes in this revision

Viewing changes to src/model.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Terry
  • Date: 2009-05-12 09:26:46 UTC
  • mfrom: (1.2.11 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090512092646-j8lb1w2x69pvgma4
Tags: 7.18.1-1ubuntu1
* Merge from debian unstable (LP: #375435), remaining changes:
  - debian/control: Also Recommend abrowser

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        va_list ap;
118
118
 
119
119
        va_start( ap, fmt );
120
 
        (void) buf_vappendf( &state->error_log, fmt, ap );
 
120
        (void) vips_buf_vappendf( &state->error_log, fmt, ap );
121
121
        va_end( ap );
122
122
}
123
123
 
126
126
{
127
127
        char *utf8;
128
128
 
129
 
        utf8 = f2utf8( buf_all( &state->error_log ) );
 
129
        utf8 = f2utf8( vips_buf_all( &state->error_log ) );
130
130
        error_top( _( "Load failed." ) );
131
131
        error_sub( _( "Unable to load from file \"%s\". Error log is:\n%s" ),
132
132
                state->filename, utf8 );
149
149
                model_loadstate_destroy( state );
150
150
                return( NULL );
151
151
        }
152
 
        buf_init_static( &state->error_log, 
 
152
        vips_buf_init_static( &state->error_log, 
153
153
                state->error_log_buffer, MAX_STRSIZE );
154
154
 
155
155
        xmlSetGenericErrorFunc( state, 
179
179
                model_loadstate_destroy( state );
180
180
                return( NULL );
181
181
        }
182
 
        buf_init_static( &state->error_log, 
 
182
        vips_buf_init_static( &state->error_log, 
183
183
                state->error_log_buffer, MAX_STRSIZE );
184
184
 
185
185
        xmlSetGenericErrorFunc( state, 
247
247
 
248
248
        /* Take copy of lexed and rewritten stuff.
249
249
         */
250
 
        im_strncpy( new_rhs, buf_all( &lex_text ), MAX_STRSIZE );
 
250
        im_strncpy( new_rhs, vips_buf_all( &lex_text ), MAX_STRSIZE );
251
251
}
252
252
 
253
253
View *
278
278
void
279
279
model_scrollto( Model *model, ModelScrollPosition position )
280
280
{
281
 
        assert( IS_MODEL( model ) );
 
281
        g_assert( IS_MODEL( model ) );
282
282
 
283
283
        g_signal_emit( G_OBJECT( model ), model_signals[SIG_SCROLLTO], 0, 
284
284
                position );
287
287
void
288
288
model_layout( Model *model )
289
289
{
290
 
        assert( IS_MODEL( model ) );
 
290
        g_assert( IS_MODEL( model ) );
291
291
 
292
292
        g_signal_emit( G_OBJECT( model ), model_signals[SIG_LAYOUT], 0 );
293
293
}
295
295
void *
296
296
model_reset( Model *model )
297
297
{
298
 
        assert( IS_MODEL( model ) );
 
298
        g_assert( IS_MODEL( model ) );
299
299
 
300
300
        g_signal_emit( G_OBJECT( model ), model_signals[SIG_RESET], 0 );
301
301
 
633
633
        IDESTROY( mcd->model );
634
634
        symbol_recalculate_all();
635
635
 
636
 
        nfn( sys, IWINDOW_TRUE );
 
636
        nfn( sys, IWINDOW_YES );
637
637
}
638
638
 
639
639
/* The model we are watching has been killed, maybe by us.
641
641
static void
642
642
model_check_destroy_destroy_cb( Model *model, ModelCheckDestroy *mcd )
643
643
{
644
 
        assert( IS_MODEL( model ) );
645
 
        assert( IS_MODEL( mcd->model ) );
646
 
        assert( !mcd->idlg || IS_IDIALOG( mcd->idlg ) );
 
644
        g_assert( IS_MODEL( model ) );
 
645
        g_assert( IS_MODEL( mcd->model ) );
 
646
        g_assert( !mcd->idlg || IS_IDIALOG( mcd->idlg ) );
647
647
 
648
648
        mcd->model = NULL;
649
649
        mcd->destroy_sid = 0;
670
670
void
671
671
model_check_destroy( GtkWidget *parent, Model *model )
672
672
{
673
 
        BufInfo buf;
 
673
        VipsBuf buf;
674
674
        char str[30];
675
675
        const char *name;
676
676
 
680
680
        mcd->model = model;
681
681
 
682
682
        if( IS_SYMBOL( model ) ) {
683
 
                buf_init_static( &buf, str, 30 );
 
683
                vips_buf_init_static( &buf, str, 30 );
684
684
                symbol_qualified_name( SYMBOL( model ), &buf );
685
 
                name = buf_all( &buf );
 
685
                name = vips_buf_all( &buf );
686
686
        }
687
687
        else
688
688
                name = IOBJECT( model )->name;