[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5545] close help window with H
From: |
Gavin D. Smith |
Subject: |
[5545] close help window with H |
Date: |
Fri, 09 May 2014 19:33:05 +0000 |
Revision: 5545
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5545
Author: gavin
Date: 2014-05-09 19:33:05 +0000 (Fri, 09 May 2014)
Log Message:
-----------
close help window with H
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/infodoc.c
trunk/info/window.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-05-09 18:10:21 UTC (rev 5544)
+++ trunk/ChangeLog 2014-05-09 19:33:05 UTC (rev 5545)
@@ -1,5 +1,14 @@
2014-05-09 Gavin Smith <address@hidden>
+ * info/infodoc.c (info_find_or_create_help_window) Close help
+ window if in it already. Display error message if window cannot
+ be created. Caller in info_get_help_window updated.
+
+ * info/window.c (window_delete_window): Comment added warning about
+ using this function.
+
+2014-05-09 Gavin Smith <address@hidden>
+
* info/info-utils.c (deleted_lines): Variable deleted. All
accesses removed.
(scan_node_contents): [preprocess-nodes=On] Remove blank line
Modified: trunk/info/infodoc.c
===================================================================
--- trunk/info/infodoc.c 2014-05-09 18:10:21 UTC (rev 5544)
+++ trunk/info/infodoc.c 2014-05-09 19:33:05 UTC (rev 5545)
@@ -411,6 +411,13 @@
WINDOW *eligible = NULL;
WINDOW *help_window = get_window_of_node (internal_info_help_node);
+ /* Close help window if in it already. */
+ if (help_window && help_window == active_window)
+ {
+ info_delete_window_internal (help_window);
+ return NULL;
+ }
+
/* If we couldn't find the help window, then make it. */
if (!help_window)
{
@@ -427,8 +434,12 @@
}
if (!eligible)
- return NULL;
+ {
+ info_error ("%s", msg_cant_make_help);
+ return NULL;
+ }
}
+
#ifndef HELP_NODE_GETS_REGENERATED
else
/* help window is static, just return it. */
@@ -485,10 +496,6 @@
active_window = help_window;
active_window->flags |= W_UpdateWindow;
}
- else
- {
- info_error ("%s", msg_cant_make_help);
- }
}
/* Show the Info help node. This means that the "info" file is installed
Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2014-05-09 18:10:21 UTC (rev 5544)
+++ trunk/info/window.c 2014-05-09 19:33:05 UTC (rev 5545)
@@ -630,7 +630,9 @@
/* Delete WINDOW from the list of known windows. If this window was the
active window, make the next window in the chain be the active window.
If the active window is the next or previous window, choose that window
- as the recipient of the extra space. Otherwise, prefer the next window. */
+ as the recipient of the extra space. Otherwise, prefer the next window.
+ Be aware that info_delete_window_internal (in session.c) should be called
+ instead if you need to remove the window from the info_windows list. */
void
window_delete_window (WINDOW *window)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5545] close help window with H,
Gavin D. Smith <=