static void
_e_mod_config_schedule_start_working_cb(void *data, void *data2)
{
   E_Config_Schedule_Data *csd;
   E_Config_Dialog_Data *cfdata;

   if(!(csd = data)) return;
   if(!(cfdata = data2)) return;

   if(e_widget_disabled_get(csd->obstop) == EINA_TRUE)
     {
        e_widget_disabled_set(csd->obbreak, EINA_TRUE);
        e_widget_disabled_set(csd->obwork, EINA_TRUE);
        if(csd->lock == EINA_FALSE)
          {
             csd->lock = EINA_TRUE;
          }
        if(productivity_conf->secs_to_break)
          productivity_conf->secs_to_break = 0;
     }
   _e_mod_config_schedule_lock_update(csd);

   e_mod_config_schedule_save_config(cfdata);
   e_mod_config_worktools_save(cfdata);

   productivity_conf->init = E_MOD_PROD_INIT_START;
   ecore_timer_freeze(productivity_conf->wm);
   e_mod_config_window_manager_v2(productivity_conf->cwl);
   ecore_timer_thaw(productivity_conf->wm);

   e_config_save();
}
Exemple #2
0
static Eina_Bool
ping(Shotgun_Auth *auth)
{
   /**
    * Sends ping request to the server (iq tag)
    * (Re)Init the timeout timer, increase the pending pings counter
    */
   xml_iq_ping_write(auth);
   auth->pending_ping++;
   ecore_timer_reset(auth->et_ping_timeout);
   ecore_timer_thaw(auth->et_ping_timeout);

   return EINA_TRUE;
}
Exemple #3
0
void Timer::thaw ()
{
  ecore_timer_thaw (mETimer);
}
static int
_ecore_con_url_perform(Ecore_Con_Url *url_con)
{
   fd_set read_set, write_set, exc_set;
   int fd_max, fd;
   int flags, still_running;
   int completed_immediately = 0;

   _url_con_list = eina_list_append(_url_con_list, url_con);

   url_con->active = 1;
   curl_multi_add_handle(curlm, url_con->curl_easy);
   /* This one can't be stopped, or the download never start. */
   while (curl_multi_perform(curlm, &still_running) == CURLM_CALL_MULTI_PERFORM);

   completed_immediately = _ecore_con_url_process_completed_jobs(url_con);

   if (!completed_immediately)
     {
	if (url_con->fd_handler)
	  ecore_main_fd_handler_del(url_con->fd_handler);
	url_con->fd_handler = NULL;

	/* url_con still active -- set up an fd_handler */
	FD_ZERO(&read_set);
	FD_ZERO(&write_set);
	FD_ZERO(&exc_set);

	/* Stupid curl, why can't I get the fd to the current added job? */
	curl_multi_fdset(curlm, &read_set, &write_set, &exc_set, &fd_max);
	for (fd = 0; fd <= fd_max; fd++)
	  {
	     if (!FD_ISSET(fd, &_current_fd_set))
	       {
		  flags = 0;
		  if (FD_ISSET(fd, &read_set)) flags |= ECORE_FD_READ;
		  if (FD_ISSET(fd, &write_set)) flags |= ECORE_FD_WRITE;
		  if (FD_ISSET(fd, &exc_set)) flags |= ECORE_FD_ERROR;
		  if (flags)
		    {
		       long ms = 0;

		       curl_multi_timeout(curlm, &ms);
		       if (ms == 0) ms = 1000;

		       FD_SET(fd, &_current_fd_set);
		       url_con->fd = fd;
		       url_con->flags = flags;
		       url_con->fd_handler = 
                         ecore_main_fd_handler_add(fd, flags, 
                                                   _ecore_con_url_fd_handler,
                                                   NULL, NULL, NULL);
		       break;
		    }
	       }
	  }
	if (!url_con->fd_handler)
	  {
	     /* Failed to set up an fd_handler */
	     ecore_timer_freeze(_curl_timeout);
	     curl_multi_remove_handle(curlm, url_con->curl_easy);
	     url_con->active = 0;
	     url_con->fd = -1;
	     return 0;
	  }
	ecore_timer_thaw(_curl_timeout);
     }

   return 1;
}