forked from enlightenment/enlightenment
Revert "e/connman: just update popup list at each 5 secs"
This reverts commit r79842 for the exact reason stated in the commit log. First I thought it would not affect the usability, but it indeed did. And it's a bit worse than having to wait 5 seconds to see the state changes: you never see them, except if you close and open the popup again. This could be "fixed" by setting up the timer in _econnman_popup_update() inside "if (inst->popup_locked)", but we would still not see the transitions, only the final state. A proper solution would be to first separate the service state changes from the list updates, then do something like what was proposed in r79842. Revert it while we don't have a solution that doesn't break the more common cases of clicking in a service and see it connecting. SVN revision: 81407
This commit is contained in:
parent
fbc93840ca
commit
b102c96377
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#include "E_Connman.h"
|
#include "E_Connman.h"
|
||||||
|
|
||||||
#define REFRESH_TIME (5)
|
|
||||||
|
|
||||||
E_Module *connman_mod = NULL;
|
E_Module *connman_mod = NULL;
|
||||||
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
|
static char tmpbuf[4096]; /* general purpose buffer, just use immediately */
|
||||||
|
|
||||||
|
@ -12,8 +10,6 @@ const char _e_connman_name[] = "connman";
|
||||||
const char _e_connman_Name[] = N_("Connection Manager");
|
const char _e_connman_Name[] = N_("Connection Manager");
|
||||||
int _e_connman_log_dom = -1;
|
int _e_connman_log_dom = -1;
|
||||||
|
|
||||||
static Eina_Bool _refresh_cb(void *data);
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
e_connman_theme_path(void)
|
e_connman_theme_path(void)
|
||||||
{
|
{
|
||||||
|
@ -143,17 +139,6 @@ _econnman_popup_update(struct Connman_Manager *cm, E_Connman_Instance *inst)
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN(cm);
|
EINA_SAFETY_ON_NULL_RETURN(cm);
|
||||||
|
|
||||||
if (inst->popup_locked)
|
|
||||||
{
|
|
||||||
inst->popup_dirty = EINA_TRUE;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
inst->popup_dirty = EINA_FALSE;
|
|
||||||
inst->popup_locked = EINA_TRUE;
|
|
||||||
if (!inst->refresh_timer)
|
|
||||||
inst->refresh_timer = ecore_timer_add(REFRESH_TIME, _refresh_cb, inst);
|
|
||||||
|
|
||||||
e_widget_ilist_freeze(list);
|
e_widget_ilist_freeze(list);
|
||||||
e_widget_ilist_clear(list);
|
e_widget_ilist_clear(list);
|
||||||
|
|
||||||
|
@ -283,30 +268,6 @@ _econnman_powered_changed(void *data, Evas_Object *obj, void *info __UNUSED__)
|
||||||
econnman_powered_set(ctxt->cm, ctxt->powered);
|
econnman_powered_set(ctxt->cm, ctxt->powered);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
|
||||||
_refresh_cb(void *data)
|
|
||||||
{
|
|
||||||
E_Connman_Instance *inst = data;
|
|
||||||
E_Connman_Module_Context *ctxt = inst->ctxt;
|
|
||||||
|
|
||||||
if ((!inst->popup) || (!ctxt->cm))
|
|
||||||
{
|
|
||||||
inst->refresh_timer = NULL;
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inst->popup_dirty)
|
|
||||||
{
|
|
||||||
_econnman_popup_update(ctxt->cm, inst);
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inst->popup_locked = EINA_FALSE;
|
|
||||||
inst->refresh_timer = NULL;
|
|
||||||
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_connman_widget_size_set(E_Connman_Instance *inst, Evas_Object *widget, Evas_Coord percent_w, Evas_Coord percent_h, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
|
_e_connman_widget_size_set(E_Connman_Instance *inst, Evas_Object *widget, Evas_Coord percent_w, Evas_Coord percent_h, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
|
||||||
{
|
{
|
||||||
|
@ -357,7 +318,6 @@ _econnman_popup_new(E_Connman_Instance *inst)
|
||||||
evas_object_smart_callback_add(ck, "changed",
|
evas_object_smart_callback_add(ck, "changed",
|
||||||
_econnman_powered_changed, inst);
|
_econnman_powered_changed, inst);
|
||||||
|
|
||||||
inst->popup_locked = EINA_FALSE;
|
|
||||||
_econnman_popup_update(ctxt->cm, inst);
|
_econnman_popup_update(ctxt->cm, inst);
|
||||||
|
|
||||||
bt = e_widget_button_add(evas, _("Configure"), NULL,
|
bt = e_widget_button_add(evas, _("Configure"), NULL,
|
||||||
|
@ -375,13 +335,6 @@ void
|
||||||
econnman_popup_del(E_Connman_Instance *inst)
|
econnman_popup_del(E_Connman_Instance *inst)
|
||||||
{
|
{
|
||||||
if (!inst->popup) return;
|
if (!inst->popup) return;
|
||||||
|
|
||||||
if (inst->refresh_timer)
|
|
||||||
{
|
|
||||||
ecore_timer_del(inst->refresh_timer);
|
|
||||||
inst->refresh_timer = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
_econnman_popup_input_window_destroy(inst);
|
_econnman_popup_input_window_destroy(inst);
|
||||||
e_object_del(E_OBJECT(inst->popup));
|
e_object_del(E_OBJECT(inst->popup));
|
||||||
inst->popup = NULL;
|
inst->popup = NULL;
|
||||||
|
|
|
@ -35,11 +35,6 @@ struct E_Connman_Instance
|
||||||
Ecore_Event_Handler *input_mouse_up;
|
Ecore_Event_Handler *input_mouse_up;
|
||||||
} popup;
|
} popup;
|
||||||
} ui;
|
} ui;
|
||||||
|
|
||||||
Ecore_Timer *refresh_timer;
|
|
||||||
|
|
||||||
Eina_Bool popup_dirty:1;
|
|
||||||
Eina_Bool popup_locked:1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct E_Connman_Module_Context
|
struct E_Connman_Module_Context
|
||||||
|
|
Loading…
Reference in New Issue