diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-08 19:21:28 -0300 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-10-08 19:21:28 -0300 |
commit | f5edc6424b6553d58e271f64471cef32e063dd19 (patch) | |
tree | fe5bfe4d26c5f6561b0d6f1484b8fd14cb745163 /xedit.c | |
parent | d96491aad5542f052b722b94d86f0ce7661ae98b (diff) |
Rewrite double click confirmation code.
Remove the double_click global boolean, and change dc_state to a bit
field, instead of a single state variable.
The old code was the xedit original code with minimal changes, but was
a bit confusing when two confirmations would be required.
Also, this patch moves the check for file overwriting before
MaybeCreateFile() as it can actually call creat(), what means that it
can no longer ask for confirmations, as the file has been just backed up,
and a zero sized one created.
Diffstat (limited to 'xedit.c')
-rw-r--r-- | xedit.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -279,8 +279,10 @@ main(int argc, char *argv[]) flags, file_access); XtAddCallback(item->source, XtNcallback, SourceChanged, (XtPointer)item); - if (exists && file_access == WRITE_OK) + if (exists && file_access == WRITE_OK) { item->mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); + item->mtime = st.st_mtime; + } if (!num_loaded) SwitchTextSource(item); ++num_loaded; |