A small patch for amaya

"Dexiong Terry Zhang" <[email protected]> Wed, 5 Dec 2007 20:59:32 -0800
Newsgroups gmane.comp.web.amaya.devel
Message-ID <[email protected]>
Hi guys,

I am new to both open source and amaya. I just want to do some
contribution to this project so I make a small usability patch which
related to the "open document" dialog. This is what the patch can do:

1. Right now, when the user click on the "file browser" button on the
"open document" dialog, the file browser display the home directory.
This patch will open the file broswer and display the directory in the
url from the "open document" dialog.

2. When the file browser is closed, the "file browser" button is still
focused. This patch will focus the "open" button so pressing enter key
will open the document instead of opening the file browser again.

Hope this is useful for you......^O^


Terry
patch.diff (text/plain, 692 B)
--- backup/Amaya9.55/Amaya/amaya/wxdialog/OpenDocDlgWX.cpp	2007-06-12 06:06:07.000000000 -0700
+++ Amaya9.55/Amaya/amaya/wxdialog/OpenDocDlgWX.cpp	2007-12-02 17:01:03.000000000 -0800
@@ -234,6 +234,10 @@
       file_value = url.AfterLast (DIR_SEP);
       p_dlg->SetPath (url);
       p_dlg->SetFilename (file_value);
+      
+      // Open the directory in the url
+      wxString address = url.BeforeLast (DIR_SEP);
+      p_dlg->SetDirectory(address);
     }
 
   p_dlg->SetFilterIndex(*m_pLastUsedFilter);
@@ -247,6 +251,10 @@
     }
   else
     p_dlg->Destroy();
+
+  //Focus the open button after the file blowser is closed
+  XRCCTRL(*this, "wxID_OK", wxButton)->SetFocus();
+
 }