Help modifying code to Disable or Confirm close button
Posted: Wed Feb 29, 2012 5:55 pm
I have a handicap now and don't have fine motor control of my fingers. Accidentally middle clicking on the middle button and closing tabs was a problem so I got the source code and fixed it so that if the tabs didn't have a close button they wouldn't close with a middle click either.
Then a couple of days ago I accidentally clicked on the window close button and lost all of the tabs
I've been trying to fix that and I am having trouble. First I tried adding a dialog that pops up when I hit the close button to confirm. But it seg faulted when I did the call to gtk_message_dialog_new to create the dialog to confirm the close.
Then I discovered I could just add the following line and then the close button just didn't function at all, and that would work for me:
But then I discoved that only worked okay if I always started new LXTerminal windows from the menu of a running window. If I tried to start a new LXTerminal from the start menu or command line it crashes ALL the running LXTerminal windows.
Can anybody point me in the right direction?
Thanks,
-Scott
P.S. if anyone is interested in the patch to disable the middle click from closing tabs if they don't have a close button please let me know.
Then a couple of days ago I accidentally clicked on the window close button and lost all of the tabs
I've been trying to fix that and I am having trouble. First I tried adding a dialog that pops up when I hit the close button to confirm. But it seg faulted when I did the call to gtk_message_dialog_new to create the dialog to confirm the close.
Then I discovered I could just add the following line and then the close button just didn't function at all, and that would work for me:
Code: Select all
g_signal_connect(G_OBJECT(terminal->window), "delete-event", G_CALLBACK(gtk_true), terminal);
Can anybody point me in the right direction?
Thanks,
-Scott
P.S. if anyone is interested in the patch to disable the middle click from closing tabs if they don't have a close button please let me know.