Ejemplo n.º 1
0
static void _shutdown(EWeather *eweather)
{
   Instance *inst = eweather->plugin.data;

   if (inst->host) eina_stringshare_del(inst->host);

   if (inst->buffer) free(inst->buffer);

   if (inst->check_timer) ecore_timer_del(inst->check_timer);
   if (inst->add_handler) ecore_event_handler_del(inst->add_handler);
   if (inst->err_handler) ecore_event_handler_del(inst->err_handler);
   if (inst->data_handler) ecore_event_handler_del(inst->data_handler);
   if (inst->del_handler) ecore_event_handler_del(inst->del_handler);

   if (inst->server) ecore_con_server_del(inst->server);

   ecore_con_shutdown();
   free(inst);
}
Ejemplo n.º 2
0
static void
window_resize_cb (Ecore_Evas * ee)
{
  int x, y, w, h;
  Evas_Object *o = NULL;

  ecore_evas_geometry_get (ee, &x, &y, &w, &h);
  if (refresh_timer)
    ecore_timer_del (refresh_timer);
  refresh_timer = ecore_timer_add (RESIZE_REFRESH, fix_bg, ee);

  if ((o = evas_object_name_find (ecore_evas_get (ee), "background")))
    evas_object_resize (o, w, h);
  if ((o = evas_object_name_find (ecore_evas_get (ee), "container")))
    evas_object_resize (o, w, h);
  if ((o = evas_object_name_find (ecore_evas_get (ee), "dragger")))
    evas_object_resize (o, w, h);
  if ((o = evas_object_name_find (ecore_evas_get (ee), "xpixmap")))
    evas_object_resize (o, w, h);
}
Ejemplo n.º 3
0
static void 
_gc_shutdown(E_Gadcon_Client *gcc) 
{
   Instance *inst;
   
   inst = gcc->data;
   net_cfg->instances = eina_list_remove(net_cfg->instances, inst);
   if (inst->timer) ecore_timer_del(inst->timer);
   if (inst->o_net) 
     {
	evas_object_event_callback_del(inst->o_net, EVAS_CALLBACK_MOUSE_DOWN,
				       _net_cb_mouse_down);
	edje_object_signal_callback_del(inst->o_net, "e,action,mouse,in", "",
					_net_cb_mouse_in);
	edje_object_signal_callback_del(inst->o_net, "e,action,mouse,out", "",
					_net_cb_mouse_out);
	evas_object_del(inst->o_net);
     }
   E_FREE(inst);
}
Ejemplo n.º 4
0
EAPI int
ecore_con_url_shutdown(void)
{
   Ecore_Con_Url *url_con;
   Ecore_Fd_Handler *fd_handler;
   if (_init_count == 0) return 0;
   --_init_count;
   if (_init_count) return _init_count;
   if (_curl_timer)
     {
        ecore_timer_del(_curl_timer);
        _curl_timer = NULL;
     }
   EINA_LIST_FREE(_url_con_list, url_con)
     ecore_con_url_free(url_con);
   EINA_LIST_FREE(_fd_hd_list, fd_handler)
     ecore_main_fd_handler_del(fd_handler);
   _c_shutdown();
   ecore_shutdown();
   return 0;
}
Ejemplo n.º 5
0
Archivo: madpdf.c Proyecto: avm/madpdf
static void display_hint(double scroll_amount)
{
    if(!scroll_hint) {
        Ewl_Embed *emb = ewl_embed_widget_find(pdfwidget);
        scroll_hint = evas_object_line_add(emb->canvas);
        evas_object_color_set(scroll_hint, 0, 200, 0, 255);
    }

    int y_coord = round(scroll_amount);
    if(y_coord < 0) {
        y_coord += CURRENT_H(scrollpane);
    }
    evas_object_line_xy_set(scroll_hint,
            0, y_coord, CURRENT_W(scrollpane), y_coord);
    evas_object_show(scroll_hint);

    if(hint_timer) { // previously set, did not fire
        ecore_timer_del(hint_timer);
    }
    hint_timer = ecore_timer_add(2.0, hide_hint, NULL);
}
Ejemplo n.º 6
0
Eina_Bool delete_info(void *data){
	if(!is_downloading){
		ecore_timer_del(information_timer);
		delete_edj(&info);
		draw_edj(&menu[0], 0, 0);
		draw_edj(&menu[1], 0, 0);
		draw_edj(&menu[2], 0, 0);

		override_text(&bar, "menu_text", Categories_Names[y*3+x].c_str());
		override_text(&bar, "app_type_text", "");
		override_text(&bar, "app_version_text", "");
		draw_edj(&bar, Cursor_X[x], Cursor_Y[y]);
		draw_edj(&download, (REAL_WIDTH-(REAL_WIDTH*0.3125))/2, (REAL_HEIGHT-(REAL_HEIGHT*0.3055))/2);
		draw_edj(&download_perc, (REAL_WIDTH-(REAL_WIDTH*0.3125))/2, (REAL_HEIGHT-(REAL_HEIGHT*0.3055))/2);
		draw_edj(&download_ask, (REAL_WIDTH-(REAL_WIDTH*0.3125))/2, (REAL_HEIGHT-(REAL_HEIGHT*0.3055))/2);
		hide_edj(&download);
		hide_edj(&download_ask);
		hide_edj(&download_perc);
	}	
	return EINA_TRUE;
}
Ejemplo n.º 7
0
EINTERN int
e_randr2_shutdown(void)
{
   _animated_apply_abort();
   // nuke any screen config delay handler
   if (_screen_delay_timer) ecore_timer_del(_screen_delay_timer);
   _screen_delay_timer = NULL;
   // stop listening to driver info
   if (e_comp->screen->shutdown)
     e_comp->screen->shutdown();
   // clear up all event handlers
   E_FREE_LIST(_ev_handlers, ecore_event_handler_del);
   // free up screen info
   _info_free(e_randr2);
   e_randr2 = NULL;
   _config_free(e_randr2_cfg);
   e_randr2_cfg = NULL;
   // free up data descriptors
   E_CONFIG_DD_FREE(_e_randr2_cfg_edd);
   E_CONFIG_DD_FREE(_e_randr2_cfg_screen_edd)
   return 1;
}
Ejemplo n.º 8
0
static void
_gc_shutdown (E_Gadcon_Client * gcc)
{
   Instance *inst;
   Uptime *ut;

   if (!gcc) return;
   if (!gcc->data) return;

   inst = gcc->data;
   if (!(ut = inst->ut)) return;

   if (inst->monitor) ecore_timer_del (inst->monitor);

   ut_config->instances = eina_list_remove (ut_config->instances, inst);
   evas_object_event_callback_del (ut->ut_obj, EVAS_CALLBACK_MOUSE_DOWN,
				   _ut_cb_mouse_down);

   _ut_free (ut);
   free (inst);
   inst = NULL;
}
Ejemplo n.º 9
0
void GestureRecognizer::doubleTapGesture(WKTouchEventRef eventRef)
{
    WKArrayRef touchPoints = WKTouchEventGetTouchPoints(eventRef);

    switch (WKTouchEventGetType(eventRef)) {
    case kWKEventTypeTouchStart: {
        if (m_doubleTapTimer) {
            ecore_timer_del(m_doubleTapTimer);
            m_doubleTapTimer = 0;
        }

        size_t numberOfTouchPoints = WKArrayGetSize(touchPoints);
        if (numberOfTouchPoints == 1) {
            if (exceedsDoubleTapThreshold(m_firstPressedPoint, toIntPoint(getPointAtIndex(touchPoints, 0))))
                m_recognizerFunction = &GestureRecognizer::singleTapGesture;
        } else {
            m_recognizerFunction = &GestureRecognizer::pinchGesture;
            m_gestureHandler->handlePinchStarted(createVectorWithWKArray(touchPoints, 2));
        }
        break;
    }
    case kWKEventTypeTouchMove: {
        IntPoint currentPoint = toIntPoint(getPointAtIndex(touchPoints, 0));
        if (exceedsPanThreshold(m_firstPressedPoint, currentPoint)) {
            m_recognizerFunction = &GestureRecognizer::panGesture;
            m_gestureHandler->handlePanStarted(currentPoint);
        }
        break;
    }
    case kWKEventTypeTouchEnd:
        m_gestureHandler->handleDoubleTap(m_firstPressedPoint);
        m_recognizerFunction = &GestureRecognizer::noGesture;
        break;
    default:
        ASSERT_NOT_REACHED();
        break;
    }
}
Ejemplo n.º 10
0
/* Function for calling our personal dialog menu */
E_Config_Dialog *
e_int_config_eplanet_module(E_Container *con, const char *params)
{
   E_Config_Dialog *cfd = NULL;
   E_Config_Dialog_View *v = NULL;
   char buf[4096];

   /* is this config dialog already visible ? */
   if (e_config_dialog_find("EPlanet", CONFIG_WIN_CLASS)) return NULL;

   // Disable the timer so xplanet won't run while the config dialog is open
   if (eplanet_conf->bg_set_timer)
   {
      ecore_timer_del(eplanet_conf->bg_set_timer);
      eplanet_conf->bg_set_timer = NULL;
   }

   v = E_NEW(E_Config_Dialog_View, 1);
   if (!v) return NULL;

   v->create_cfdata = _create_data;
   v->free_cfdata = _free_data;
   v->basic.create_widgets = _basic_create;
   v->basic.apply_cfdata = _basic_apply;

   /* Icon in the theme */
   snprintf(buf, sizeof(buf), "%s/e-module-eplanet.edj",
         eplanet_conf->module->dir);

   /* create our config dialog */
   cfd = e_config_dialog_new(con, D_("EPlanet Configuration"), "EPlanet",
         "advanced/eplanet", buf, 0, v, NULL);

   e_dialog_resizable_set(cfd->dia, 1);
   eplanet_conf->cfd = cfd;

   return cfd;
}
Ejemplo n.º 11
0
EAPI int
e_modapi_shutdown(E_Module *m)
{
   e_gadcon_provider_unregister((const E_Gadcon_Client_Class *)&_gadcon_class);
   
   if (alarm_config->alarms)
     {
        while (eina_list_count(alarm_config->alarms))
          {
             Alarm *al;
             al = eina_list_data_get(alarm_config->alarms);
             alarm_alarm_del(al);
          }
        eina_list_free(alarm_config->alarms);
     }
   if (alarm_config->alarms_ring_etimer)
     ecore_timer_del(alarm_config->alarms_ring_etimer);
   if (alarm_config->alarms_program_default)
     eina_stringshare_del(alarm_config->alarms_program_default);

   if (alarm_config->theme)
     free(alarm_config->theme);
   if (alarm_config->config_dialog) 
     e_object_del(E_OBJECT(alarm_config->config_dialog));
   if (alarm_config->config_dialog_alarm_new) 
     e_object_del(E_OBJECT(alarm_config->config_dialog_alarm_new));
   if (alarm_config->menu)
     {
	e_menu_post_deactivate_callback_set(alarm_config->menu , NULL, NULL);
	e_object_del(E_OBJECT(alarm_config->menu));
     }

   E_FREE(alarm_config);
   E_CONFIG_DD_FREE(_alarms_edd);
   E_CONFIG_DD_FREE(_conf_edd);

   return 1;
}
Ejemplo n.º 12
0
void
_wlan_config_updated (Config_Item *ci)
{
  Eina_List *l;

  if (!wlan_config) return;
  for (l = wlan_config->instances; l; l = l->next)
    {
      Instance *inst;

      inst = l->data;
      if (inst->ci != ci) continue;

      if (inst->check_timer)
	ecore_timer_del (inst->check_timer);
      inst->check_timer =
	      ecore_timer_add (inst->ci->poll_time, _wlan_cb_check, inst);
      if (inst->ci->always_text)
	edje_object_signal_emit (inst->wlan_obj, "label_active", "");
      else
	edje_object_signal_emit (inst->wlan_obj, "label_passive", "");
    }
}
Ejemplo n.º 13
0
static void
_gc_shutdown (E_Gadcon_Client * gcc)
{
  Instance *inst;

  inst = gcc->data;

  if (inst->check_timer)
    ecore_timer_del (inst->check_timer);
   
  evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_DOWN,
				  _mail_cb_mouse_down);
  evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_IN,
				  _mail_cb_mouse_in);
  evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_OUT,
				  _mail_cb_mouse_out);

  if (inst->popup) e_object_del (E_OBJECT (inst->popup));
  mail_config->instances = eina_list_remove (mail_config->instances, inst);
  _mail_free (inst->mail);
  free (inst);
  inst = NULL;
}
Ejemplo n.º 14
0
static void
_gc_shutdown (E_Gadcon_Client * gcc)
{
  Instance *inst;

  inst = gcc->data;
  if (inst->update_timer)
    ecore_timer_del (inst->update_timer);
  _mpdule_disconnect (inst);
  mpdule_config->instances =
    eina_list_remove (mpdule_config->instances, inst);

  evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_DOWN,
				  _mpdule_cb_mouse_down);
  evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_IN,
				  _mpdule_cb_mouse_in);
  evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_OUT,
				  _mpdule_cb_mouse_out);
  _mpdule_popup_destroy (inst);
  evas_object_del (inst->mpdule);
  free (inst);
  inst = NULL;
}
static void __common_pbc_popup_destroy(pbc_popup_t *pbc_popup_data)
{
	__COMMON_FUNC_ENTER__;
	if (!pbc_popup_data)
		return;

	if (pbc_popup_data->checker == 0) {
		pbc_popup_data->checker = 1;

		if (pbc_popup_data->timer != NULL) {
			ecore_timer_del(pbc_popup_data->timer);
			pbc_popup_data->timer = NULL;
		}
		if (pbc_popup_data->popup != NULL) {
			evas_object_hide(pbc_popup_data->popup);
			evas_object_del(pbc_popup_data->popup);
			pbc_popup_data->popup = NULL;
		}
		g_free(pbc_popup_data);
	}
	__COMMON_FUNC_EXIT__;
	return;
}
Ejemplo n.º 16
0
static void
_activate(Evas_Object *obj)
{
   ELM_BUTTON_DATA_GET_OR_RETURN(obj, sd);

   if (sd->timer)
     {
        ecore_timer_del(sd->timer);
        sd->timer = NULL;
     }

   sd->repeating = EINA_FALSE;

   if ((_elm_config->access_mode == ELM_ACCESS_MODE_OFF) ||
       (_elm_access_2nd_click_timeout(obj)))
     {
        if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
          _elm_access_say(E_("Clicked"));
        if (!elm_widget_disabled_get(obj) &&
            !evas_object_freeze_events_get(obj))
          evas_object_smart_callback_call(obj, SIG_CLICKED, NULL);
     }
}
Ejemplo n.º 17
0
Archivo: dvb.c Proyecto: Limsik/e17
void
dvb_shutdown(void)
{
   if (!o_dvb_bg) return;
   if (!_hide_timer)
     {
	menu_show();
	background_show();
	mini_pause_set(0);
     }
   else
     {
	ecore_timer_del(_hide_timer);
	_hide_timer = NULL;
     }
   
   evas_object_del(o_dvb_bg);
   evas_object_del(o_dvb);
   if (dvb_stopped_job) ecore_job_del(dvb_stopped_job);
   o_dvb = NULL;
   o_dvb_bg = NULL;
   dvb_stopped_job = NULL;
}
Ejemplo n.º 18
0
static void _default_scroll_start(Container *cont, double velocity)
{
  double length, size;

  length = esmart_container_elements_length_get(cont->obj);
  size = cont->direction ? cont->h : cont->w;
   
  /* Stop other scrolling in process*/
  if (cont->scroll.timer)
  {
    ecore_timer_del(cont->scroll.timer);  
    cont->scroll.timer = NULL;
  }
   
  /* don't scroll unless the elements exceed the size of the container */
  if (length <= size)
    return;
  
  cont->scroll.velocity = velocity;
  cont->scroll.start_time = ecore_time_get();
 
  cont->scroll.timer = ecore_timer_add(.02, _container_scroll_timer, cont);
}
Ejemplo n.º 19
0
/**
 * @brief Set a timeout to disconnect after no activity
 * @param e The #Esql object (NOT NULL)
 * @param timeout The timeout in seconds
 *
 * Use this function to apply a timer policy to an Esql object and force disconnection
 * after @p timeout seconds of inactivity.
 * @note Setting a value <= 0 will disable this feature.
 */
void
esql_connect_timeout_set(Esql  *e,
                         double timeout)
{
   EINA_SAFETY_ON_NULL_RETURN(e);

   e->timeout = timeout;
   if (e->pool)
     {
        esql_pool_connect_timeout_set((Esql_Pool*)e, timeout);
        return;
     }
   if (timeout > 0.0)
     {
        if (e->timeout_timer) ecore_timer_delay(e->timeout_timer, e->timeout - ecore_timer_pending_get(e->timeout_timer));
        else e->timeout_timer = ecore_timer_add(timeout, (Ecore_Task_Cb)esql_timeout_cb, e);
     }
   else
     {
        ecore_timer_del(e->timeout_timer);
        e->timeout_timer = NULL;
        e->timeout = 0;
     }
}
Ejemplo n.º 20
0
EAPI void
e_focus_event_mouse_in(E_Border* bd)
{
   if ((e_config->focus_policy == E_FOCUS_MOUSE) ||
       (e_config->focus_policy == E_FOCUS_SLOPPY))
     {
	e_border_focus_set(bd, 1, 1);
     }
   if (bd->raise_timer) ecore_timer_del(bd->raise_timer);
   bd->raise_timer = NULL;
   if (e_config->use_auto_raise)
     {
	if (e_config->auto_raise_delay == 0.0)
	  {
	     if (!bd->lock_user_stacking)
	       {
		  if (e_config->border_raise_on_focus)
		    e_border_raise(bd);
	       }
	  }
	else
	  bd->raise_timer = ecore_timer_add(e_config->auto_raise_delay, _e_focus_raise_timer, bd);
     }
}
Ejemplo n.º 21
0
void
e_syscon_hide(void)
{
   if (!popup) return;

   if (deftimer)
     {
        ecore_timer_del(deftimer);
        deftimer = NULL;
     }
   if (do_defact) eina_stringshare_del(do_defact);
   do_defact = NULL;
   while (handlers)
     {
        ecore_event_handler_del(handlers->data);
        handlers = eina_list_remove_list(handlers, handlers);
     }
   e_popup_hide(popup);
   e_object_del(E_OBJECT(popup));
   popup = NULL;
   e_grabinput_release(input_window, input_window);
   ecore_x_window_free(input_window);
   input_window = 0;
}
Ejemplo n.º 22
0
void 
_ecore_wl_input_del(Ecore_Wl_Input *input)
{
   if (!input) return;

   _pointer_update_stop(input);

   if (input->cursor_name) eina_stringshare_del(input->cursor_name);
   input->cursor_name = NULL;

   if (input->touch_focus)
     {
        input->touch_focus = NULL;
     }

   if (input->pointer_focus)
     {
        Ecore_Wl_Window *win = NULL;

        if ((win = input->pointer_focus))
          win->pointer_device = NULL;

        input->pointer_focus = NULL;
     }

   if (input->keyboard_focus)
     {
        Ecore_Wl_Window *win = NULL;

        if ((win = input->keyboard_focus))
          win->keyboard_device = NULL;

        input->keyboard_focus = NULL;
     }

   if (input->data_types.data)
     {
        char **t;

        wl_array_for_each(t, &input->data_types)
          free(*t);
        wl_array_release(&input->data_types);
     }

   if (input->data_source) wl_data_source_destroy(input->data_source);
   input->data_source = NULL;

   if (input->drag_source) _ecore_wl_dnd_del(input->drag_source);
   input->drag_source = NULL;

   if (input->selection_source) _ecore_wl_dnd_del(input->selection_source);
   input->selection_source = NULL;

   if (input->data_device) wl_data_device_destroy(input->data_device);

   if (input->xkb.state)
     xkb_state_unref(input->xkb.state);
   if (input->xkb.keymap)
     xkb_map_unref(input->xkb.keymap);

   if (input->cursor_surface)
     wl_surface_destroy(input->cursor_surface);

   _ecore_wl_disp->inputs = eina_inlist_remove
      (_ecore_wl_disp->inputs, EINA_INLIST_GET(input));
   if (input->seat) wl_seat_destroy(input->seat);

   if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
   input->repeat.tmr = NULL;

   free(input);
}
static void indicator_clock_changed_cb(void *data)
{
	struct appdata *ad = (struct appdata *)data;
	char time_str[32];
	char time_buf[128], ampm_buf[128];
	char buf[256];
	struct tm *ts = NULL;
	time_t ctime;
	int len;

	retif(data == NULL, , "Invalid parameter!");

	/* Set time */
	ctime = time(NULL);
	ts = localtime(&ctime);
	if (ts == NULL)
		return;

	if (timer != NULL) {
		ecore_timer_del(timer);
		timer = NULL;
	}

	memset(time_str, 0x00, sizeof(time_str));
	memset(time_buf, 0x00, sizeof(time_buf));
	memset(ampm_buf, 0x00, sizeof(ampm_buf));
	memset(buf, 0x00, sizeof(buf));

	timer =
	    ecore_timer_add(60 - ts->tm_sec, (void *)indicator_clock_changed_cb,
			    data);
	if (clock_mode == INDICATOR_CLOCK_MODE_12H) {
		char bf1[32] = { 0, };
		int hour;
		if (ts->tm_hour >= 0 && ts->tm_hour < 12)
			snprintf(ampm_buf, sizeof(ampm_buf),
				 LABEL_STRING, AMPM_FONT_SIZE,
				 _("IDS_COM_POP_AM_M_ABB"));
		else
			snprintf(ampm_buf, sizeof(ampm_buf),
				 LABEL_STRING, AMPM_FONT_SIZE,
				 _("IDS_COM_POP_PM_M_ABB"));

	        strftime(bf1, sizeof(bf1), "%l", ts);
	        hour = atoi(bf1);
        	strftime(bf1, sizeof(bf1), ":%M", ts);

	        snprintf(time_str, sizeof(time_str), "%d%s", hour, bf1);
//		strftime(time_str, sizeof(time_str), "%I:%M", ts);
	} else {
		strftime(time_str, sizeof(time_str), "%H:%M", ts);
	}

	snprintf(time_buf, sizeof(time_buf), LABEL_STRING,
		 TIME_FONT_SIZE, time_str);
	len = snprintf(buf, sizeof(buf), "%s%s", time_buf, ampm_buf);
	if (len < 0) {
		ERR("Unexpected ERROR!");
		return;
	}

	INFO("[CLOCK MODULE] Timer Status : %d Time: %s", timer, buf);

	edje_object_part_text_set(elm_layout_edje_get(ad->layout_main),
				  "elm.text.clock", buf);
	return;
}
Ejemplo n.º 24
0
static Eina_Bool
_ecore_event_evas_push_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press press)
{
   Ecore_Event_Last *eel;
   Ecore_Input_Action action = ECORE_INPUT_CONTINUE;

   //_ecore_event_evas_mouse_button already check press or cancel without history
   eel = _ecore_event_evas_lookup(e->multi.device, e->buttons, e->window, EINA_TRUE);
   if (!eel) return EINA_FALSE;
   INF("dev(%d), button(%d), last_press(%d), press(%d)", e->multi.device, e->buttons, eel->state, press);

   if (e->window == eel->win)
     action = _ecore_event_last_check(eel, press);
   INF("action(%d)", action);
   switch (action)
     {
      case ECORE_INPUT_FAKE_UP:
         _ecore_event_evas_mouse_button(e, ECORE_UP, EINA_TRUE);
      case ECORE_INPUT_CONTINUE:
         break;
      case ECORE_INPUT_IGNORE:
      default:
        eel->win = e->window;
        return EINA_FALSE;
     }

   switch (press)
     {
      case ECORE_DOWN:
        eel->state = ECORE_INPUT_DOWN;
        break;
      case ECORE_UP:
        eel->state = ECORE_INPUT_UP;
        break;
      default:
        break;
     }
   eel->win = e->window;

   //if up event not occurs from under layers of ecore
   //up event is generated by ecore
   if (_last_events_enable && _last_events_timeout)
     {
        if (eel->timer) ecore_timer_del(eel->timer);
        eel->timer = NULL;
        if (press == ECORE_DOWN)
          {
             /* Save the Ecore_Event somehow */
             if (!eel->ev) eel->ev = malloc(sizeof (Ecore_Event_Mouse_Button));
             if (!eel->ev) return EINA_FALSE;
             memcpy(eel->ev, e, sizeof (Ecore_Event_Mouse_Button));
             eel->timer = ecore_timer_add(_last_events_timeout, _ecore_event_evas_push_fake, eel);
          }
        else
          {
             free(eel->ev);
             eel->ev = NULL;
          }
     }
   return EINA_TRUE;
}
Ejemplo n.º 25
0
static void
parse_cmd(char *cmd)
{
   char *p, *q;
   char buf[4096];

   p = buf;
   for (q = cmd; *q && (*q != ' ') && (p < (buf + sizeof(buf) - 1)); q++)
     {
        *p = *q;
        p++;
     }
   *p = 0;
   if (*q == ' ') q++;
   
   if (timeout) 
     {
        ecore_timer_del(timeout);
        timeout = NULL;
        timeout = ecore_timer_add(timeout_seconds, _ipc_cb_timeout, NULL);
     }
   
   if (!strcmp(buf, "QUIT"))
     {
        ecore_main_loop_quit();
     }
   else if (!strcmp(buf, "PROGRESS"))
     {
	theme_progress_set(atoi(q) / 100.0);
     }
   else if (!strcmp(buf, "MSG"))
     {
        theme_message_set(q);
     }
   else if (!strcmp(buf, "TITLE"))
     {
        theme_title_set(q);
     }
   else if (!strcmp(buf, "END"))
     {
        theme_exit(_ipc_cb_theme_exit_done, NULL);
     }
   else if (!strcmp(buf, "TICK"))
     {
	theme_tick();
     }
   else if (!strcmp(buf, "PULSATE"))
     {
	theme_pulsate();
     }
   else if (!strcmp(buf, "TEXT"))
     {
        if (!(flags & EXQUISITE_FLAG_QUIET))
          theme_text_add(q);
     }
   else if (!strcmp(buf, "TEXT-URGENT"))
     {
        theme_text_add(q);
     }
   else if (!strcmp(buf, "STATUS"))
     {
        theme_status_set(q, -1);
     }
   else if (!strcmp(buf, "SUCCESS"))
     {
        theme_status_set(q, 1);
     }
   else if (!strcmp(buf, "FAILURE"))
     {
        theme_status_set(q, 0);
     }
   else if (!strcmp(buf, "CLEAR"))
     {
        theme_text_clear();
     }
   else if (!strcmp(buf, "TIMEOUT"))
     {
        timeout_seconds = atoi(q);
        if (timeout) 
          {
             ecore_timer_del(timeout);
             timeout = NULL;
          }
        timeout = ecore_timer_add(timeout_seconds, _ipc_cb_timeout, NULL);
     }
}
Ejemplo n.º 26
0
void
vm_info_cb(void *data, Evas_Object *obj, void *event_info)
{
	Elm_Genlist_Item *gl;
	vmitem *item;
	zrpc_vm *vm;
	const char *os_icon, *state;
	char tmp[PATH_MAX];
	Eina_List *l;
	zrpc_disk *d;
	zrpc_vif *v;
	int cpus;

	elm_toolbar_item_unselect_all(win->main_vm->bar);
	gl = elm_genlist_selected_item_get(win->main_vm->list);
	if (!gl) return;

	ecore_timer_del(win->timerget);

	item = (vmitem*)elm_genlist_item_data_get(gl);
	vm = item->vm;
	win->info->vmuuid = eina_stringshare_ref(vm->uuid);
	evas_object_smart_callback_del(win->main_vm->list, "clicked", vm_info_cb);
	create_info_vm();
	win->info->state = NULL;
	zinfo_job_updatevm(win);


	for (cpus = 0;cpus < vm->vcpus;cpus++)
	{
		
		win->info->cpus = elm_icon_add(win->win);
		elm_icon_file_set(win->info->cpus, "images/cpu.png", NULL);
		elm_icon_scale_set(win->info->cpus, 0, 0);
		elm_icon_smooth_set(win->info->cpus, 1);
		evas_object_size_hint_weight_set(win->info->state_icon, 0.0, 0.0);
		evas_object_size_hint_align_set(win->info->state_icon, 0.0, 1.0);
		elm_box_pack_after(win->info->vbox2, win->info->cpus, win->info->state_label);
		evas_object_show(win->info->cpus);
	}

	elm_frame_label_set(win->info->frame, vm->name);
	os_icon = get_os_icon(vm);
	elm_icon_file_set(win->info->os_icon, os_icon, NULL);
	eina_stringshare_del(os_icon);
	elm_label_label_set(win->info->os, vm->os);
	elm_label_label_set (win->info->uuid, vm->uuid);
	elm_label_label_set(win->info->puuid, vm->puuid);
	EINA_LIST_FOREACH(vm->disks, l, d)
		elm_hoversel_item_add(win->info->disks, d->ext_dev, NULL, ELM_ICON_NONE, NULL, d);
		
	state = get_state_icon(vm->state);
	elm_icon_file_set(win->info->state_icon, state, NULL);
	eina_stringshare_del(state);

	EINA_LIST_FOREACH(vm->vifs, l, v)
		elm_hoversel_item_add(win->info->vifs, v->name, NULL, ELM_ICON_NONE, NULL, v);


	sprintf(tmp, "Kernel: %s", vm->kernel);
	elm_label_label_set(win->info->kernel, tmp);
	sprintf(tmp, "Ramdisk: %s", vm->ramdisk);
	elm_label_label_set(win->info->ramdisk, tmp);
	sprintf(tmp, "Kernel args: %s", vm->cmdline);
	elm_label_label_set(win->info->cmdline, tmp);

	evas_object_key_ungrab(win->win, "Up", 0, 0);
	evas_object_key_ungrab(win->win, "Down", 0, 0);
	evas_object_key_ungrab(win->win, "Left", 0, 0);
	evas_object_key_ungrab(win->win, "Right", 0, 0);
	evas_object_key_ungrab(win->win, "Home", 0, 0);
	evas_object_key_ungrab(win->win, "End", 0, 0);
	
	elm_flip_content_back_set(win->main_vm->fl, win->info->frame);
	win->view = win->info->vmview;
	elm_flip_go(win->main_vm->fl, ELM_FLIP_ROTATE_X_CENTER_AXIS);

	EINA_LIST_FREE(win->elist, item)
		free_vmitem(item);
	win->elist = NULL;
	eina_list_free(win->list);
	win->list = NULL;
	evas_object_hide(win->main_vm->box2);
	evas_object_del(win->main_vm->box2);

	win->timerget = ecore_timer_add(5, zinfo_job_updatevm, NULL);
}
Ejemplo n.º 27
0
void
_efl_ui_slider_interval_val_fetch(Evas_Object *obj, Efl_Ui_Slider_Interval_Data *pd, Eina_Bool user_event)
{
   double posx = 0.0, posy = 0.0, pos = 0.0, val;
   double posx2 = 0.0, posy2 = 0.0, pos2 = 0.0, val2;

   EFL_UI_SLIDER_DATA_GET(obj, sd);
   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);

   if (elm_widget_is_legacy(obj))
     efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable.slider"),
                           &posx, &posy);
   else
     efl_ui_drag_value_get(efl_part(wd->resize_obj, "efl.dragable.slider"),
                           &posx, &posy);
   if (efl_ui_dir_is_horizontal(sd->dir, EINA_TRUE)) pos = posx;
   else pos = posy;

   if (elm_widget_is_legacy(obj))
     efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable2.slider"),
                           &posx2, &posy2);
   else
     efl_ui_drag_value_get(efl_part(wd->resize_obj, "efl.dragable2.slider"),
                           &posx2, &posy2);
   if (efl_ui_dir_is_horizontal(sd->dir, EINA_TRUE)) pos2 = posx2;
   else pos2 = posy2;

   val = (pos * (sd->val_max - sd->val_min)) + sd->val_min;
   val2 = (pos2 * (sd->val_max - sd->val_min)) + sd->val_min;

   if (val > pd->intvl_to)
     {
        val = pd->intvl_to;
        efl_ui_slider_val_set(obj);
     }
   else if (val2 < pd->intvl_from)
     {
        val2 = pd->intvl_from;
        efl_ui_slider_val_set(obj);
     }

   if (fabs(val - pd->intvl_from) > DBL_EPSILON)
     {
        sd->val = val;
        pd->intvl_from = val;
        if (user_event)
          {
             efl_event_callback_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL);
             efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL);
             ecore_timer_del(pd->delay);
             pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj);
          }
     }

   if (fabs(val2 - pd->intvl_to) > DBL_EPSILON)
     {
        pd->intvl_to = val2;
        if (user_event)
          {
             efl_event_callback_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL);
             efl_event_callback_legacy_call(obj, EFL_UI_SLIDER_EVENT_CHANGED, NULL);
             ecore_timer_del(pd->delay);
             pd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj);
          }
     }
}
Ejemplo n.º 28
0
/**
 * @param argc: Number of command line arguments supplied.
 * @param argv: Char* array containing the command line arguments supplied.
 * @return: To the system, normally 0.
 * @brief: The first function once enotes is called.
 */
int
main(int argc, char *argv[])
{
	int             note_count;

	/* IPC Check */
	ecore_ipc_init();
	dml("IPC Initiated Successfully", 1);

	/* loading will increment this if there are notes if not we may need to
	 * create a blank one */
	note_count = 0;

	if ((ecore_config_init("enotes")) == ECORE_CONFIG_ERR_FAIL) {
		ecore_ipc_shutdown();
		return (-1);
	}
	ecore_app_args_set(argc, (const char **) argv);

	ecore_config_app_describe("E-Notes - Sticky Notes for Enlightenment\n\
Copyright (c) Thomas Fletcher\n\
Usage: enotes [options]");

	/* Read the Usage and Configurations */
	main_config = mainconfig_new();
	if (read_configuration(main_config) != ECORE_CONFIG_PARSE_CONTINUE) {
		ecore_config_shutdown();
		ecore_ipc_shutdown();
		ecore_shutdown();
		mainconfig_free(main_config);
		return (-1);
	}

	dml("Successfully Read Configurations and Usage", 1);

	process_note_storage_locations();

	if (find_server() != 0) {
		if (remotecmd != NULL)
			send_to_server(remotecmd);
		else
			send_to_server("DEFNOTE");
	} else {
		dml("Server wasn't found.. Creating one", 1);
		/* Setup Server */
		setup_server();

		/* Initialise the E-Libs */
		ecore_init();
		ecore_x_init(NULL);
		ecore_app_args_set(argc, (const char **) argv);
		if (!ecore_evas_init()) {
			mainconfig_free(main_config);
			return -1;
		}
		ewl_init(&argc, argv);
		edje_init();

		dml("Efl Successfully Initiated", 1);

		autoload();
		/* create autosave timer */
		update_autosave();

		if (remotecmd != NULL)
			handle_ipc_message(remotecmd);

		/* Begin the Control Centre */
		if (main_config->controlcentre == 1) {
			setup_cc();
			dml("Control Centre Setup", 1);
		} else {
			dml("No Control Centre - Displaying Notice", 1);
			if (get_note_count() == 0)
				new_note();
		}

		if (main_config->welcome == 1) {
			open_welcome();
		}

		/* Begin the main loop */
		dml("Starting Main Loop", 1);
		ecore_main_loop_begin();

		dml("Main Loop Ended", 1);

		/* Save Controlcentre Settings */
		set_cc_pos();

		autosave();
		if (autosave_timer)
			ecore_timer_del(autosave_timer);

		/* Save and Free the Configuration */
		ecore_config_save();
		dml("Configuration Saved", 1);
		mainconfig_free(main_config);
		dml("Configuration Structure Free'd", 1);

		/* Shutdown the E-Libs */
		edje_shutdown();
		ecore_evas_shutdown();
		ecore_x_shutdown();
		ecore_shutdown();
		dml("Efl Shutdown", 1);
	}

	/* End IPC */
	ecore_ipc_shutdown();
	dml("IPC Shutdown", 1);

	dml("Leaving.", 1);
	return (0);
}
Ejemplo n.º 29
0
/*
 * Build the config dialog
 */
static Evas_Object *
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
   Evas_Object *list = NULL, *table = NULL, *subtable = NULL,
         *framelist = NULL, *widget = NULL, *toolbook = NULL;
   E_Radio_Group *rg;
   struct sysinfo meminfo;
   long long memSize;

   // Remove the update timer - has the effect of
   // aborting any current updates
   if (eplanet_conf->bg_set_timer) {
	   ecore_timer_del(eplanet_conf->bg_set_timer);
   }

   // Get total physical RAM for free mem slider
   // Limit to 1024Mb
   sysinfo(&meminfo);
   memSize = meminfo.totalram;
   memSize = memSize / 1024 / 1024;
   if (memSize > 1024)
      memSize = 1024;

   toolbook = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);

   /* Behaviour Tab */
   list = e_widget_list_add(evas, 0, 0);
   widget = e_widget_label_add(evas, D_("Update background every"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%2.0f minutes"), 1, 60, 1, 0,
         NULL, &(cfdata->delay), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas, D_("Delay first background change for"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.0f seconds"), 1, 120, 1, 0,
         NULL, &(cfdata->startDelay), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Run XPlanet using priority"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%1.0f"), ecore_exe_run_priority_get(), 19, 1, 0,
         NULL, &(cfdata->taskPriority), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Don't run if system load is greater than"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.1f"), 1, 32, 0.5, 0,
         &(cfdata->loadLimit), NULL, 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

   widget = e_widget_label_add(evas,
         D_("Don't run if available RAM is less than"));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
   widget = e_widget_slider_add(evas, 1, 0, ("%3.0f Mb"), 0, memSize, 16, 0, NULL,
         &(cfdata->minRamLimit), 200);
   e_widget_list_object_append(list, widget, 1, 1, 0.5);

/*
   widget = e_widget_check_add(evas,
         D_("Do not change background if on battery power"),
         &(cfdata->disableOnBattery));
   e_widget_list_object_append(list, widget, 1, 1, 0.5);
*/

   // Add behaviour tab to dialog
   e_widget_toolbook_page_append(toolbook, NULL, D_("Behaviour"), list, 0, 0,
         0, 0, 0.5, 0.0);

   /* XPlanet Tab */
   table = e_widget_table_add(evas, 0);

   // Target
   framelist = e_widget_framelist_add(evas, D_("Target"), 0);

   widget = e_widget_ilist_add(evas, 16, 16, NULL);
   cfdata->gui.o_body_ilist = widget;
   e_widget_ilist_multi_select_set(widget, 0);
   e_widget_size_min_set(widget, 160, 150);

   e_widget_framelist_object_append(framelist, widget);
   e_widget_table_object_append(table, framelist, 0, 0, 1, 1, 1, 1, 0, 1);

   // View Type
   framelist = e_widget_framelist_add(evas, D_("View Type"), 0);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.source_type));
   widget = e_widget_radio_add(evas, D_("Origin"), SOURCE_ORIGIN, rg);
   cfdata->gui.o_origin_toggle = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_source_type, cfdata);
   e_widget_framelist_object_append(framelist, widget);

   widget = e_widget_radio_add(evas, D_("Projection"), SOURCE_PROJECTION, rg);
   cfdata->gui.o_projection_toggle = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_source_type, cfdata);
   e_widget_framelist_object_append(framelist, widget);

   widget = e_widget_ilist_add(evas, 16, 16, NULL);
   cfdata->gui.o_source_ilist = widget;
   e_widget_ilist_multi_select_set(widget, 0);
   e_widget_size_min_set(widget, 160, 150);
   e_widget_framelist_object_append(framelist, widget);

   e_widget_table_object_append(table, framelist, 1, 0, 1, 1, 1, 1, 0, 1);

   // Label
   framelist = e_widget_framelist_add(evas, D_("Label"), 0);
   subtable = e_widget_table_add(evas, 0);

   widget = e_widget_check_add(evas, D_("Show label"),
         &(cfdata->gui.show_label));
   evas_object_smart_callback_add(widget, "changed", _cb_show_label, cfdata);
   cfdata->gui.o_show_label = widget;
   e_widget_table_object_append(subtable, widget, 0, 0, 3, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Label text:"));
   e_widget_table_object_append(subtable, widget, 0, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_label_text = widget;
   e_widget_table_object_append(subtable, widget, 1, 1, 2, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Time:"));
   e_widget_table_object_append(subtable, widget, 0, 2, 1, 1, 1, 1, 0, 1);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.label_time));
   widget = e_widget_radio_add(evas, D_("Local"), LABEL_TIME_LOCAL, rg);
   cfdata->gui.o_label_time_local_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("GMT"), LABEL_TIME_GMT, rg);
   cfdata->gui.o_label_time_gmt_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Position:"));
   e_widget_table_object_append(subtable, widget, 0, 3, 1, 1, 1, 1, 0, 1);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.label_pos));
   widget = e_widget_radio_add(evas, D_("Top left"), LABEL_POS_TL, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_tl_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 3, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Top right"), LABEL_POS_TR, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_tr_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 3, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Bottom left"), LABEL_POS_BL, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_bl_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 4, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Bottom right"), LABEL_POS_BR, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_br_toggle = widget;
   e_widget_table_object_append(subtable, widget, 2, 4, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Other"), LABEL_POS_OTHER, rg);
   evas_object_smart_callback_add(widget, "changed", _cb_label_pos, cfdata);
   cfdata->gui.o_label_pos_other_toggle = widget;
   e_widget_table_object_append(subtable, widget, 1, 5, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_label_pos_other_text = widget;
   e_widget_table_object_append(subtable, widget, 2, 5, 2, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Font:"));
   e_widget_table_object_append(subtable, widget, 0, 6, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Not yet implemented"));
   e_widget_table_object_append(subtable, widget, 1, 6, 2, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);

   e_widget_table_object_append(table, framelist, 2, 0, 1, 1, 1, 1, 1, 1);

   // Viewing Position
   framelist = e_widget_framelist_add(evas, D_("Viewing Position"), 0);
   subtable = e_widget_table_add(evas, 0);

   rg = e_widget_radio_group_new(&(cfdata->local_xplanet.viewpos_type));

   widget = e_widget_radio_add(evas, D_("Random"), VIEWPOS_RANDOM, rg);
   cfdata->gui.o_viewpos_random = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 0, 1, 1, 1, 1, 0, 1);

   widget = e_widget_radio_add(evas, D_("Fixed"), VIEWPOS_LATLON, rg);
   cfdata->gui.o_viewpos_latlon = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_label_add(evas, D_("Latitude:"));
   cfdata->gui.o_viewpos_lat_label = widget;
   e_widget_table_object_append(subtable, widget, 1, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_lat = widget;
   e_widget_table_object_append(subtable, widget, 2, 1, 1, 1, 1, 1, 1, 1);

   widget = e_widget_label_add(evas, D_("Longitude:"));
   cfdata->gui.o_viewpos_lon_label = widget;
   e_widget_table_object_append(subtable, widget, 3, 1, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_lon = widget;
   e_widget_table_object_append(subtable, widget, 4, 1, 1, 1, 1, 1, 1, 1);

   widget = e_widget_radio_add(evas, D_("From file"), VIEWPOS_FILE, rg);
   cfdata->gui.o_viewpos_file = widget;
   evas_object_smart_callback_add(widget, "changed", _cb_viewpos, cfdata);
   e_widget_table_object_append(subtable, widget, 0, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_viewpos_file_val = widget;
   e_widget_table_object_append(subtable, widget, 1, 2, 4, 1, 1, 1, 0, 1);

   widget = e_widget_button_add(evas, D_("..."), NULL, _select_viewpos_file,
         cfd, cfdata);
   cfdata->gui.o_viewpos_file_button = widget;
   e_widget_table_object_append(subtable, widget, 5, 2, 1, 1, 1, 1, 0, 1);

   widget = e_widget_check_add(evas, D_("Set local time:"),
         &(cfdata->local_xplanet.use_localtime));
   evas_object_smart_callback_add(widget, "changed", _cb_set_localtime, cfdata);
   cfdata->gui.o_use_localtime = widget;
   e_widget_table_object_append(subtable, widget, 0, 3, 2, 1, 1, 1, 0, 1);

   widget = e_widget_slider_add(evas, 1, 0, ("%02.0f:00"), 0, 23, 1, 0, NULL,
         &(cfdata->gui.localtime), NULL);
   cfdata->gui.o_localtime = widget;
   e_widget_table_object_append(subtable, widget, 2, 3, 3, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);

   e_widget_table_object_append(table, framelist, 0, 1, 2, 1, 1, 1, 0, 1);

   // Other settings
   framelist = e_widget_framelist_add(evas, D_("Other Settings"), 0);
   subtable = e_widget_table_add(evas, 0);

   widget = e_widget_check_add(evas, D_("Use config file:"),
         &(cfdata->gui.use_config));
   cfdata->gui.o_config_check = widget;
   e_widget_table_object_append(subtable, widget, 0, 0, 1, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_config_name = widget;
   e_widget_table_object_append(subtable, widget, 1, 0, 1, 1, 1, 1, 1, 1);

   widget = e_widget_label_add(evas, D_("Other command line parameters:"));
   e_widget_table_object_append(subtable, widget, 0, 1, 2, 1, 1, 1, 0, 1);

   widget = e_widget_entry_add(evas, NULL, NULL, NULL, NULL);
   cfdata->gui.o_extra_options = widget;
   e_widget_table_object_append(subtable, widget, 0, 2, 2, 1, 1, 1, 0, 1);

   e_widget_framelist_object_append(framelist, subtable);
   e_widget_table_object_append(table, framelist, 2, 1, 1, 1, 1, 1, 0, 1);

   // Preview button
//   widget = e_widget_button_add(evas, D_("Preview"), NULL, _show_preview,
//         cfd, cfdata);
//   e_widget_table_object_append(table, widget, 0, 2, 3, 1, 1, 1, 0, 1);

   e_widget_toolbook_page_append(toolbook, NULL, D_("XPlanet"), table, 0, 0, 0,
         0, 0.5, 0.0);
   e_widget_toolbook_page_show(toolbook, 0);

   _populate_xplanet_page(cfdata, 0);

   return toolbook;
}
Ejemplo n.º 30
0
 virtual ~CallbackDataTimer()
 {
     if (m_timer)
         ecore_timer_del(m_timer);
 }