~ubuntu-branches/ubuntu/oneiric/gimp/oneiric-security

« back to all changes in this revision

Viewing changes to app/sanity.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-08-31 10:24:10 UTC
  • mfrom: (1.1.21 upstream) (0.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090831102410-eqawgw6fhdyi91ee
Tags: 2.6.7-1ubuntu1
* Merge with Debian unstable (LP: #419593), remaining changes:
  - debian/patches/02_help-message.patch,
    debian/patches/03_gimp.desktop.in.in.patch:
    + updated some strings for ubuntu
  - debian/rules:
    + updated translation templates
  - debian/control:
    + Drop webkit build dependency. gimp is the only thing pulling in webkit
      for the desktop CDs, and makes them explode. Without the webkit help
      browser plugin, help will just be displayed in the default browser.
* debian/patches/01_debian-gimprc.patch:
  - Updated
* debian/control:
  - Added a BZR link

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 
76
76
/*  private functions  */
77
77
 
 
78
static gboolean
 
79
sanity_check_version (guint major_version, guint required_major,
 
80
                      guint minor_version, guint required_minor,
 
81
                      guint micro_version, guint required_micro)
 
82
{
 
83
  if (major_version > required_major)
 
84
    return TRUE;
 
85
 
 
86
  if (major_version < required_major)
 
87
    return FALSE;
 
88
 
 
89
  if (minor_version > required_minor)
 
90
    return TRUE;
 
91
 
 
92
  if (minor_version < required_minor)
 
93
    return FALSE;
 
94
 
 
95
  if (micro_version >= required_micro)
 
96
    return TRUE;
 
97
 
 
98
  return FALSE;
 
99
}
 
100
 
78
101
static gchar *
79
102
sanity_check_gimp (void)
80
103
{
266
289
                    &babl_minor_version,
267
290
                    &babl_micro_version);
268
291
 
269
 
  if (babl_major_version < BABL_REQUIRED_MAJOR ||
270
 
      babl_minor_version < BABL_REQUIRED_MINOR ||
271
 
      babl_micro_version < BABL_REQUIRED_MICRO)
 
292
  if (! sanity_check_version (babl_major_version, BABL_REQUIRED_MAJOR,
 
293
                              babl_minor_version, BABL_REQUIRED_MINOR,
 
294
                              babl_micro_version, BABL_REQUIRED_MICRO))
272
295
    {
273
296
      return g_strdup_printf
274
297
        ("BABL version too old!\n\n"
304
327
                    &gegl_minor_version,
305
328
                    &gegl_micro_version);
306
329
 
307
 
  if (gegl_major_version < GEGL_REQUIRED_MAJOR ||
308
 
      gegl_minor_version < GEGL_REQUIRED_MINOR ||
309
 
      gegl_micro_version < GEGL_REQUIRED_MICRO)
 
330
  if (! sanity_check_version (gegl_major_version, GEGL_REQUIRED_MAJOR,
 
331
                              gegl_minor_version, GEGL_REQUIRED_MINOR,
 
332
                              gegl_micro_version, GEGL_REQUIRED_MICRO))
310
333
    {
311
334
      return g_strdup_printf
312
335
        ("GEGL version too old!\n\n"