static bool Transfer_action(ia_t ia, unsigned argc, const char **argv) { ft_conf_t *p = NULL; action_debug("Transfer", ia, argc, argv); /* Make sure we're connected. */ if (!IN_3270) { popup_an_error("Transfer: Not connected"); return false; } /* Check for interactive mode. */ if (argc == 0) { if (!gui_conf_initted) { ft_init_conf(&gui_ft_conf); gui_ft_conf.is_action = true; gui_conf_initted = true; } switch (ft_gui_interact(&gui_ft_conf)) { case FGI_NOP: /* Hope the defaults are enough. */ break; case FGI_SUCCESS: /* Proceed as specified in the ft_state. */ p = &gui_ft_conf; break; case FGI_ABORT: /* User said no. */ return false; } } if (p == NULL) { /* Parse the keywords into the ft_state structure. */ p = parse_ft_keywords(argc, argv); if (p == NULL) { return false; } p->is_interactive = (ia == IA_COMMAND); } /* Start the transfer. */ fts.local_file = ft_go(p); if (fts.local_file == NULL) { return false; } /* If interactive, tell the user we're waiting. */ ft_gui_awaiting(); /* Set a timeout for failed command start. */ ft_start_id = AddTimeOut(10 * 1000, ft_didnt_start); /* Success. */ return true; }
bool Keypad_action(ia_t ia, unsigned argc, const char **argv) { action_debug("Keypad", ia, argc, argv); if (check_argc("Keypad", argc, 0, 0) < 0) { return false; } pop_up_keypad(true); return true; }
static void sighandler(int signum){ switch ( signum ){ case SIGINT: case SIGTERM: action_quit(); break; case SIGHUP: action_reload(); break; case SIGUSR1: action_debug(); } }
static void handle_debug(DBusMessage* message){ action_debug(); }