[Xfce4-commits] <terminal:master> Drop anti-alias preference.

Nick Schermer noreply at xfce.org
Wed Dec 19 21:54:04 CET 2012


Updating branch refs/heads/master
         to 88f342aa527d4da79cef8308595457c0e3491eae (commit)
       from 9c8f6b91a6922b2c4743a233359ecd59ff0f6ea8 (commit)

commit 88f342aa527d4da79cef8308595457c0e3491eae
Author: Nick Schermer <nick at xfce.org>
Date:   Tue Dec 18 20:14:55 2012 +0100

    Drop anti-alias preference.
    
    This is not supported (deprecated, removed in 0.3 branch)
    in vte. And why would you want ugly fonts anyway ;-).

 Terminal.glade                         |   16 +---------------
 terminal/terminal-preferences-dialog.c |   29 ++++++++++-------------------
 terminal/terminal-preferences.c        |   15 ---------------
 terminal/terminal-private.h            |    8 --------
 terminal/terminal-screen.c             |   17 -----------------
 5 files changed, 11 insertions(+), 74 deletions(-)

diff --git a/Terminal.glade b/Terminal.glade
index 5da4a6f..7f2da16 100644
--- a/Terminal.glade
+++ b/Terminal.glade
@@ -488,20 +488,6 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="font-anti-alias">
-                                <property name="label" translatable="yes">Enab_le anti-aliasing for the terminal font</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="tooltip_text" translatable="yes">Enable this option if you want Terminal to use anti-aliasing when rendering text in terminal windows. Disabling this option can impressively speed up terminal rendering performance and reduce the overall system load on slow systems.</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
                               <object class="GtkCheckButton" id="font-allow-bold">
                                 <property name="label" translatable="yes">Allow bold te_xt</property>
                                 <property name="visible">True</property>
@@ -512,7 +498,7 @@
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
-                                <property name="position">2</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
                           </object>
diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index bb1f85f..44d5543 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -88,21 +88,19 @@ terminal_preferences_dialog_init (TerminalPreferencesDialog *dialog)
   gchar            *file;
   ExoMutualBinding *binding;
   const gchar      *props_active[] = { "title-mode", "command-login-shell",
-                                    "command-update-records", "scrolling-single-line",
-                                    "scrolling-on-output", "scrolling-on-keystroke",
-                                    "scrolling-bar", "font-allow-bold",
-                                    "misc-menubar-default", "misc-toolbars-default",
-                                    "misc-borders-default", "color-selection-use-default",
-                                    "shortcuts-no-mnemonics", "shortcuts-no-menukey",
-                                    "binding-backspace", "binding-delete",
-                                    "background-mode", "background-image-style"
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-                                    , "font-anti-alias"
-#endif
+                                       "command-update-records", "scrolling-single-line",
+                                       "scrolling-on-output", "scrolling-on-keystroke",
+                                       "scrolling-bar", "font-allow-bold",
+                                       "misc-menubar-default", "misc-toolbars-default",
+                                       "misc-borders-default", "color-selection-use-default",
+                                       "shortcuts-no-mnemonics", "shortcuts-no-menukey",
+                                       "binding-backspace", "binding-delete",
+                                       "background-mode", "background-image-style"
                                     };
   const gchar      *props_color[] =  { "color-foreground", "color-cursor",
                                        "color-background", "tab-activity-color",
-                                       "color-selection" };
+                                       "color-selection"
+                                     };
 
   dialog->preferences = terminal_preferences_get ();
 
@@ -167,13 +165,6 @@ error:
   BIND_PROPERTIES ("tab-activity-timeout", "value");
   BIND_PROPERTIES ("background-darkness", "value");
 
-#if !TERMINAL_HAS_ANTI_ALIAS_SETTING
-  /* hide anti alias setting */
-  object = gtk_builder_get_object (GTK_BUILDER (dialog), "font-anti-alias");
-  terminal_return_if_fail (G_IS_OBJECT (object));
-  gtk_widget_hide (GTK_WIDGET (object));
-#endif
-
   /* reset comparibility button */
   object = gtk_builder_get_object (GTK_BUILDER (dialog), "reset-compatibility");
   terminal_return_if_fail (G_IS_OBJECT (object));
diff --git a/terminal/terminal-preferences.c b/terminal/terminal-preferences.c
index c14a881..4c89b83 100644
--- a/terminal/terminal-preferences.c
+++ b/terminal/terminal-preferences.c
@@ -101,9 +101,6 @@ enum
   PROP_COMMAND_UPDATE_RECORDS,
   PROP_COMMAND_LOGIN_SHELL,
   PROP_FONT_ALLOW_BOLD,
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-  PROP_FONT_ANTI_ALIAS,
-#endif
   PROP_FONT_NAME,
   PROP_MISC_ALWAYS_SHOW_TABS,
   PROP_MISC_BELL,
@@ -924,18 +921,6 @@ terminal_preferences_class_init (TerminalPreferencesClass *klass)
                             TRUE,
                             EXO_PARAM_READWRITE);
 
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-  /**
-   * TerminalPreferences:font-anti-alias:
-   **/
-  preferences_props[PROP_FONT_ANTI_ALIAS] =
-      g_param_spec_boolean ("font-anti-alias",
-                            "font-anti-alias",
-                            "FontAntiAlias",
-                            TRUE,
-                            EXO_PARAM_READWRITE);
-#endif
-
   /**
    * TerminalPreferences:font-name:
    **/
diff --git a/terminal/terminal-private.h b/terminal/terminal-private.h
index 1c69d4a..b354f62 100644
--- a/terminal/terminal-private.h
+++ b/terminal/terminal-private.h
@@ -24,14 +24,6 @@
 
 G_BEGIN_DECLS
 
-/* whether anti-alias is enabled in the application. this settings will
- * be removed in vte 1.0 and there is no other way to set this. */
-#ifndef NDEBUG
-#define TERMINAL_HAS_ANTI_ALIAS_SETTING (FALSE)
-#else
-#define TERMINAL_HAS_ANTI_ALIAS_SETTING (TRUE)
-#endif
-
 /* returns true if string contains text */
 #define IS_STRING(string) ((string) != NULL && *(string) != '\0')
 
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 1a4a8d2..16cf31f 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -287,7 +287,6 @@ terminal_screen_init (TerminalScreen *screen)
                     "swapped-signal::notify::color-palette15", G_CALLBACK (terminal_screen_update_colors), screen,
                     "swapped-signal::notify::color-palette16", G_CALLBACK (terminal_screen_update_colors), screen,
                     "swapped-signal::notify::font-allow-bold", G_CALLBACK (terminal_screen_update_font), screen,
-                    "swapped-signal::notify::font-anti-alias", G_CALLBACK (terminal_screen_update_font), screen,
                     "swapped-signal::notify::font-name", G_CALLBACK (terminal_screen_update_font), screen,
                     "swapped-signal::notify::misc-bell", G_CALLBACK (terminal_screen_update_misc_bell), screen,
                     "swapped-signal::notify::misc-cursor-blinks", G_CALLBACK (terminal_screen_update_misc_cursor_blinks), screen,
@@ -850,10 +849,6 @@ terminal_screen_update_colors (TerminalScreen *screen)
 static void
 terminal_screen_update_font (TerminalScreen *screen)
 {
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-  VteTerminalAntiAlias antialias;
-  gboolean             font_anti_alias;
-#endif
   gboolean             font_allow_bold;
   gchar               *font_name;
 
@@ -863,25 +858,13 @@ terminal_screen_update_font (TerminalScreen *screen)
 
   g_object_get (G_OBJECT (screen->preferences),
                 "font-allow-bold", &font_allow_bold,
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-                "font-anti-alias", &font_anti_alias,
-#endif
                 "font-name", &font_name,
                 NULL);
 
   if (G_LIKELY (font_name != NULL))
     {
       vte_terminal_set_allow_bold (VTE_TERMINAL (screen->terminal), font_allow_bold);
-
-#if TERMINAL_HAS_ANTI_ALIAS_SETTING
-      antialias = font_anti_alias
-                ? VTE_ANTI_ALIAS_USE_DEFAULT
-                : VTE_ANTI_ALIAS_FORCE_DISABLE;
-      vte_terminal_set_font_from_string_full (VTE_TERMINAL (screen->terminal),
-                                              font_name, antialias);
-#else
       vte_terminal_set_font_from_string (VTE_TERMINAL (screen->terminal), font_name);
-#endif
 
       g_free (font_name);
     }


More information about the Xfce4-commits mailing list