Open qindapao opened 7 months ago
@qindapao
If I press 'cancel' then it continues editing so you'll need to do some debugging.
the code is in script/asciio in sub delete_event
For the "+" I think it's a good idea but here too I can't help because my windows don't have a title bar.
but what's needed is to add the following function to App::Asciio::Gtk
sub set_modified_state
{
my ($self, $state) = @_ ;
$SUPER->set_modify $state ;
# if state is modified then reflect that on the title bar
}
sub set_title
{
my ($self, $title) = @_;
$self->SUPER::set_title($title) ; # this title must NOT have the '+'
if(defined $title)
{
# this one can have the '+' but only when modified
$self->{widget}->get_toplevel()->set_title($title . ' - asciio') ;
}
}
#
@nkh If you think it's ok, I can realize it at the weekend and fix this exception.
@qindapao I put some information of where things need to be fixed above. You're better placed to fix the errors since I don't have the right environment. Let me know when you have a branch I can look into.
@nkh okay
@nkh
https://github.com/qindapao/P5-App-Asciio/tree/fix_file_save
I used the asterisk after the file changed, not the plus sign.
@nkh One of the codes I modified was commented by you in a commit, and I don't know the background and reason. Please check it carefully.
@nkh Today I discovered that the exit mechanism of the software is a bit abnormal.
I clicked the Continue Editing button, but the software still quit and all my work was lost.
In addition, I have a suggestion. That is, can we display a mark on the title bar of the file indicating whether the current file has been modified? For example, a plus sign, like a normal text editor.
The title is displayed in the
file name (file directory) - asciio
format