app/sanity.c minor cleanup.
2008-01-23 Sven Neumann <sven@gimp.org> * app/sanity.c * app/gui/gui.c (gui_sanity_check): minor cleanup. svn path=/trunk/; revision=24690
This commit is contained in:

committed by
Sven Neumann

parent
73172dce3b
commit
c9928b573f
@ -1,7 +1,12 @@
|
|||||||
|
2008-01-23 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/sanity.c
|
||||||
|
* app/gui/gui.c (gui_sanity_check): minor cleanup.
|
||||||
|
|
||||||
2008-01-23 Sven Neumann <sven@gimp.org>
|
2008-01-23 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/dialogs/about-dialog.c (about_dialog_create): removed
|
* app/dialogs/about-dialog.c (about_dialog_create): removed
|
||||||
obsolete version check here.
|
obsolete version check.
|
||||||
|
|
||||||
2008-01-23 Sven Neumann <sven@gimp.org>
|
2008-01-23 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
@ -268,15 +268,13 @@ gui_post_init (Gimp *gimp)
|
|||||||
static gchar *
|
static gchar *
|
||||||
gui_sanity_check (void)
|
gui_sanity_check (void)
|
||||||
{
|
{
|
||||||
const gchar *mismatch;
|
|
||||||
|
|
||||||
#define GTK_REQUIRED_MAJOR 2
|
#define GTK_REQUIRED_MAJOR 2
|
||||||
#define GTK_REQUIRED_MINOR 12
|
#define GTK_REQUIRED_MINOR 12
|
||||||
#define GTK_REQUIRED_MICRO 1
|
#define GTK_REQUIRED_MICRO 1
|
||||||
|
|
||||||
mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
|
const gchar *mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
|
||||||
GTK_REQUIRED_MINOR,
|
GTK_REQUIRED_MINOR,
|
||||||
GTK_REQUIRED_MICRO);
|
GTK_REQUIRED_MICRO);
|
||||||
|
|
||||||
if (mismatch)
|
if (mismatch)
|
||||||
{
|
{
|
||||||
|
32
app/sanity.c
32
app/sanity.c
@ -89,15 +89,13 @@ sanity_check_gimp (void)
|
|||||||
static gchar *
|
static gchar *
|
||||||
sanity_check_glib (void)
|
sanity_check_glib (void)
|
||||||
{
|
{
|
||||||
const gchar *mismatch;
|
|
||||||
|
|
||||||
#define GLIB_REQUIRED_MAJOR 2
|
#define GLIB_REQUIRED_MAJOR 2
|
||||||
#define GLIB_REQUIRED_MINOR 14
|
#define GLIB_REQUIRED_MINOR 14
|
||||||
#define GLIB_REQUIRED_MICRO 1
|
#define GLIB_REQUIRED_MICRO 1
|
||||||
|
|
||||||
mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
|
const gchar *mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
|
||||||
GLIB_REQUIRED_MINOR,
|
GLIB_REQUIRED_MINOR,
|
||||||
GLIB_REQUIRED_MICRO);
|
GLIB_REQUIRED_MICRO);
|
||||||
|
|
||||||
if (mismatch)
|
if (mismatch)
|
||||||
{
|
{
|
||||||
@ -124,21 +122,20 @@ sanity_check_glib (void)
|
|||||||
static gchar *
|
static gchar *
|
||||||
sanity_check_pango (void)
|
sanity_check_pango (void)
|
||||||
{
|
{
|
||||||
gint pango_major_version = pango_version () / 100 / 100;
|
|
||||||
gint pango_minor_version = pango_version () / 100 % 100;
|
|
||||||
gint pango_micro_version = pango_version () % 100;
|
|
||||||
const gchar *mismatch;
|
|
||||||
|
|
||||||
#define PANGO_REQUIRED_MAJOR 1
|
#define PANGO_REQUIRED_MAJOR 1
|
||||||
#define PANGO_REQUIRED_MINOR 18
|
#define PANGO_REQUIRED_MINOR 18
|
||||||
#define PANGO_REQUIRED_MICRO 0
|
#define PANGO_REQUIRED_MICRO 0
|
||||||
|
|
||||||
mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
|
const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
|
||||||
PANGO_REQUIRED_MINOR,
|
PANGO_REQUIRED_MINOR,
|
||||||
PANGO_REQUIRED_MICRO);
|
PANGO_REQUIRED_MICRO);
|
||||||
|
|
||||||
if (mismatch)
|
if (mismatch)
|
||||||
{
|
{
|
||||||
|
const gint pango_major_version = pango_version () / 100 / 100;
|
||||||
|
const gint pango_minor_version = pango_version () / 100 % 100;
|
||||||
|
const gint pango_micro_version = pango_version () % 100;
|
||||||
|
|
||||||
return g_strdup_printf
|
return g_strdup_printf
|
||||||
("%s\n\n"
|
("%s\n\n"
|
||||||
"GIMP requires Pango version %d.%d.%d or later.\n"
|
"GIMP requires Pango version %d.%d.%d or later.\n"
|
||||||
@ -162,10 +159,7 @@ sanity_check_pango (void)
|
|||||||
static gchar *
|
static gchar *
|
||||||
sanity_check_fontconfig (void)
|
sanity_check_fontconfig (void)
|
||||||
{
|
{
|
||||||
gint fc_version = FcGetVersion ();
|
const gint fc_version = FcGetVersion ();
|
||||||
gint fc_major_version = fc_version / 100 / 100;
|
|
||||||
gint fc_minor_version = fc_version / 100 % 100;
|
|
||||||
gint fc_micro_version = fc_version % 100;
|
|
||||||
|
|
||||||
#define FC_REQUIRED_MAJOR 2
|
#define FC_REQUIRED_MAJOR 2
|
||||||
#define FC_REQUIRED_MINOR 2
|
#define FC_REQUIRED_MINOR 2
|
||||||
@ -175,6 +169,10 @@ sanity_check_fontconfig (void)
|
|||||||
(FC_REQUIRED_MINOR * 100) +
|
(FC_REQUIRED_MINOR * 100) +
|
||||||
(FC_REQUIRED_MICRO * 1)))
|
(FC_REQUIRED_MICRO * 1)))
|
||||||
{
|
{
|
||||||
|
const gint fc_major_version = fc_version / 100 / 100;
|
||||||
|
const gint fc_minor_version = fc_version / 100 % 100;
|
||||||
|
const gint fc_micro_version = fc_version % 100;
|
||||||
|
|
||||||
return g_strdup_printf
|
return g_strdup_printf
|
||||||
("The Fontconfig version being used is too old!\n\n"
|
("The Fontconfig version being used is too old!\n\n"
|
||||||
"GIMP requires Fontconfig version %d.%d.%d or later.\n"
|
"GIMP requires Fontconfig version %d.%d.%d or later.\n"
|
||||||
|
Reference in New Issue
Block a user