[ nedit-Bugs-798514 ] bad window type for reload file

SourceForge.net noreply at sourceforge.net
Mon Mar 5 01:22:51 CET 2007


Bugs item #798514, was opened at 2003-09-01 14:31
Message generated for change (Comment added) made by yooden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=798514&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Program
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: bad window type for reload file

Initial Comment:
the window :
"<filename> has been modified by another program. Reload ?"
can be hidden by others nedit windows and block the editor
as long as the good window is not selected.
This warning window should appear on top of all other
nedit windows

----------------------------------------------------------------------

>Comment By: Thorsten Haude (yooden)
Date: 2007-03-05 01:22

Message:
Logged In: YES 
user_id=119143
Originator: NO

(no response, closed.)

----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2006-09-17 17:23

Message:
Logged In: YES 
user_id=119143

Again, does the error still show with NEdit 5.5?

----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2006-02-05 17:07

Message:
Logged In: YES 
user_id=119143

AFAIK, checks for file updates only happen for focused
windows now. Does the error still show?

----------------------------------------------------------------------

Comment By: Eddy De Greef (edg)
Date: 2003-09-03 18:01

Message:
Logged In: YES 
user_id=73597

> By the way, do somebody know why 
> CheckForChangesToFile is called within 
> countWritableWindows(...)? 

cvs log -r1.39 source/search.c
...
description:
----------------------------
revision 1.39
date: 2001/11/27 22:53:42;  author: edg;  state: Exp; 
lines: +41 -19
Enhancement to the (multi-file) replacement dialog: all
files are first checked for changes to set correct
sensitivity for the multi-file button and to generate an
up-to-date list of writable files in the multi-file dialog.

> SilentCheckForChangesToFile

It seems simpler to me to add a "silent" argument to
CheckForChangesToFile() to postpone the dialog when the
window is not focussed. 
The code already detects cases in which it has to be silent,
and adding an option to force it to be silent (such as in
countWritableWindows()) is easy. AFAIK,
countWritableWindows() is the only place where a dialog
could be triggered for a non-focussed window.

----------------------------------------------------------------------

Comment By: Frank Perbet (perbet)
Date: 2003-09-03 16:16

Message:
Logged In: YES 
user_id=849123

Could you please give the version you're using and what 
is to be done to reproduce this bug? 
 
Anyway, this dialog box (... has been modified by...) 
brings many troubles. At least, it should only be trigered 
when the user is focusing the window. 
 
The function "CheckForChangesToFile" is responsible 
for trigering this dialog box. What about creating a 
function: 
int SilentCheckForChangesToFile(...) 
The value of the integer result depends on what's 
happening: 
-2 -> untitled window 
-1 -> no check performed 
0  -> everything's fine 
1  -> read access need to be update 
2  -> no file access 
3  -> file doesn't exist anymore 
4  -> content change 
 
This function can be called whenever, since it's completely 
silent (it may changes some flag in the WindowInfo 
structure). 
 
The function CheckForChangesToFile(..) call the previous 
one and do what is necessary. 
 
IMO, it's important to distinguish which function is 
checking the file/buffer coherence and the function which 
pop up warning about that. 
 
By the way, do somebody know why 
CheckForChangesToFile is called within 
countWritableWindows(...)? 
 
I implemented this changes and everything seems to be 
ok for now. Tell me if you want to see this code, and how 
I'm suppose to give it to you (diff?). 
 
Frank Perbet 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=798514&group_id=11005


More information about the Develop mailing list