Commit 3577d017 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod
Browse files

Allow NULL font argument. Can be used to set antialias without setting

2007-11-06  Behdad Esfahbod  <behdad@gnome.org>

        * src/vte.c (vte_terminal_set_font_from_string_full): Allow NULL
        font argument.  Can be used to set antialias without setting font.

        * src/vteapp.c (main): Fix antialias handling which was borked when
        moving to GOption.


svn path=/trunk/; revision=1968
parent abc1e6a1
2007-11-06 Behdad Esfahbod <behdad@gnome.org>
* src/vte.c (vte_terminal_set_font_from_string_full): Allow NULL
font argument. Can be used to set antialias without setting font.
* src/vteapp.c (main): Fix antialias handling which was borked when
moving to GOption.
2007-11-06 Behdad Esfahbod <behdad@gnome.org>
Bug 142640 FcConfigSubstitute in place of _vte_fc_defaults_from_gtk
......
......@@ -6899,11 +6899,11 @@ void
vte_terminal_set_font_from_string_full(VteTerminal *terminal, const char *name,
VteTerminalAntiAlias antialias)
{
PangoFontDescription *font_desc;
PangoFontDescription *font_desc = NULL;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
g_return_if_fail(name != NULL);
font_desc = pango_font_description_from_string(name);
if (name)
font_desc = pango_font_description_from_string(name);
vte_terminal_set_font_full(terminal, font_desc, antialias);
pango_font_description_free(font_desc);
}
......
......@@ -431,8 +431,8 @@ main(int argc, char **argv)
debug = FALSE, dingus = FALSE, dbuffer = TRUE,
console = FALSE, scroll = FALSE, keep = FALSE,
icon_title = FALSE, shell = TRUE, highlight_set = FALSE,
cursor_set = FALSE, reverse = FALSE, use_geometry_hints = TRUE;
VteTerminalAntiAlias antialias = VTE_ANTI_ALIAS_USE_DEFAULT;
cursor_set = FALSE, reverse = FALSE, use_geometry_hints = TRUE,
antialias = TRUE;
char *geometry = NULL;
gint lines = 100;
const char *message = "Launching interactive shell...\r\n";
......@@ -443,7 +443,7 @@ main(int argc, char **argv)
GdkColor fore, back, tint, highlight, cursor;
const GOptionEntry options[]={
{
"antialias", 'A', 0,
"antialias", 'A', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &antialias,
"Disable the use of anti-aliasing", NULL
},
......@@ -480,7 +480,7 @@ main(int argc, char **argv)
{
"audible", 'a', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &audible,
"Switch between the audible and visible terminal bell",
"Use visible, instead of audible, terminal bell",
NULL
},
{
......@@ -721,10 +721,8 @@ main(int argc, char **argv)
}
/* Set the default font. */
if (font) {
vte_terminal_set_font_from_string_full(terminal,
font, antialias);
}
vte_terminal_set_font_from_string_full(terminal, font,
antialias ? VTE_ANTI_ALIAS_USE_DEFAULT : VTE_ANTI_ALIAS_FORCE_DISABLE);
/* Match "abcdefg". */
vte_terminal_match_add(terminal, "abcdefg");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment