forked from enlightenment/enventor
edc_navigator: feature extension.
Now this function has an option for auto contraction. User could choose one of them for their taste.
This commit is contained in:
parent
10fcefe123
commit
4ee083fdac
|
@ -7,7 +7,6 @@ typedef struct base_s
|
|||
Evas_Object *console;
|
||||
Evas_Object *enventor;
|
||||
Ecore_Timer *edc_navi_update_timer;
|
||||
Ecore_Timer *edc_navi_reload_timer;
|
||||
Eina_Bool console_msg : 1;
|
||||
} base_data;
|
||||
|
||||
|
@ -33,26 +32,11 @@ win_resize_cb(void *data EINA_UNUSED, Evas *o EINA_UNUSED, Evas_Object *obj,
|
|||
config_win_size_set(w, h);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
edc_navigator_reload_timer_cb(void *data)
|
||||
{
|
||||
base_data *bd = data;
|
||||
|
||||
edc_navigator_reload(stats_group_name_get());
|
||||
|
||||
bd->edc_navi_reload_timer = NULL;
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
edc_navigator_update_timer_cb(void *data)
|
||||
{
|
||||
base_data *bd = g_bd;
|
||||
|
||||
const char *group_name = data;
|
||||
edc_navigator_group_update(group_name);
|
||||
|
||||
base_data *bd = data;
|
||||
edc_navigator_group_update(stats_group_name_get());
|
||||
bd->edc_navi_update_timer = NULL;
|
||||
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
|
@ -119,7 +103,7 @@ void base_edc_navigator_toggle(Eina_Bool toggle)
|
|||
|
||||
if (config_edc_navigator_get())
|
||||
{
|
||||
base_edc_navigator_reload();
|
||||
base_edc_navigator_group_update();
|
||||
elm_object_signal_emit(bd->layout, "elm,state,edc_navigator,show", "");
|
||||
}
|
||||
else
|
||||
|
@ -241,7 +225,6 @@ base_gui_term(void)
|
|||
if (!bd) return;
|
||||
|
||||
ecore_timer_del(bd->edc_navi_update_timer);
|
||||
ecore_timer_del(bd->edc_navi_reload_timer);
|
||||
file_browser_term();
|
||||
edc_navigator_term();
|
||||
panes_term();
|
||||
|
@ -251,7 +234,7 @@ base_gui_term(void)
|
|||
}
|
||||
|
||||
void
|
||||
base_edc_navigator_group_update(const char *group_name)
|
||||
base_edc_navigator_group_update(void)
|
||||
{
|
||||
if (!config_edc_navigator_get()) return;
|
||||
|
||||
|
@ -261,20 +244,6 @@ base_edc_navigator_group_update(const char *group_name)
|
|||
ecore_timer_del(bd->edc_navi_update_timer);
|
||||
bd->edc_navi_update_timer = ecore_timer_add(EDC_NAVIGATOR_UPDATE_TIME,
|
||||
edc_navigator_update_timer_cb,
|
||||
group_name);
|
||||
}
|
||||
|
||||
void
|
||||
base_edc_navigator_reload(void)
|
||||
{
|
||||
if (!config_edc_navigator_get()) return;
|
||||
|
||||
base_data *bd = g_bd;
|
||||
if (!bd) return;
|
||||
|
||||
ecore_timer_del(bd->edc_navi_reload_timer);
|
||||
bd->edc_navi_reload_timer = ecore_timer_add(EDC_NAVIGATOR_UPDATE_TIME,
|
||||
edc_navigator_reload_timer_cb,
|
||||
bd);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -419,7 +419,7 @@ enventor_cursor_group_changed_cb(void *data EINA_UNUSED,
|
|||
{
|
||||
const char *group_name = event_info;
|
||||
stats_edc_group_update(group_name);
|
||||
base_edc_navigator_group_update(group_name);
|
||||
base_edc_navigator_group_update();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -448,7 +448,7 @@ enventor_live_view_loaded_cb(void *data EINA_UNUSED, Evas_Object *obj,
|
|||
Evas_Coord w, h;
|
||||
config_view_size_get(&w, &h);
|
||||
enventor_object_live_view_size_set(obj, w, h);
|
||||
base_edc_navigator_reload();
|
||||
base_edc_navigator_group_update();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -517,7 +517,7 @@ enventor_live_view_updated_cb(void *data, Evas_Object *obj,
|
|||
ad->on_saving = EINA_FALSE;
|
||||
}
|
||||
|
||||
base_edc_navigator_group_update(stats_group_name_get());
|
||||
base_edc_navigator_group_update();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -27,5 +27,4 @@ void base_error_msg_set(const char *msg);
|
|||
void base_console_full_view(void);
|
||||
void base_file_browser_toggle(Eina_Bool toggle);
|
||||
void base_edc_navigator_toggle(Eina_Bool toggle);
|
||||
void base_edc_navigator_reload(void);
|
||||
void base_edc_navigator_group_update(const char *group_name);
|
||||
void base_edc_navigator_group_update(void);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
Evas_Object *edc_navigator_init(Evas_Object *parent);
|
||||
void edc_navigator_term(void);
|
||||
void edc_navigator_reload(const char *cur_group);
|
||||
void edc_navigator_group_update(const char *cur_group);
|
||||
|
|
Loading…
Reference in New Issue