beaver-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Beaver-devel] Menu sensitivity while opening file


From: Tobias Heinzen
Subject: Re: [Beaver-devel] Menu sensitivity while opening file
Date: Tue, 24 Jun 2008 11:19:18 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Double 12 wrote:
I set all windows to modal and updated their signals.
Further, I spent nearly half a day on trying to set the menu items to non-sensitive while the opened document is being syhi'd:

In the file filesops.c, in the function open_filename, there's this code:
(...)
add_page_in_notebook (GTK_NOTEBOOK(MainNotebook), filename);
open_file_in_editor(GTK_WIDGET(FPROPS(OpenedFilesCnt - 1, Text)), filename, OpenedFilesCnt - 1);
(...)

At the end of the function /add_page_in_notebook/, the menu items are already set to sensitive, while the syntax highlighting still has to be done in /open_file_in_editor/, by the function /refresh_editor/. So I tried to replace the call /menu_set_files_open (TRUE);/ from/ add_page_in_notebook/ to several other places, like: at the end of /open_file_in_editor/ and in /open_filename/ itself. When running Beaver, this had the right effect, but after opening and then re-opening some files from the recent files list, the program crashed with a segfault in /display_recent_files/. I tried all sorts of things, but always when taking /menu_set_files_open (TRUE); /to a different place, I had this segfault again.
Well I fixed the problem of premature closing of files. There's now a variable called Editable for every File thats getting set to false when SyHi. A lot of operations are now blocked until the SyHi has finished (cut/pase/copy/close/save...)

The other problem was funny to solve. I removed the configuration file and that seemed to solve it. I've got no idea why this is the case. I located the error it was this line that caused the error:
           gtk_item_factory_create_items (MainFactory, 1, &NewEntry, NULL);

Can you check if the error has gone if you remove your config file?

I also corrected some small things in the Makefile (using -f on symlink creation and copying only *.bl files into the bl directory) the rest was pretty much what I had in mind ^^

greets
Tobias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]