summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.am10
-rw-r--r--src/vte.c66
-rw-r--r--src/vte.h1
-rw-r--r--src/vteapp.c2
-rw-r--r--vte.spec5
6 files changed, 57 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c333f54..8cdd6f62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-04-29 20:57 nalin
+ * src/vte.c: Handle kb by treating it as a backspace. Make pangox
+ rendering the default. Handle control-key sequences better, unless
+ the input method is hiding the modifiers from us. Set the default
+ TERM variable to "xterm-color".
+ * src/vte.c src/vte.h: Get rid of vte_terminal_set_core_font().
+
2002-04-26 19:14 nalin
* src/vte.c: Punt all changes to background images and transparency
to an idle task. Only insert newlines into the copy buffer when the
diff --git a/Makefile.am b/Makefile.am
index 38e5da42..f4069e09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,20 +6,24 @@ pkgconfig_DATA = vte.pc
CVSTAG=$(shell echo $(PACKAGE)-$(VERSION) | sed 's,[\.\-],_,g')
+reallytag:
+ cvs tag -cFR $(CVSTAG) .
+
tag:
$(top_srcdir)/autogen.sh
- cvs tag -cFR $(CVSTAG) .
+ $(MAKE) reallytag
archive:
root=`cat $(top_srcdir)/CVS/Root` ; \
repo=`cat $(top_srcdir)/CVS/Repository` ; \
tmpdir=`mktemp -d /tmp/$(PACKAGE)-cvsXXXXXX` ; \
+ dir=`pwd` ; \
cd $$tmpdir ; \
cvs -d $$root export -r $(CVSTAG) $$repo ; \
- cd $$repo ; \
+ cd $$tmpdir/$$repo ; \
./autogen.sh ; \
make distcheck ; \
- cp $(PACKAGE)-$(VERSION).tar.gz $(top_srcdir) ; \
+ cp $(PACKAGE)-$(VERSION).tar.gz $$dir/ ; \
rm -fr $$tmpdir
srpm: $(top_srcdir)/$(PACKAGE)-$(VERSION).tar.gz
diff --git a/src/vte.c b/src/vte.c
index 984263a9..f0589304 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -1394,9 +1394,10 @@ vte_sequence_handler_im(VteTerminal *terminal,
terminal->pvt->screen->insert = TRUE;
}
-/* Cursor left. */
+/* Send me a backspace key sym, will you? Guess that the application meant
+ * to send the cursor back one position. */
static void
-vte_sequence_handler_le(VteTerminal *terminal,
+vte_sequence_handler_kb(VteTerminal *terminal,
const char *match,
GQuark match_quark,
GValueArray *params)
@@ -1407,6 +1408,16 @@ vte_sequence_handler_le(VteTerminal *terminal,
screen->cursor_current.col = MAX(0, screen->cursor_current.col - 1);
}
+/* Cursor left. */
+static void
+vte_sequence_handler_le(VteTerminal *terminal,
+ const char *match,
+ GQuark match_quark,
+ GValueArray *params)
+{
+ vte_sequence_handler_kb(terminal, match, match_quark, params);
+}
+
/* Move the cursor left N columns. */
static void
vte_sequence_handler_LE(VteTerminal *terminal,
@@ -2617,7 +2628,7 @@ static struct {
{"k;", NULL},
{"ka", NULL},
{"kA", NULL},
- {"kb", NULL},
+ {"kb", vte_sequence_handler_kb},
{"kB", NULL},
{"kC", NULL},
{"kd", NULL},
@@ -3874,6 +3885,7 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
const char *tterm;
unsigned char *normal = NULL;
size_t normal_length = 0;
+ int i;
unsigned char *special = NULL;
struct termios tio;
struct timeval tv;
@@ -4009,6 +4021,19 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
if (event->string != NULL) {
normal = g_strdup(event->string);
normal_length = strlen(normal);
+ if (modifiers & GDK_CONTROL_MASK) {
+ /* Replace characters which have
+ * "control" counterparts with
+ * those counterparts. */
+ for (i = 0;
+ i < normal_length;
+ i++) {
+ if ((normal[i] > 64) &&
+ (normal[i] < 97)) {
+ normal[i] ^= 0x40;
+ }
+ }
+ }
}
break;
}
@@ -4680,13 +4705,14 @@ xft_pattern_from_pango_font_description(const PangoFontDescription *font_desc)
#endif
/* Set the fontset used for rendering text into the widget. */
-static void
-vte_terminal_setup_font(VteTerminal *terminal, const char *xlfds,
- const PangoFontDescription *font_desc)
+void
+vte_terminal_set_font(VteTerminal *terminal,
+ const PangoFontDescription *font_desc)
{
long width, height, ascent, descent;
GtkWidget *widget;
XFontStruct **font_struct_list, font_struct;
+ char *xlfds = NULL;
char **missing_charset_list = NULL, *def_string = NULL;
int missing_charset_count = 0;
char **font_name_list = NULL;
@@ -4973,14 +4999,6 @@ vte_terminal_setup_font(VteTerminal *terminal, const char *xlfds,
}
void
-vte_terminal_set_font(VteTerminal *terminal,
- const PangoFontDescription *font_desc)
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
- vte_terminal_setup_font (terminal, NULL, font_desc);
-}
-
-void
vte_terminal_set_font_from_string(VteTerminal *terminal, const char *name)
{
PangoFontDescription *font_desc;
@@ -4989,18 +5007,10 @@ vte_terminal_set_font_from_string(VteTerminal *terminal, const char *name)
g_return_if_fail(strlen(name) > 0);
font_desc = pango_font_description_from_string(name);
- vte_terminal_setup_font (terminal, NULL, font_desc);
+ vte_terminal_set_font(terminal, font_desc);
pango_font_description_free(font_desc);
}
-void
-vte_terminal_set_core_font(VteTerminal *terminal,
- const char *xlfd)
-{
- g_return_if_fail(VTE_IS_TERMINAL(terminal));
- vte_terminal_setup_font (terminal, xlfd, NULL);
-}
-
/* A comparison function which helps sort quarks. */
static gint
vte_compare_direct(gconstpointer a, gconstpointer b)
@@ -5133,7 +5143,7 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
/* Set the emulation type, for reference. */
if (emulation == NULL) {
- emulation = "xterm";
+ emulation = "xterm-color";
}
quark = g_quark_from_string(emulation);
terminal->pvt->terminal = g_quark_to_string(quark);
@@ -5313,7 +5323,7 @@ vte_terminal_init(VteTerminal *terminal)
pvt->use_xft = FALSE;
pvt->fontdesc = NULL;
pvt->layout = NULL;
- pvt->use_pango = FALSE;
+ pvt->use_pango = TRUE;
if (getenv("VTE_USE_XFT") != NULL) {
if (atol(getenv("VTE_USE_XFT")) != 0) {
pvt->use_xft = TRUE;
@@ -5328,15 +5338,15 @@ vte_terminal_init(VteTerminal *terminal)
}
if (!pvt->use_pango) {
if (getenv("VTE_USE_PANGO") != NULL) {
- if (atol(getenv("VTE_USE_PANGO")) != 0) {
- pvt->use_pango = TRUE;
+ if (atol(getenv("VTE_USE_PANGO")) == 0) {
+ pvt->use_pango = FALSE;
}
}
}
#endif
/* Set the default font. */
- vte_terminal_setup_font(terminal, NULL, NULL);
+ vte_terminal_set_font(terminal, NULL);
/* Load the termcap data and set up the emulation and default
* terminal encoding. */
diff --git a/src/vte.h b/src/vte.h
index daa9b57b..b5b8d769 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -125,7 +125,6 @@ void vte_terminal_im_append_menuitems(VteTerminal *terminal,
void vte_terminal_set_font(VteTerminal *terminal,
const PangoFontDescription *font_desc);
void vte_terminal_set_font_from_string(VteTerminal *terminal, const char *name);
-void vte_terminal_set_core_font(VteTerminal *terminal, const char *xlfds);
void vte_terminal_set_scrollback_lines(VteTerminal *terminal, long lines);
G_END_DECLS
diff --git a/src/vteapp.c b/src/vteapp.c
index f32abb29..404cb90a 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -131,7 +131,7 @@ main(int argc, char **argv)
/* Set the default font. */
vte_terminal_set_font_from_string(VTE_TERMINAL(widget),
- "fixed medium semi-condensed 12");
+ "fixed semi-condensed 12");
/* Launch a shell. */
#ifdef VTE_DEBUG
diff --git a/vte.spec b/vte.spec
index 13ae43a4..46327a82 100644
--- a/vte.spec
+++ b/vte.spec
@@ -1,5 +1,5 @@
Name: vte
-Version: 0.2.1
+Version: 0.2.2
Release: 1
Summary: An experimental terminal emulator.
License: LGPL
@@ -52,5 +52,8 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* Mon Apr 29 2002 Nalin Dahyabhai <nalin@redhat.com> 0.2.2-1
+- bug fixes
+
* Thu Apr 25 2002 Nalin Dahyabhai <nalin@redhat.com> 0.1-1
- finish initial packaging, start the changelog