]> www.fi.muni.cz Git - evince.git/blobdiff - properties/ev-properties-view.c
Fixes bug #542924. Makes enums static to fix Solaris build.
[evince.git] / properties / ev-properties-view.c
index 0df238aaba8ee201e8adc4a7cfd95f4f732b1635..4162fddd3dc8bbe8049c6d3f92e6ba1cbfbfba3d 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkversion.h>
 #include <glade/glade.h>
 #include <time.h>
 #include <sys/time.h>
 #include <glade/glade.h>
 #include <time.h>
 #include <sys/time.h>
@@ -193,7 +194,7 @@ set_property (GladeXML *xml, Property property, const char *text)
        g_free (valid_text);
 }
 
        g_free (valid_text);
 }
 
-#if HAVE_GTK_PAPER_SIZE_GET_PAPER_SIZES
+#if GTK_CHECK_VERSION (2, 11, 0)
 static GtkUnit
 get_default_user_units (void)
 {
 static GtkUnit
 get_default_user_units (void)
 {
@@ -215,10 +216,12 @@ get_default_user_units (void)
                return GTK_UNIT_MM;  /* metric */
 #endif
 
                return GTK_UNIT_MM;  /* metric */
 #endif
 
+       if (strcmp (e, "default:mm") == 0)
+               return GTK_UNIT_MM;
        if (strcmp (e, "default:inch") == 0)
                return GTK_UNIT_INCH;
        if (strcmp (e, "default:inch") == 0)
                return GTK_UNIT_INCH;
-       else if (strcmp (e, "default:mm") == 0)
-               g_warning ("Whoever translated default:mm did so wrongly.\n");
+       
+       g_warning ("Whoever translated default:mm did so wrongly.\n");
                                
        return GTK_UNIT_MM;
 }
                                
        return GTK_UNIT_MM;
 }
@@ -296,7 +299,7 @@ ev_regular_paper_size (const EvDocumentInfo *info)
        
        return exact_size;
 }
        
        return exact_size;
 }
-#else
+#else /* ! GTK 2.11.0 */
 /*
  * All values are in mm. 
  * Source: http://en.wikipedia.org/wiki/Paper_size
 /*
  * All values are in mm. 
  * Source: http://en.wikipedia.org/wiki/Paper_size
@@ -430,7 +433,7 @@ ev_regular_paper_size (const EvDocumentInfo *info)
        } else
                return exact_size;
 }
        } else
                return exact_size;
 }
-#endif /* HAVE_GTK_PAPER_SIZE_GET_PAPER_SIZES */
+#endif /* GTK 2.11.0 */
 
 void
 ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo *info)
 
 void
 ev_properties_view_set_info (EvPropertiesView *properties, const EvDocumentInfo *info)