[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH 2.8.4dev.20] Hot place for URL goto
From: |
Ilya Zakharevich |
Subject: |
lynx-dev [PATCH 2.8.4dev.20] Hot place for URL goto |
Date: |
Fri, 1 Jun 2001 22:58:26 -0400 |
User-agent: |
Mutt/1.2.5i |
Defining hot.paste style puts a right-arrow at the UR corner (which is
currently unused). Clicking on it initiates a GOTO to the current
selection (same as PASTE_URL action).
Disabled unless STYLES and CUT_AND_PASTE are both enabled. Disabled
unless the user defines hot.paste.
Enjoy,
Ilya
--- src/GridText.c 2001/06/02 02:06:05 1.1
+++ src/GridText.c 2001/06/02 02:24:48
@@ -1585,6 +1585,16 @@ PRIVATE void display_title ARGS1(
LYaddch('\n');
FREE(title);
+#if defined(USE_COLOR_STYLE) && defined(CAN_CUT_AND_PASTE)
+ if (s_hot_paste != NOSTYLE) { /* Only if the user set the style */
+ LYmove(0, LYcols - 1);
+ LynxChangeStyle(s_hot_paste, STACK_ON);
+ LYaddch(ACS_RARROW);
+ LynxChangeStyle(s_hot_paste, STACK_OFF);
+ LYmove(1, 0); /* As after \n */
+ }
+#endif /* USE_COLOR_STYLE */
+
#ifdef USE_COLOR_STYLE
/* turn the TITLE style off */
LynxChangeStyle(s_title, STACK_OFF);
--- src/LYHash.h 2001/06/02 02:02:12 1.2
+++ src/LYHash.h 2001/06/02 02:02:50
@@ -56,6 +56,7 @@ extern int s_menu_number;
extern int s_menu_entry;
extern int s_menu_active;
extern int s_menu_sb;
+extern int s_hot_paste;
#ifdef USE_SCROLLBAR
extern int s_sb_aa;
--- src/LYStrings.c 2001/05/20 06:04:30 1.4
+++ src/LYStrings.c 2001/06/02 02:05:06
@@ -371,6 +371,10 @@ PRIVATE int set_clicked_link ARGS4(
mouse_link = -2;
if (x == 0 && toolbar) /* On '#' */
c = LAC_TO_LKC0(LYK_TOOLBAR);
+#if defined(CAN_CUT_AND_PASTE) && defined(USE_COLOR_STYLE)
+ else if (y == 0 && x == LYcols - 1 && s_hot_paste != NOSTYLE)
+ c = LAC_TO_LKC0(LYK_PASTE_URL);
+#endif
else if (clicks > 1) {
if (x < left + toolbar)
c = (code==FOR_PROMPT && y)
--- src/LYStyle.c 2001/06/02 02:56:23 1.4
+++ src/LYStyle.c 2001/06/02 02:04:00
@@ -73,6 +73,7 @@ PUBLIC int s_menu_number = NOSTYLE;
PUBLIC int s_menu_entry = NOSTYLE;
PUBLIC int s_menu_active = NOSTYLE;
PUBLIC int s_menu_sb = NOSTYLE;
+PUBLIC int s_hot_paste = NOSTYLE;
#ifdef USE_SCROLLBAR
PUBLIC int s_sb_aa = NOSTYLE;
@@ -243,6 +244,7 @@ PRIVATE void parse_style ARGS1(char*,buf
{ "menu.entry", DSTYLE_ELEMENTS, &s_menu_entry },
{ "menu.active", DSTYLE_ELEMENTS, &s_menu_active },
{ "menu.sb", DSTYLE_ELEMENTS, &s_menu_sb },
+ { "hot.paste", DSTYLE_ELEMENTS, &s_hot_paste },
};
unsigned n;
BOOL found = FALSE;
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev [PATCH 2.8.4dev.20] Hot place for URL goto,
Ilya Zakharevich <=