[Xfce4-commits] r30094 - terminal/trunk/terminal

Nick Schermer nick at xfce.org
Sat Jun 27 21:29:41 CEST 2009


Author: nick
Date: 2009-06-27 19:29:41 +0000 (Sat, 27 Jun 2009)
New Revision: 30094

Modified:
   terminal/trunk/terminal/terminal-preferences-dialog.c
   terminal/trunk/terminal/terminal-preferences.c
   terminal/trunk/terminal/terminal-private.h
   terminal/trunk/terminal/terminal-screen.c
Log:
Remove anti-aliasing setting.
    
This setting is deprecated in vte since version 0.19.1 and
will be removed in vte 1.0. Unfortunately there is no other
way to set this property at the moment, so we disable it.


Modified: terminal/trunk/terminal/terminal-preferences-dialog.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences-dialog.c	2009-06-27 19:28:42 UTC (rev 30093)
+++ terminal/trunk/terminal/terminal-preferences-dialog.c	2009-06-27 19:29:41 UTC (rev 30094)
@@ -29,6 +29,7 @@
 #include <terminal/terminal-preferences-dialog.h>
 #include <terminal/terminal-shortcut-editor.h>
 #include <terminal/terminal-stock.h>
+#include <terminal/terminal-private.h>
 
 
 
@@ -390,6 +391,7 @@
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
   gtk_widget_show (button);
 
+#if TERMINAL_HAS_ANTI_ALIAS_SETTING
   button = gtk_check_button_new_with_mnemonic (_("Enable anti-aliasing for the terminal font"));
   exo_mutual_binding_new (G_OBJECT (dialog->preferences), "font-anti-alias", G_OBJECT (button), "active");
   terminal_gtk_widget_set_tooltip (button,
@@ -399,6 +401,7 @@
                                      "the overall system load on slow systems."));
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
   gtk_widget_show (button);
+#endif
 
   button = gtk_check_button_new_with_mnemonic (_("Allow bold text"));
   exo_mutual_binding_new (G_OBJECT (dialog->preferences), "font-allow-bold", G_OBJECT (button), "active");

Modified: terminal/trunk/terminal/terminal-preferences.c
===================================================================
--- terminal/trunk/terminal/terminal-preferences.c	2009-06-27 19:28:42 UTC (rev 30093)
+++ terminal/trunk/terminal/terminal-preferences.c	2009-06-27 19:29:41 UTC (rev 30094)
@@ -102,7 +102,9 @@
   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,
@@ -965,6 +967,7 @@
                                                          TRUE,
                                                          EXO_PARAM_READWRITE));
 
+#if TERMINAL_HAS_ANTI_ALIAS_SETTING
   /**
    * TerminalPreferences:font-anti-alias:
    **/
@@ -975,6 +978,7 @@
                                                          "FontAntiAlias",
                                                          TRUE,
                                                          EXO_PARAM_READWRITE));
+#endif
 
   /**
    * TerminalPreferences:font-name:

Modified: terminal/trunk/terminal/terminal-private.h
===================================================================
--- terminal/trunk/terminal/terminal-private.h	2009-06-27 19:28:42 UTC (rev 30093)
+++ terminal/trunk/terminal/terminal-private.h	2009-06-27 19:29:41 UTC (rev 30094)
@@ -25,6 +25,10 @@
 
 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. */
+#define TERMINAL_HAS_ANTI_ALIAS_SETTING (FALSE)
+
 /* support macros for debugging */
 #ifndef NDEBUG
 #define _terminal_assert(expr)                  g_assert (expr)

Modified: terminal/trunk/terminal/terminal-screen.c
===================================================================
--- terminal/trunk/terminal/terminal-screen.c	2009-06-27 19:28:42 UTC (rev 30093)
+++ terminal/trunk/terminal/terminal-screen.c	2009-06-27 19:29:41 UTC (rev 30094)
@@ -678,26 +678,35 @@
 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;
-  gboolean             font_anti_alias;
   gchar               *font_name;
 
   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_allow_bold (VTE_TERMINAL (screen->terminal), font_allow_bold);
       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