? autom4te.cache
? help/C/gnome-terminal-C.omf.out
? help/ro/gnome-terminal-ro.omf.out
Index: src/gnome-terminal.glade2
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/gnome-terminal.glade2,v
retrieving revision 1.45
diff -u -r1.45 gnome-terminal.glade2
--- src/gnome-terminal.glade2	15 Feb 2004 20:25:35 -0000	1.45
+++ src/gnome-terminal.glade2	6 Apr 2004 08:38:01 -0000
@@ -143,6 +143,25 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkCheckButton" id="no-aa-without-render">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Disable font anti-aliasing if Render extension is not present</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
 		    <widget class="GtkHBox" id="font-hbox">
 		      <property name="visible">True</property>
 		      <property name="homogeneous">False</property>
Index: src/gnome-terminal.schemas.in
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/gnome-terminal.schemas.in,v
retrieving revision 1.35
diff -u -r1.35 gnome-terminal.schemas.in
--- src/gnome-terminal.schemas.in	13 Nov 2003 00:43:53 -0000	1.35
+++ src/gnome-terminal.schemas.in	6 Apr 2004 08:38:01 -0000
@@ -576,6 +576,21 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gnome-terminal/profiles/Default/no_aa_without_render</key>
+      <applyto>/apps/gnome-terminal/profiles/Default/no_aa_without_render</applyto>
+      <owner>gnome-terminal</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Whether to disable anti aliasing without render extension</short>
+         <long>
+	  If true, font anti aliasing will be disabled for X servers without the RENDER
+	  extension. This would make it much faster.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-terminal/profiles/Default/use_system_font</key>
       <applyto>/apps/gnome-terminal/profiles/Default/use_system_font</applyto>
       <owner>gnome-terminal</owner>
Index: src/profile-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/profile-editor.c,v
retrieving revision 1.48
diff -u -r1.48 profile-editor.c
--- src/profile-editor.c	14 Feb 2004 07:22:21 -0000	1.48
+++ src/profile-editor.c	6 Apr 2004 08:38:02 -0000
@@ -133,6 +133,8 @@
 
 static void       profile_editor_update_use_theme_colors     (GtkWidget       *widget,
                                                               TerminalProfile *profile);
+static void       profile_editor_update_no_aa_without_render (GtkWidget       *widget,
+                                                              TerminalProfile *profile);
 static void       profile_editor_update_use_system_font      (GtkWidget       *widget,
                                                               TerminalProfile *profile);
 static void       profile_editor_update_font                 (GtkWidget       *widget,
@@ -336,6 +338,9 @@
   if (mask->use_system_font)
     profile_editor_update_use_system_font (editor, profile);
 
+  if (mask->no_aa_without_render)
+    profile_editor_update_no_aa_without_render (editor, profile);
+
   if (mask->font)
     profile_editor_update_font (editor, profile);
   
@@ -729,6 +734,14 @@
 }
 
 static void
+no_aa_without_render_toggled (GtkWidget       *checkbutton,
+                         TerminalProfile *profile)
+{
+  terminal_profile_set_no_aa_without_render (profile,
+                                        gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
+}
+
+void
 use_system_font_toggled (GtkWidget       *checkbutton,
                          TerminalProfile *profile)
 {
@@ -1137,6 +1150,12 @@
                         G_CALLBACK (use_theme_colors_toggled),
                         profile);
       
+      w = glade_xml_get_widget (xml, "no-aa-without-render");
+      profile_editor_update_no_aa_without_render (editor, profile);
+      g_signal_connect (G_OBJECT (w), "toggled",
+                        G_CALLBACK (no_aa_without_render_toggled),
+                        profile);
+
       w = glade_xml_get_widget (xml, "system-font-checkbutton");
       profile_editor_update_use_system_font (editor, profile);
       g_signal_connect (G_OBJECT (w), "toggled",
@@ -1967,6 +1986,18 @@
 }
 
 static void
+profile_editor_update_no_aa_without_render (GtkWidget       *editor,
+                                       TerminalProfile *profile)
+{
+  GtkWidget *w;
+
+  w = profile_editor_get_widget (editor, "no-aa-without-render");
+  
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
+                                terminal_profile_get_no_aa_without_render (profile));
+}
+
+static void
 profile_editor_update_use_system_font (GtkWidget       *editor,
                                        TerminalProfile *profile)
 {
Index: src/terminal-profile.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-profile.c,v
retrieving revision 1.27
diff -u -r1.27 terminal-profile.c
--- src/terminal-profile.c	1 Oct 2003 00:06:17 -0000	1.27
+++ src/terminal-profile.c	6 Apr 2004 08:38:03 -0000
@@ -70,6 +70,7 @@
 #define KEY_USE_SYSTEM_FONT "use_system_font"
 #define KEY_USE_SKEY "use_skey"
 #define KEY_FONT "font"
+#define KEY_NO_AA_WITHOUT_RENDER "no_aa_without_render" 
 
 struct _TerminalProfilePrivate
 {
@@ -128,6 +129,7 @@
   guint scroll_background : 1;
   guint use_theme_colors : 1;
   guint use_system_font : 1;
+  guint no_aa_without_render : 1;
   guint use_skey : 1;
   guint forgotten : 1;
 };
@@ -290,6 +292,7 @@
   profile->priv->delete_binding = TERMINAL_ERASE_ESCAPE_SEQUENCE;
   profile->priv->use_theme_colors = TRUE;
   profile->priv->use_system_font = TRUE;
+  profile->priv->no_aa_without_render = TRUE;
   profile->priv->use_skey = TRUE;
   profile->priv->font = pango_font_description_new ();
   pango_font_description_set_family (profile->priv->font,
@@ -1412,6 +1415,14 @@
 }
 
 gboolean
+terminal_profile_get_no_aa_without_render (TerminalProfile *profile)
+{
+  g_return_val_if_fail (TERMINAL_IS_PROFILE (profile), FALSE);
+
+  return profile->priv->no_aa_without_render;
+}
+
+gboolean
 terminal_profile_get_use_system_font (TerminalProfile *profile)
 {
   g_return_val_if_fail (TERMINAL_IS_PROFILE (profile), FALSE);
@@ -1438,6 +1449,25 @@
   g_free (key);
 }
 
+void
+terminal_profile_set_no_aa_without_render (TerminalProfile *profile,
+                                      gboolean         setting)
+{
+  char *key;
+
+  RETURN_IF_NOTIFYING (profile);
+  
+  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
+                                  KEY_NO_AA_WITHOUT_RENDER);
+  
+  gconf_client_set_bool (profile->priv->conf,
+                         key,
+                         setting,
+                         NULL);
+
+  g_free (key);
+}
+
 gboolean
 terminal_profile_get_use_skey (TerminalProfile *profile)
 {
@@ -1981,6 +2011,7 @@
   UPDATE_STRING  (KEY_DELETE_BINDING,       delete_binding);
   UPDATE_BOOLEAN (KEY_USE_THEME_COLORS,     use_theme_colors);
   UPDATE_BOOLEAN (KEY_USE_SYSTEM_FONT,      use_system_font);
+  UPDATE_BOOLEAN (KEY_NO_AA_WITHOUT_RENDER,      no_aa_without_render);
   UPDATE_STRING  (KEY_FONT,                 font);
   
 #undef UPDATE_BOOLEAN
@@ -2127,6 +2158,7 @@
      UPDATE_STRING  (KEY_DELETE_BINDING,         delete_binding,         NULL);
      UPDATE_BOOLEAN (KEY_USE_THEME_COLORS,       use_theme_colors,       TRUE);
      UPDATE_BOOLEAN (KEY_USE_SYSTEM_FONT,        use_system_font,        TRUE);
+     UPDATE_BOOLEAN (KEY_NO_AA_WITHOUT_RENDER,      no_aa_without_render,	TRUE);
      UPDATE_STRING  (KEY_FONT,                   font,                   NULL);
    }
   
@@ -2862,6 +2894,14 @@
 
   g_free (key);
   key = gconf_concat_dir_and_key (profile_dir,
+                                  KEY_NO_AA_WITHOUT_RENDER);
+  gconf_client_set_bool (base_profile->priv->conf,
+                         key, base_profile->priv->no_aa_without_render,
+                         &err);
+  BAIL_OUT_CHECK ();
+
+  g_free (key);
+  key = gconf_concat_dir_and_key (profile_dir,
                                   KEY_FONT);
   s = pango_font_description_to_string (base_profile->priv->font);
   gconf_client_set_string (base_profile->priv->conf,
Index: src/terminal-profile.h
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-profile.h,v
retrieving revision 1.21
diff -u -r1.21 terminal-profile.h
--- src/terminal-profile.h	8 Dec 2002 05:00:25 -0000	1.21
+++ src/terminal-profile.h	6 Apr 2004 08:38:03 -0000
@@ -65,6 +65,7 @@
   unsigned int delete_binding : 1;
   unsigned int use_theme_colors : 1;
   unsigned int use_system_font : 1;
+  unsigned int no_aa_without_render : 1;
   unsigned int font : 1;
 } TerminalSettingMask;
 
@@ -183,6 +184,7 @@
 
 gboolean               terminal_profile_get_use_theme_colors      (TerminalProfile *profile);
 gboolean               terminal_profile_get_use_system_font       (TerminalProfile *profile);
+gboolean               terminal_profile_get_no_aa_without_render  (TerminalProfile *profile);
 gboolean               terminal_profile_get_use_skey              (TerminalProfile *profile);
 const PangoFontDescription* terminal_profile_get_font             (TerminalProfile *profile);
 
@@ -257,6 +259,9 @@
 void terminal_profile_set_use_system_font       (TerminalProfile        *profile,
 						 gboolean                setting);
 
+void terminal_profile_set_no_aa_without_render  (TerminalProfile        *profile,
+						 gboolean                setting);
+
 void terminal_profile_set_use_skey              (TerminalProfile        *profile,
 						 gboolean                setting);
 void terminal_profile_set_font                   (TerminalProfile            *profile,
Index: src/terminal-screen.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-screen.c,v
retrieving revision 1.87
diff -u -r1.87 terminal-screen.c
--- src/terminal-screen.c	9 Feb 2004 14:16:28 -0000	1.87
+++ src/terminal-screen.c	6 Apr 2004 08:38:03 -0000
@@ -558,6 +558,7 @@
   
   terminal_widget_set_delete_binding (term,
                                       terminal_profile_get_delete_binding (profile));
+
 }
 
 /**
@@ -737,7 +738,8 @@
                                        screen->priv->font_scale *
                                        pango_font_description_get_size (desc));
 
-      terminal_widget_set_pango_font (term, desc);
+      terminal_widget_set_pango_font (term, desc,
+      					terminal_profile_get_no_aa_without_render(profile));
 
       pango_font_description_free (desc);
     }
Index: src/terminal-widget-vte.c
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-widget-vte.c,v
retrieving revision 1.32
diff -u -r1.32 terminal-widget-vte.c
--- src/terminal-widget-vte.c	1 Oct 2003 00:06:17 -0000	1.32
+++ src/terminal-widget-vte.c	6 Apr 2004 08:38:03 -0000
@@ -24,6 +24,7 @@
 
 #include <string.h>
 #include <vte/vte.h>
+#include <gdk/gdkx.h>
 
 #define UNIMPLEMENTED /* g_warning (G_STRLOC": unimplemented") */
 
@@ -565,10 +566,28 @@
 
 void
 terminal_widget_set_pango_font (GtkWidget                  *widget,
-                                const PangoFontDescription *font_desc)
+                                const PangoFontDescription *font_desc,
+				gboolean no_aa_without_render)
 {
+  Display *dpy;
+  gboolean has_render;
+  int event_base, error_base;
+  
   g_return_if_fail (font_desc != NULL);
-  vte_terminal_set_font (VTE_TERMINAL (widget), font_desc);
+
+  dpy = gdk_x11_display_get_xdisplay(gdk_display_get_default());
+
+  has_render = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
+                 (XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0));
+
+  if (has_render || !no_aa_without_render) 
+    {
+      vte_terminal_set_font (VTE_TERMINAL (widget), font_desc);
+    } 
+  else 
+    {
+      vte_terminal_set_font_full (VTE_TERMINAL (widget), font_desc, VTE_ANTI_ALIAS_FORCE_DISABLE);
+    }
 }
 
 gboolean
Index: src/terminal-widget.h
===================================================================
RCS file: /cvs/gnome/gnome-terminal/src/terminal-widget.h,v
retrieving revision 1.8
diff -u -r1.8 terminal-widget.h
--- src/terminal-widget.h	3 Dec 2002 04:07:17 -0000	1.8
+++ src/terminal-widget.h	6 Apr 2004 08:38:04 -0000
@@ -156,7 +156,8 @@
                                           int         len);
 
 void terminal_widget_set_pango_font (GtkWidget                  *widget,
-                                     const PangoFontDescription *font_desc);
+                                     const PangoFontDescription *font_desc,
+				     gboolean 			anti_alias);
 
 gboolean terminal_widget_supports_pango_fonts (void);
 
