gimp r24690 - in trunk: . app app/gui



Author: neo
Date: Wed Jan 23 12:22:09 2008
New Revision: 24690
URL: http://svn.gnome.org/viewvc/gimp?rev=24690&view=rev

Log:
2008-01-23  Sven Neumann  <sven gimp org>

	* app/sanity.c 
	* app/gui/gui.c (gui_sanity_check): minor cleanup.



Modified:
   trunk/ChangeLog
   trunk/app/gui/gui.c
   trunk/app/sanity.c

Modified: trunk/app/gui/gui.c
==============================================================================
--- trunk/app/gui/gui.c	(original)
+++ trunk/app/gui/gui.c	Wed Jan 23 12:22:09 2008
@@ -268,15 +268,13 @@
 static gchar *
 gui_sanity_check (void)
 {
-  const gchar *mismatch;
-
 #define GTK_REQUIRED_MAJOR 2
 #define GTK_REQUIRED_MINOR 12
 #define GTK_REQUIRED_MICRO 1
 
-  mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
-                                GTK_REQUIRED_MINOR,
-                                GTK_REQUIRED_MICRO);
+  const gchar *mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
+                                             GTK_REQUIRED_MINOR,
+                                             GTK_REQUIRED_MICRO);
 
   if (mismatch)
     {

Modified: trunk/app/sanity.c
==============================================================================
--- trunk/app/sanity.c	(original)
+++ trunk/app/sanity.c	Wed Jan 23 12:22:09 2008
@@ -89,15 +89,13 @@
 static gchar *
 sanity_check_glib (void)
 {
-  const gchar *mismatch;
-
 #define GLIB_REQUIRED_MAJOR 2
 #define GLIB_REQUIRED_MINOR 14
 #define GLIB_REQUIRED_MICRO 1
 
-  mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
-                                 GLIB_REQUIRED_MINOR,
-                                 GLIB_REQUIRED_MICRO);
+  const gchar *mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
+                                              GLIB_REQUIRED_MINOR,
+                                              GLIB_REQUIRED_MICRO);
 
   if (mismatch)
     {
@@ -124,21 +122,20 @@
 static gchar *
 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_MINOR 18
 #define PANGO_REQUIRED_MICRO 0
 
-  mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
-                                  PANGO_REQUIRED_MINOR,
-                                  PANGO_REQUIRED_MICRO);
+  const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
+                                               PANGO_REQUIRED_MINOR,
+                                               PANGO_REQUIRED_MICRO);
 
   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
         ("%s\n\n"
          "GIMP requires Pango version %d.%d.%d or later.\n"
@@ -162,10 +159,7 @@
 static gchar *
 sanity_check_fontconfig (void)
 {
-  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;
+  const gint fc_version = FcGetVersion ();
 
 #define FC_REQUIRED_MAJOR 2
 #define FC_REQUIRED_MINOR 2
@@ -175,6 +169,10 @@
                     (FC_REQUIRED_MINOR *   100) +
                     (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
         ("The Fontconfig version being used is too old!\n\n"
          "GIMP requires Fontconfig version %d.%d.%d or later.\n"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]