Re: gnome-terminal SHIFT-Up line scrolling
- From: Sunil <funtoos yahoo com>
- To: Sunil <funtoos yahoo com>, "John (J5) Palmieri" <johnp martianrock com>
- Cc: garnome-list gnome org
- Subject: Re: gnome-terminal SHIFT-Up line scrolling
- Date: Sat, 6 Mar 2004 10:51:47 -0800 (PST)
a patch for vte is attached if someone is interested
in this functionality for gnome-terminal...after
applying the patch and building vte, you will have to
close all g-t's and open a new one...
--- Sunil <funtoos yahoo com> wrote:
> it looks like it may not be possible with the
> current
> code base because neither vte nor g-t handle SHIFT
> with GDK_Up...:(
>
> --- "John (J5) Palmieri" <johnp martianrock com>
> wrote:
> > On Sat, 2004-03-06 at 01:57, Sunil wrote:
> > > c'mon people, this is the only hardcore gnome
> > > list...somebody has to know this...
> >
> > You might want to check on IRC (irc.gimp.net) in
> the
> > #gnome channel or
> > e-mail the gnome-terminal maintainer. This may
> not
> > be possible with the
> > current codebase. My guess is if you figure out
> how
> > shift-PgUp works
> > you can figure out how to implement shift-up.
> >
> > In any event I doubt garnome is the right list to
> > ask. The usability
> > list might be a good place to ask also but then
> > again, while they might
> > be able to tell you if shift-up is a good
> usability
> > enhancement or not
> > they might not have anyone who is intimate on how
> > gnome-terminal works.
> >
> > --
> > J5
> >
> > > --- Sunil <funtoos yahoo com> wrote:
> > > > No, I meant line-by-line scrolling.
> > > >
> > > > Thanks
> > > >
> > > > --- Richard Ferguson <fergus fergusnet com>
> > wrote:
> > > > >
> > > > > Have you tried shift-pgup and shift-pgdn?
> > > > >
> > > > > --
> > > > > richard ferguson
> > > > >
> > > > > On 3/5/2004, "Sunil" <funtoos yahoo com>
> > wrote:
> > > > >
> > > > > >Hi Guys,
> > > > > >
> > > > > >Is there a way to achieve this in g-t?
> > Putting
> > > > > stuff
> > > > > >in .Xdefaults works for xterm but I don't
> > know
> > > > what
> > > > > >resource name to use for gnome-terminal?
> > > > > >
> > > > > >This is a very desirable feature in g-t for
> > > > better
> > > > > >keyboard control but all my searches and
> > > > questions
> > > > > on
> > > > > >it have failed so far.
> > > > > >
> > > > > >Thanks.
> > > > > >
> > > > > >__________________________________
> > > > > >Do you Yahoo!?
> > > > > >Yahoo! Search - Find what youre looking for
> > > > faster
> > > > > >http://search.yahoo.com
> > > > > >--
> > > > > >garnome-list mailing list
> > > > > >garnome-list gnome org
> > > > >
> > > >
> >
> >http://mail.gnome.org/mailman/listinfo/garnome-list
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Search - Find what youre looking for
> > faster
> > > > http://search.yahoo.com
> > > > --
> > > > garnome-list mailing list
> > > > garnome-list gnome org
> > > >
> >
> http://mail.gnome.org/mailman/listinfo/garnome-list
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Search - Find what youre looking for
> faster
> > > http://search.yahoo.com
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you’re looking for faster
> http://search.yahoo.com
> --
> garnome-list mailing list
> garnome-list gnome org
> http://mail.gnome.org/mailman/listinfo/garnome-list
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com
--- vte.c.ORG 2004-03-06 10:28:09.000000000 -0800
+++ vte.c 2004-03-06 10:44:23.000000000 -0800
@@ -1917,4 +1917,31 @@
}
+/* Scroll up or down in the current screen. */
+static void
+vte_terminal_scroll_lines(VteTerminal *terminal, gint lines)
+{
+ glong destination;
+ g_return_if_fail(VTE_IS_TERMINAL(terminal));
+#ifdef VTE_DEBUG
+ if (_vte_debug_on(VTE_DEBUG_IO)) {
+ fprintf(stderr, "Scrolling %d lines.\n", lines);
+ }
+#endif
+ /* Calculate the ideal position where we want to be before clamping. */
+ destination = floor(gtk_adjustment_get_value(terminal->adjustment));
+ destination += lines;
+ /* Can't scroll past data we have. */
+ destination = CLAMP(destination,
+ terminal->adjustment->lower,
+ terminal->adjustment->upper - terminal->row_count);
+ /* Tell the scrollbar to adjust itself. */
+ gtk_adjustment_set_value(terminal->adjustment, destination);
+ /* Clear dingus match set. */
+ vte_terminal_match_contents_clear(terminal);
+ /* Notify viewers that the contents have changed. */
+ vte_terminal_emit_contents_changed(terminal);
+}
+
+
/* Scroll so that the scroll delta is the minimum value. */
static void
@@ -8038,4 +8065,22 @@
}
break;
+ case GDK_KP_Up:
+ case GDK_Up:
+ if (terminal->pvt->modifiers & GDK_SHIFT_MASK) {
+ vte_terminal_scroll_lines(terminal, -1);
+ scrolled = TRUE;
+ handled = TRUE;
+ suppress_meta_esc = TRUE;
+ }
+ break;
+ case GDK_KP_Down:
+ case GDK_Down:
+ if (terminal->pvt->modifiers & GDK_SHIFT_MASK) {
+ vte_terminal_scroll_lines(terminal, 1);
+ scrolled = TRUE;
+ handled = TRUE;
+ suppress_meta_esc = TRUE;
+ }
+ break;
case GDK_KP_Home:
case GDK_Home:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]