Tux Guitar


Subject Configuration is not saved

Author Message
Post: May 9th 2010 at 9:25 AM


I run TuxGuitar on a Mac OS X Snow Leopard and there is some configurations that are not saved when I close it.
For examples :
- the Tips panel still appear while I tick the "Do not display this message again".
- the Chord display return to diagram while I just want the name.

Is there a way to save this configurations ?

Back to Top
Post: Jun 1st 2010 at 11:26 PM

In theory it must be saved.. there should be some error happening..
what tuxguitar version do you have ?

Back to Top
Post: Jun 6th 2010 at 9:17 AM

Hi Julian and thank you for all you've done.
My version is the 1.2.

Since my last post, I found a way to have some off my settings saved by directly write them in the config.properties file (like maximize the application at startup, show the piano and fretboard...). I found the variables name in the source (Long live the Open Source) but :
- I didn't find the variables nor the configuration file for the tuxguitar-community plugin,
- I know this is not a proper way to do that is it ?

Is there a debug-mode or a log-file ?

Back to Top
Post: Jun 6th 2010 at 2:18 PM

The community plugin, should save the config at:

and this setting will hide the welcome dialog:

( if you don' t use it, you can also uninstall the plugin just removing tuxguitar-community.jar from share/plugins )

and no, there is no log file, the errors should be displayed to the terminal.
however, i think there is some kind of access denied to save the files ? for some reason it seems the application can't save them.

Or maybe it is not successfully closing ..
My question is if is the DisposeAction, invoked at close time..

Could you try this please?
1_ create a new song
2_ add some note to it.
3_ exit the application

Do you see the unsaved changes question ??

Back to Top
Post: Jun 6th 2010 at 7:41 PM

I try what you told me and the answer is no, I didn't have the unsaved changes question.

I try to launch tuxguitar from the terminal but there is no interesting message.

Back to Top
Post: Jun 6th 2010 at 8:18 PM

Ok, so it seems that tuxguitar is not getting the close event (while the configuration files are saved when application closes).

Now, there are some ways to close the application.
There is the standard mac's menu with it's quit button..
but tuxguitar's "File" menu, also have an "Exit" button.. could you test if this second one works ?

Back to Top
Post: Jun 6th 2010 at 8:54 PM

OK, with File->Quit, the unsaved panel appears (I used to use the cmd+Q shortcut) and the configuration is saved.

Thank you very much.

Back to Top
Post: Jun 6th 2010 at 9:04 PM

Is the "cmd + Q" shortcud a mac thing ???
maybe the problem is that we are not capturing that event in the cocoa-integration plugin.

Back to Top
Post: Jun 6th 2010 at 10:35 PM

Hum, I thought SWT would generate a quit event or so :/
IMO this should be in SWT/TuxGuitar core, not in Cocoa integration. Maybe there is some close event you do not catch?

Back to Top
Post: Jun 7th 2010 at 12:55 PM

Its seems that SWT call display.dispose when you click exit there.
While under other OS, it call "shell.close()" that fires a ShellListener event.
we can catch dispose event, but the problem there is that the shell could be already closed, so after cancel the operation (because unsaved changes question) the application will continue running, but with a non visible frame.

I think we have to catch both events, shell closed, and display disposed, and modify how DisposeAction finish the application (today it call display.dispose, that will cause an infinite loop).

Back to Top
Post: Jun 7th 2010 at 2:35 PM

hmm it's not so easy as i thoght...

the SWT Class "org.eclipse.swt.events.DisposeEvent" don't have the "doit" flag, as the ShellEvent.

When you call Shell.close(), it fires the ShellListener, and if you set ShellEvent.doit = false; ... so the close operation is cancelled.

but it seems that we can't cancel a dispose action. so we could catch the dispose event, but we can't stop it...

Back to Top