font chooser: Align level value names
authorMatthias Clasen <mclasen@redhat.com>
Sun, 1 Apr 2018 01:01:47 +0000 (21:01 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 1 Apr 2018 01:02:51 +0000 (21:02 -0400)
In the backport, I used the plural for variations, and that
is a better name, so use it here too.

gtk/gtkfontchooser.h
gtk/gtkfontchooserwidget.c

index 204c6ec49af35e339ea5fb7838d501e113893e96..d04026ba37f014b60078bef919b1c24a16806ac5 100644 (file)
@@ -49,7 +49,7 @@ typedef gboolean (*GtkFontFilterFunc) (const PangoFontFamily *family,
  * @GTK_FONT_CHOOSER_LEVEL_FAMILY: Allow selecting a font family
  * @GTK_FONT_CHOOSER_LEVEL_STYLE: Allow selecting a specific font face
  * @GTK_FONT_CHOOSER_LEVEL_SIZE: Allow selecting a specific font size
- * @GTK_FONT_CHOOSER_LEVEL_VARIATION: Allow changing OpenType font variation axes
+ * @GTK_FONT_CHOOSER_LEVEL_VARIATIONS: Allow changing OpenType font variation axes
  * @GTK_FONT_CHOOSER_LEVEL_FEATURES: Allow selecting specific OpenType font features
  *
  * This enumeration specifies the granularity of font selection
@@ -59,11 +59,11 @@ typedef gboolean (*GtkFontFilterFunc) (const PangoFontFamily *family,
  * ignore unknown values.
  */
 typedef enum {
-  GTK_FONT_CHOOSER_LEVEL_FAMILY    = 0,
-  GTK_FONT_CHOOSER_LEVEL_STYLE     = 1 << 0,
-  GTK_FONT_CHOOSER_LEVEL_SIZE      = 1 << 1,
-  GTK_FONT_CHOOSER_LEVEL_VARIATION = 1 << 2,
-  GTK_FONT_CHOOSER_LEVEL_FEATURES  = 1 << 3
+  GTK_FONT_CHOOSER_LEVEL_FAMILY     = 0,
+  GTK_FONT_CHOOSER_LEVEL_STYLE      = 1 << 0,
+  GTK_FONT_CHOOSER_LEVEL_SIZE       = 1 << 1,
+  GTK_FONT_CHOOSER_LEVEL_VARIATIONS = 1 << 2,
+  GTK_FONT_CHOOSER_LEVEL_FEATURES   = 1 << 3
 } GtkFontChooserLevel;
 
 #define GTK_TYPE_FONT_CHOOSER                  (gtk_font_chooser_get_type ())
index bd08336b3d2ea8012d28a2474bbb7361a90ba060..ada82ac78cf3ebbc90770e71718c6312dfb72156 100644 (file)
@@ -865,8 +865,7 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *fontchooser)
   priv->font_desc = pango_font_description_new ();
   priv->level = GTK_FONT_CHOOSER_LEVEL_FAMILY |
                 GTK_FONT_CHOOSER_LEVEL_STYLE |
-                GTK_FONT_CHOOSER_LEVEL_SIZE |
-                GTK_FONT_CHOOSER_LEVEL_VARIATION;
+                GTK_FONT_CHOOSER_LEVEL_SIZE;
 
   /* Set default preview text */
   gtk_entry_set_text (GTK_ENTRY (priv->preview), priv->preview_text);
@@ -1643,7 +1642,7 @@ gtk_font_chooser_widget_update_font_variations (GtkFontChooserWidget *fontchoose
   g_hash_table_foreach (priv->axes, axis_remove, NULL);
   g_hash_table_remove_all (priv->axes);
 
-  if ((priv->level & GTK_FONT_CHOOSER_LEVEL_VARIATION) == 0)
+  if ((priv->level & GTK_FONT_CHOOSER_LEVEL_VARIATIONS) == 0)
     return FALSE;
 
   pango_font = pango_context_load_font (gtk_widget_get_pango_context (GTK_WIDGET (fontchooser)),