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

« back to all changes in this revision

Viewing changes to src/colour.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:
69
69
        Colour *colour = COLOUR( gobject );
70
70
 
71
71
        IM_FREE( colour->colour_space );
72
 
        buf_destroy( &colour->caption );
 
72
        vips_buf_destroy( &colour->caption );
73
73
 
74
74
        G_OBJECT_CLASS( parent_class )->finalize( gobject );
75
75
}
113
113
static void
114
114
colour_refresh( Colour *colour )
115
115
{
116
 
        buf_rewind( &colour->caption );
117
 
        buf_appendf( &colour->caption, CLASS_COLOUR " %s [%g, %g, %g]",
 
116
        vips_buf_rewind( &colour->caption );
 
117
        vips_buf_appendf( &colour->caption, CLASS_COLOUR " %s [%g, %g, %g]",
118
118
                NN( colour->colour_space ),
119
119
                colour->value[0], colour->value[1], colour->value[2] );
120
120
}
189
189
                double value[3];
190
190
                int i;
191
191
 
192
 
                /* Setting as RGB can't express small differences, since we're
 
192
                /* Setting as RGB can't express small differences since we're
193
193
                 * going via 8 bit RGB. So only accept the new value if it's 
194
194
                 * sufficiently different from
195
195
                 * what we have now.
221
221
 
222
222
        colour_set_rgb( colour, rgb );
223
223
 
224
 
        nfn( sys, IWINDOW_TRUE );
 
224
        nfn( sys, IWINDOW_YES );
225
225
}
226
226
 
227
227
/* Build the insides of colour edit.
250
250
        Colour *colour = COLOUR( model );
251
251
        ColourEdit *eds = INEW( NULL, ColourEdit );
252
252
        GtkWidget *idlg;
253
 
        BufInfo buf;
 
253
        VipsBuf buf;
254
254
        char txt[100];
255
255
 
256
256
        eds->colour = colour;
257
257
 
258
258
        idlg = idialog_new();
259
 
        buf_init_static( &buf, txt, 100 );
 
259
        vips_buf_init_static( &buf, txt, 100 );
260
260
        row_qualified_name( HEAPMODEL( colour )->row, &buf );
261
261
        iwindow_set_title( IWINDOW( idlg ), 
262
 
                _( "Edit Color \"%s\"" ), buf_all( &buf ) );
 
262
                _( "Edit Color \"%s\"" ), vips_buf_all( &buf ) );
263
263
        idialog_set_build( IDIALOG( idlg ), 
264
264
                (iWindowBuildFn) colour_buildedit, eds, NULL, NULL );
265
265
        idialog_set_callbacks( IDIALOG( idlg ), 
341
341
        colour->value[1] = 0.0;
342
342
        colour->value[2] = 0.0;
343
343
        colour->colour_space = NULL;
344
 
        buf_init_dynamic( &colour->caption, MAX_LINELENGTH );
 
344
        vips_buf_init_dynamic( &colour->caption, MAX_LINELENGTH );
345
345
 
346
346
        iobject_set( IOBJECT( colour ), CLASS_COLOUR, NULL );
347
347
}