void prof_run(const int disable_tls, char *log_level, char *account_name) { _init(disable_tls, log_level); _connect_default(account_name); ui_update(); char *line = NULL; gboolean cmd_result = TRUE; log_info("Starting main event loop"); while(cmd_result) { while(!line) { _check_autoaway(); line = ui_readline(); #ifdef HAVE_LIBOTR otr_poll(); #endif notify_remind(); jabber_process_events(); ui_update(); } cmd_result = cmd_process_input(line); ui_input_clear(); FREE_SET_NULL(line); } }
void prof_run(char *log_level, char *account_name) { _init(log_level); _connect_default(account_name); ui_update(); log_info("Starting main event loop"); activity_state = ACTIVITY_ST_ACTIVE; saved_status = NULL; char *line = NULL; while(cont) { log_stderr_handler(); _check_autoaway(); line = ui_readline(); if (line) { ProfWin *window = wins_get_current(); cont = cmd_process_input(window, line); free(line); line = NULL; } else { cont = TRUE; } #ifdef HAVE_LIBOTR otr_poll(); #endif notify_remind(); jabber_process_events(10); ui_update(); } }
void prof_run(char *log_level, char *account_name) { #ifdef PROF_HAVE_GTK gtk_ready = gtk_init_check(0, NULL); log_debug("Env is GTK-ready: %s", gtk_ready ? "true" : "false"); if (gtk_ready) { gtk_init(0, NULL); gtk_main_iteration_do(false); } #endif _init(log_level); plugins_on_start(); _connect_default(account_name); ui_update(); log_info("Starting main event loop"); activity_state = ACTIVITY_ST_ACTIVE; saved_status = NULL; char *line = NULL; while(cont && !force_quit) { log_stderr_handler(); _check_autoaway(); line = inp_readline(); if (line) { ProfWin *window = wins_get_current(); cont = cmd_process_input(window, line); free(line); line = NULL; } else { cont = TRUE; } #ifdef PROF_HAVE_LIBOTR otr_poll(); #endif plugins_run_timed(); notify_remind(); jabber_process_events(10); iq_autoping_check(); ui_update(); #ifdef PROF_HAVE_GTK if (gtk_ready) { gtk_main_iteration_do(false); } #endif } }
void prof_run(char *log_level, char *account_name) { _init(log_level); plugins_on_start(); _connect_default(account_name); ui_update(); log_info("Starting main event loop"); session_init_activity(); char *line = NULL; while(cont && !force_quit) { log_stderr_handler(); session_check_autoaway(); line = inp_readline(); if (line) { ProfWin *window = wins_get_current(); cont = cmd_process_input(window, line); free(line); line = NULL; } else { cont = TRUE; } #ifdef HAVE_LIBOTR otr_poll(); #endif plugins_run_timed(); notify_remind(); session_process_events(); iq_autoping_check(); ui_update(); #ifdef HAVE_GTK tray_update(); #endif } }