Commit bb252866 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai
Browse files

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:
......@@ -30,6 +30,216 @@ All of these fields should be considered read-only.
@window_title: The terminal's idea of what the window's title should be.
@icon_title: The terminal's idea of what the window's title should be when iconified.
<!-- ##### SIGNAL VteTerminal::char-size-changed ##### -->
<para>
Emitted whenever selection of a new font causes the values of the
@char_width or @char_height fields to change.
</para>
@vteterminal: the object which received the signal.
@arg1: the new character cell width.
@arg2: the new character cell height.
<!-- ##### SIGNAL VteTerminal::child-exited ##### -->
<para>
This signal is emitted when the terminal detects that a child started using
vte_terminal_fork_command() has exited.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::commit ##### -->
<para>
Emitted whenever the terminal receives input from the user and prepares to send
it to the child process. The signal is emitted even when there is no child
process.
</para>
@vteterminal: the object which received the signal.
@arg1: a string of text.
@arg2: the length of that string of text.
<!-- ##### SIGNAL VteTerminal::contents-changed ##### -->
<para>
Emitted whenever the visible appearance of the terminal has changed. Used
primarily by #VteTerminalAccessible.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::cursor-moved ##### -->
<para>
Emitted whenever the cursor moves to a new character cell. Used primarily
by #VteTerminalAccessible.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::decrease-font-size ##### -->
<para>
Emitted when the user hits the '-' key while holding the Control key.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::deiconify-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::emulation-changed ##### -->
<para>
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::encoding-changed ##### -->
<para>
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::eof ##### -->
<para>
Emitted when the terminal receives an end-of-file from a child which is running
in the terminal. This signal is frequently (but not always) emitted with a
"child-exited" signal.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::icon-title-changed ##### -->
<para>
Emitted when the terminal's @icon_title field is modified.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::iconify-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::increase-font-size ##### -->
<para>
Emitted when the user hits the '+' key while holding the Control key.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::lower-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::maximize-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::move-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
@arg1: the terminal's desired location, X coordinate.
@arg2: the terminal's desired location, Y coordinate.
<!-- ##### SIGNAL VteTerminal::raise-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::refresh-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::resize-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
@arg1: the desired width in pixels, including padding.
@arg2: the desired height in pixels, including padding.
<!-- ##### SIGNAL VteTerminal::restore-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::selection-changed ##### -->
<para>
Emitted whenever the contents of terminal's selection changes.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::status-line-changed ##### -->
<para>
Emitted whenever the contents of the status line are modified or cleared.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-deleted ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-inserted ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-modified ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-scrolled ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
@arg1:
<!-- ##### SIGNAL VteTerminal::window-title-changed ##### -->
<para>
Emitted when the terminal's @window_title field is modified.
</para>
@vteterminal: the object which received the signal.
<!-- ##### ENUM VteTerminalEraseBinding ##### -->
<para>
An enumerated type which can be used to indicate which string the terminal
......@@ -691,213 +901,3 @@ keys.
@Returns:
<!-- ##### SIGNAL VteTerminal::char-size-changed ##### -->
<para>
Emitted whenever selection of a new font causes the values of the
@char_width or @char_height fields to change.
</para>
@vteterminal: the object which received the signal.
@arg1: the new character cell width.
@arg2: the new character cell height.
<!-- ##### SIGNAL VteTerminal::child-exited ##### -->
<para>
This signal is emitted when the terminal detects that a child started using
vte_terminal_fork_command() has exited.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::commit ##### -->
<para>
Emitted whenever the terminal receives input from the user and prepares to send
it to the child process. The signal is emitted even when there is no child
process.
</para>
@vteterminal: the object which received the signal.
@arg1: a string of text.
@arg2: the length of that string of text.
<!-- ##### SIGNAL VteTerminal::contents-changed ##### -->
<para>
Emitted whenever the visible appearance of the terminal has changed. Used
primarily by #VteTerminalAccessible.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::cursor-moved ##### -->
<para>
Emitted whenever the cursor moves to a new character cell. Used primarily
by #VteTerminalAccessible.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::decrease-font-size ##### -->
<para>
Emitted when the user hits the '-' key while holding the Control key.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::deiconify-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::emulation-changed ##### -->
<para>
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::encoding-changed ##### -->
<para>
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::eof ##### -->
<para>
Emitted when the terminal receives an end-of-file from a child which is running
in the terminal. This signal is frequently (but not always) emitted with a
"child-exited" signal.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::icon-title-changed ##### -->
<para>
Emitted when the terminal's @icon_title field is modified.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::iconify-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::increase-font-size ##### -->
<para>
Emitted when the user hits the '+' key while holding the Control key.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::lower-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::maximize-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::move-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
@arg1: the terminal's desired location, X coordinate.
@arg2: the terminal's desired location, Y coordinate.
<!-- ##### SIGNAL VteTerminal::raise-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::refresh-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::resize-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
@arg1: the desired width in pixels, including padding.
@arg2: the desired height in pixels, including padding.
<!-- ##### SIGNAL VteTerminal::restore-window ##### -->
<para>
Emitted at the child application's request.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::selection-changed ##### -->
<para>
Emitted whenever the contents of terminal's selection changes.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::status-line-changed ##### -->
<para>
Emitted whenever the contents of the status line are modified or cleared.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-deleted ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-inserted ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-modified ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
<!-- ##### SIGNAL VteTerminal::text-scrolled ##### -->
<para>
An internal signal used for communication between the terminal and its
accessibility peer. May not be emitted under certain circumstances.
</para>
@vteterminal: the object which received the signal.
@arg1:
<!-- ##### SIGNAL VteTerminal::window-title-changed ##### -->
<para>
Emitted when the terminal's @window_title field is modified.
</para>
@vteterminal: the object which received the signal.
......@@ -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,