OSDN Git Service

* interfece/w32g_pref.c can change timidity.cfg editor
authorKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sat, 30 Dec 2006 16:45:31 +0000 (16:45 +0000)
committerKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sat, 30 Dec 2006 16:45:31 +0000 (16:45 +0000)
  by environment valiable TIMiDITY_CFG_EDITOR.

ChangeLog
interface/w32g_pref.c

index a88a4dc..3452f05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-30  Keishi Suenaga <skeishi@yahoo.co.jp>
+
+       * interfece/w32g_pref.c can change timidity.cfg editor
+         by environment valiable TIMiDITY_CFG_EDITOR.
+
 2006-12-29  Kentaro Sato <kentaro@ranvis.com>
 
        * timidity/controls.[ch]: Changed argument type of std_write().
index a141bb1..e1a3ad1 100644 (file)
@@ -471,9 +471,16 @@ PrefPlayerDialogProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam)
           }
                        break;
                case IDC_BUTTON_CFG_EDIT:
+
+               if(getenv("TIMIDITY_CFG_EDITOR") != NULL){
+                       ShellExecute(NULL, "open", getenv("TIMIDITY_CFG_EDITOR"), ConfigFile, NULL, SW_SHOWNORMAL);
+               }else{  
                        ShellExecute(NULL, "open", "notepad.exe", ConfigFile, NULL, SW_SHOWNORMAL);
+               }
+                       break;           
+/*                     ShellExecute(NULL, "open", "notepad.exe", ConfigFile, NULL, SW_SHOWNORMAL);
                        break;
-/*             case IDC_BUTTON_CFG_DIR:
+               case IDC_BUTTON_CFG_DIR:
                        ShellExecute(NULL, "open", ConfigFileOpenDir, NULL, NULL, SW_SHOWNORMAL);
                        break;*/
                case IDC_BUTTON_CFG_RELOAD: