Commit bb252866 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

don't disable use of deprecated APIs unless asked to do so. add Meta case

* configure.in: don't disable use of deprecated APIs unless asked to do so.
* src/keymap.c(_vte_keymap_GDK_space): add Meta case (gafton).
* src/vtefc.c(_vte_fc_width_from_pango_stretch): add.
* src/vtefc.c(_vte_fc_transcribe_from_pango_font_description): handle
  PangoStretch characteristics using _vte_fc_width_from_pango_stretch.
* src/vteregex.c: add random comments.
* src/vte.c(VteTerminal): track the "xn" terminal attribute.
parent 76d50af1
2004-04-18 nalin
* configure.in: don't disable use of deprecated APIs unless asked
to do so.
* src/keymap.c(_vte_keymap_GDK_space): add Meta case (gafton).
* src/vtefc.c(_vte_fc_width_from_pango_stretch): add.
* src/vtefc.c(_vte_fc_transcribe_from_pango_font_description): handle
PangoStretch characteristics using _vte_fc_width_from_pango_stretch.
* src/vteregex.c: add random comments.
* src/vte.c(VteTerminal): track the "xn" terminal attribute.
2004-04-10 Guntupalli Karunakar <karunakar@freedomink.org>
* configure.in: Added "gu" (Gujarati) to ALL_LINGUAS.
......@@ -15,8 +25,8 @@
* configure.in: Added "pa" for Punjabi to ALL_LINGUAS.
2004-02-07 Robert Sedak <robert.sedak@sk.htnet.hr>
* configure.in: Added "hr" (Croatian) to ALL_LINGUAS.
* configure.in: Added "hr" (Croatian) to ALL_LINGUAS.
2004-02-02 Martin Kretzschmar <m_kretzschmar@gmx.net>
......@@ -255,7 +265,7 @@
wrapper (bug #119066).
2003-08-05 nalin
* vte.c(vte_sequence_handler_decset_internal,
* src/vte.c(vte_sequence_handler_decset_internal,
vte_sequence_handler_window_manipulation): include the widget's padding
widths in resize requests (bug #119141).
......
......@@ -12,6 +12,9 @@ forcetag:
reallytag:
cvs tag -cR $(CVSTAG) .
up:
cvs up -dP
tag:
$(top_srcdir)/autogen.sh
$(MAKE) reallytag
......
......@@ -211,11 +211,14 @@ AC_DEFINE(_XOPEN_SOURCE_EXTENDED,1,[Needed to get declarations for msg_control a
AC_DEFINE(_XOPEN_SOURCE,1,[Needed to get declarations for msg_control and msg_controllen on Solaris])
AC_DEFINE(__EXTENSIONS__,1,[Needed to get declarations for msg_control and msg_controllen on Solaris])
AC_ARG_ENABLE(deprecation,[AC_HELP_STRING(--enable-deprecation,prohibit VTE from using deprecated GLib/Pango/GDK/GTK+ features)],usedeprecation=$enableval,usedeprecation=no)
if test "$usedeprecation" = yes ; then
AC_DEFINE(G_DISABLE_DEPRECATED,1,[Disable deprecated GLib features.])
AC_DEFINE(GDK_DISABLE_DEPRECATED,1,[Disable deprecated GDK features.])
AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1,[Disable deprecated gdk-pixbuf features.])
AC_DEFINE(GTK_DISABLE_DEPRECATED,1,[Disable deprecated GTK+ features.])
AC_DEFINE(PANGO_DISABLE_DEPRECATED,1,[Disable deprecated Pango features.])
fi
# Miscellaneous definitions.
AC_DEFINE(VTE_UTF8_BPC,6,[Maximum number of bytes used per UTF-8 character.])
......
......@@ -24,20 +24,20 @@ This should not be accessed directly.
</para>
<!-- ##### FUNCTION vte_reaper_get ##### -->
<!-- ##### SIGNAL VteReaper::child-exited ##### -->
<para>
</para>
@Returns:
@vtereaper: the object which received the signal.
@arg1: the process ID of the exited child.
@arg2: the status of the exited child, as returned by #waitpid.
<!-- ##### SIGNAL VteReaper::child-exited ##### -->
<!-- ##### FUNCTION vte_reaper_get ##### -->
<para>
</para>
@vtereaper: the object which received the signal.
@arg1: the process ID of the exited child.
@arg2: the status of the exited child, as returned by #waitpid.
@Returns:
This diff is collapsed.
......@@ -97,6 +97,9 @@ struct _vte_keymap_entry {
/* Normal keys unaffected by modes. */
static struct _vte_keymap_entry _vte_keymap_GDK_space[] = {
/* Meta+space = ESC+" " */
{cursor_all, keypad_all, fkey_all,
VTE_META_MASK, _VTE_CAP_ESC " ", 2, NULL},
/* Control+space = NUL */
{cursor_all, keypad_all, fkey_all, GDK_CONTROL_MASK, "\0", 1, NULL},
/* Regular space. */
......
......@@ -198,6 +198,16 @@ update_contents(AtkObject *obj, GtkWidget *widget)
}
if (GTK_IS_LABEL(widget)) {
gtk_label_set_text(GTK_LABEL(widget), s->str);
gtk_label_set_selectable(GTK_LABEL(widget),
atk_text_get_n_selections(ATK_TEXT(obj)) > 0);
if (gtk_label_get_selectable(GTK_LABEL(widget))) {
int selection_start, selection_end;
atk_text_get_selection(ATK_TEXT(obj), 0,
&selection_start,
&selection_end);
gtk_label_select_region(GTK_LABEL(widget),
selection_start, selection_end);
}
}
g_string_free(s, TRUE);
}
......@@ -272,6 +282,12 @@ text_caret_moved(AtkObject *obj, gint offset, gpointer data)
update_contents(obj, GTK_WIDGET(data));
}
static void
text_selection_changed(AtkObject *obj, gpointer data)
{
update_contents(obj, GTK_WIDGET(data));
}
/* Wrapper versions. */
static void
terminal_init(GtkWidget **terminal)
......@@ -399,6 +415,8 @@ main(int argc, char **argv)
G_CALLBACK(text_changed_delete), label);
g_signal_connect(G_OBJECT(obj), "text-caret-moved",
G_CALLBACK(text_caret_moved), label);
g_signal_connect(G_OBJECT(obj), "text-selection-changed",
G_CALLBACK(text_selection_changed), label);
count = atk_text_get_character_count(ATK_TEXT(obj));
if (count > 0) {
......
......@@ -174,6 +174,7 @@ struct _VteTerminalPrivate {
gboolean am;
gboolean bw;
gboolean ul;
gboolean xn;
} flags;
int keypad_mode, cursor_mode; /* these would be VteKeymodes, but we
need to guarantee its type */
......@@ -10774,6 +10775,9 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
terminal->pvt->flags.ul = _vte_termcap_find_boolean(terminal->pvt->termcap,
terminal->pvt->emulation,
"ul");
terminal->pvt->flags.xn = _vte_termcap_find_boolean(terminal->pvt->termcap,
terminal->pvt->emulation,
"xn");
/* Resize to the given default. */
columns = _vte_termcap_find_numeric(terminal->pvt->termcap,
......@@ -11013,6 +11017,7 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass)
pvt->flags.am = FALSE;
pvt->flags.bw = FALSE;
pvt->flags.ul = FALSE;
pvt->flags.xn = FALSE;
pvt->keypad_mode = VTE_KEYMODE_NORMAL;
pvt->cursor_mode = VTE_KEYMODE_NORMAL;
pvt->sun_fkey_mode = FALSE;
......
/*
* Copyright (C) 2003 Red Hat, Inc.
* Copyright (C) 2003,2004 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or modify it under
* the terms of the GNU Library General Public License as published by
......@@ -46,7 +46,7 @@ _vte_fc_weight_from_pango_weight(int weight)
}
static int
_vte_fc_slant_from_pango_style(int style)
_vte_fc_slant_from_pango_style(PangoStyle style)
{
switch (style) {
case PANGO_STYLE_NORMAL:
......@@ -62,6 +62,41 @@ _vte_fc_slant_from_pango_style(int style)
return FC_SLANT_ROMAN;
}
static int
_vte_fc_width_from_pango_stretch(PangoStretch stretch)
{
switch (stretch) {
case PANGO_STRETCH_ULTRA_CONDENSED:
return 60;
break;
case PANGO_STRETCH_EXTRA_CONDENSED:
return 70;
break;
case PANGO_STRETCH_CONDENSED:
return 80;
break;
case PANGO_STRETCH_SEMI_CONDENSED:
return 90;
break;
case PANGO_STRETCH_NORMAL:
return 100;
break;
case PANGO_STRETCH_SEMI_EXPANDED:
return 105;
break;
case PANGO_STRETCH_EXPANDED:
return 120;
break;
case PANGO_STRETCH_EXTRA_EXPANDED:
return 150;
break;
case PANGO_STRETCH_ULTRA_EXPANDED:
return 200;
break;
}
return 100;
}
static void
_vte_fc_transcribe_from_pango_font_description(GtkWidget *widget,
FcPattern *pattern,
......@@ -75,7 +110,9 @@ _vte_fc_transcribe_from_pango_font_description(GtkWidget *widget,
double size = 10.0;
int pango_mask;
PangoContext *context;
int weight, style;
PangoWeight weight;
PangoStyle style;
PangoStretch stretch;
if (font_desc == NULL) {
return;
......@@ -121,6 +158,12 @@ _vte_fc_transcribe_from_pango_font_description(GtkWidget *widget,
_vte_fc_weight_from_pango_weight(weight));
}
if (pango_mask & PANGO_FONT_MASK_STRETCH) {
stretch = pango_font_description_get_stretch(font_desc);
FcPatternAddInteger(pattern, FC_WIDTH,
_vte_fc_width_from_pango_stretch(stretch));
}
if (pango_mask & PANGO_FONT_MASK_STYLE) {
style = pango_font_description_get_style(font_desc);
FcPatternAddInteger(pattern, FC_SLANT,
......
......@@ -47,6 +47,9 @@ compare_matches(gconstpointer a, gconstpointer b)
return B->rm_eo - A->rm_eo;
}
/* Sort match structures first by starting position, and then by ending
* position. We do this because some expression matching APIs sort their
* results differently, or just plain don't sort them. */
static void
_vte_regex_sort_matches(struct _vte_regex_match *matches, gsize n_matches)
{
......@@ -64,6 +67,9 @@ _vte_regex_sort_matches(struct _vte_regex_match *matches, gsize n_matches)
#if defined(USE_GNU_REGEX)
/* GNU regex-based matching. The GNU regex library also provides POSIX
* workalikes, so I don't see much of a win from using this chunk of code. */
struct _vte_regex {
struct re_pattern_buffer buffer;
};
......@@ -126,6 +132,10 @@ _vte_regex_exec(struct _vte_regex *regex, const char *string,
#elif defined(USE_PCRE)
/* PCRE-based matching. In addition to not being "real" regexps, I'm seeing
* problems matching non-ASCII portions of UTF-8 strings, even when compiling
* the pattern with UTF-8 support enabled. */
struct _vte_regex {
pcre *pcre;
pcre_extra *extra;
......@@ -202,6 +212,9 @@ _vte_regex_exec(struct _vte_regex *regex, const char *string,
#else
/* Ah, POSIX regex. Kind of clunky, but I don't have anything better to
* suggest. Better still, it works on my machine. */
struct _vte_regex {
regex_t posix_regex;
};
......
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