your point of view about FR 2257774
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
your point of view about FR 2257774
Hi
I would like to implement FR 2257774 : StatusBar indicator for Read-Only file
I can do the way proposed : status bar indicator (nothing or "R/O"), but another solution is to show this information directly on the file tab (the filename in italic for exemple).
What do you think. What is the best solution ?
I would like to implement FR 2257774 : StatusBar indicator for Read-Only file
I can do the way proposed : status bar indicator (nothing or "R/O"), but another solution is to show this information directly on the file tab (the filename in italic for exemple).
What do you think. What is the best solution ?
Jérémie
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: your point of view about FR 2257774
I think that status bar is the more standard way to go.
A patch for this one is most welcome
Eran
A patch for this one is most welcome
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: your point of view about FR 2257774
I have already implemented this feature, as well preventing edits to Read-Only files (for Win32) in my working copy. If you are interested, I can provide a patch.
--tim
--tim
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: your point of view about FR 2257774
Ofc, send it overtjulian wrote: have already implemented this feature, as well preventing edits to Read-Only files (for Win32) in my working copy. If you are interested, I can provide a patch.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: your point of view about FR 2257774
Here is a read-only patch (generated by TortoiseSVN) for Win32, needs help for Linux/Mac.
--tim
My first patch, I do not know if I did this right.
--tim
My first patch, I do not know if I did this right.
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: your point of view about FR 2257774
Since m_fileName is of type wxFileName, you could simply use m_fileName.IsFileWritable() instead of adding global method.
I will give it a shot tomorrow, and will let you know
Thanks,
Eran
I will give it a shot tomorrow, and will let you know
Thanks,
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: your point of view about FR 2257774
I could not get IsFileWritable() to work in Win32, so I grabbed some code from wxWidgets to make it work. From what I tested, I came to the conclusion that IsFileWritable() only works with permissions and not the read-only attribute. I assume IsFileWritable() works on Linux/Mac but cannot test it (I stubbed it in globals.cpp). Maybe you can determine what the problem is.
My thoughts are that there probably should be a menu item that allows the read-only attribute to be cleared, but that's 'not-good' for how we use read-only files so I did not implement it. Also, I gave the read-only message in the StatusBar its own section, it instead could be appended to one of the others.
--
tim
My thoughts are that there probably should be a menu item that allows the read-only attribute to be cleared, but that's 'not-good' for how we use read-only files so I did not implement it. Also, I gave the read-only message in the StatusBar its own section, it instead could be appended to one of the others.
--
tim
-
- CodeLite Guru
- Posts: 351
- Joined: Mon Oct 20, 2008 7:26 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: your point of view about FR 2257774
Hi
I tested wxFileName::IsFileWritable() and everything is fine for me. What is your problem ?
For example, here is my patch.
FYI : I think it can be a good idea to add an enum to name the status cols (msg, database, cur_pos, mode, build) for a better comprehension...
I tested wxFileName::IsFileWritable() and everything is fine for me. What is your problem ?
For example, here is my patch.
FYI : I think it can be a good idea to add an enum to name the status cols (msg, database, cur_pos, mode, build) for a better comprehension...
You do not have the required permissions to view the files attached to this post.
Jérémie
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: your point of view about FR 2257774
I agree.FYI : I think it can be a good idea to add an enum to name the status cols (msg, database, cur_pos, mode, build) for a better comprehension...
Open frame.cpp in CodeLite. Then in Windows Explorer, right-click frame.cpp and select properties. The check the 'read-only' checkbox. My problem is that IsFileWritable did not detect that the file is now read-only. Does it work for you?What is your problem ?
--tj
-
- CodeLite Enthusiast
- Posts: 32
- Joined: Tue Nov 11, 2008 12:06 am
- Contact:
Re: your point of view about FR 2257774
Eran,
--tj
Any update on this topic?I will give it a shot tomorrow, and will let you know
--tj