static void cb_ts_edit() { #if 0 #if UNIX if (inmd[default_input_method].method_type==method_type_TSIN) { char tt[512]; sprintf(tt, "( cd ~/.gcin && "GCIN_BIN_DIR"/tsd2a32 %s > tmpfile && %s tmpfile && "GCIN_BIN_DIR"/tsa2d32 tmpfile %s) &", tsin32_f, utf8_edit, tsin32_f); dbg("exec %s\n", tt); system(tt); } else { char tt[512]; sprintf(tt, GCIN_SCRIPT_DIR"/tsin-gtab-edit %s", inmd[default_input_method].filename); system(tt); } #else if (inmd[default_input_method].method_type==method_type_TSIN) win32exec_script("ts-edit.bat", tsin32_f); else { win32exec_script("ts-gtab-edit.bat", inmd[default_input_method].filename); } #endif #else #if UNIX system(GCIN_BIN_DIR"/ts-edit"); #else win32exec("ts-edit.exe"); #endif #endif }
void exec_gcin_setup() { dbg("exec gcin\n"); #if UNIX if (geteuid() < 100 || getegid() < 100) return; #else if (getenv("WIN_LOGON")) return; #endif #if 0 char pidstr[32]; sprintf(pidstr, "GCIN_PID=%d", #if UNIX getpid() #else GetCurrentProcessId() #endif ); putenv(pidstr); #endif #if UNIX system(GCIN_BIN_DIR"/gcin-tools &"); #else win32exec("gcin-tools.exe"); #endif }
static void cb_ts_contribute() { #if UNIX system(GCIN_BIN_DIR"/ts-contribute &"); #else win32exec("ts-contribute.exe"); #endif }
static void cb_tslearn() { #if UNIX system("tslearn &"); #else win32exec("tslearn.exe"); #endif exit(0); }
static void cb_juying_learn() { #if WIN32 win32exec("juyin-learn.exe"); #else system(GCIN_BIN_DIR"/juyin-learn &"); #endif exit(0); }
static void cb_gb_translate_toggle() { #if WIN32 win32exec("sim2trad.exe"); #else system(GCIN_BIN_DIR"/sim2trad &"); #endif exit(0); }
void cb_trad2sim(GtkCheckMenuItem *checkmenuitem, gpointer dat) { win32exec("trad2sim.exe"); }
void cb_sim2trad(GtkCheckMenuItem *checkmenuitem, gpointer dat) { win32exec("sim2trad.exe"); }