exebuf has its own config for gui setup

SVN revision: 19035
This commit is contained in:
Carsten Haitzler 2005-12-15 04:29:38 +00:00
parent 76c17f4207
commit 9e16ed30e9
3 changed files with 52 additions and 16 deletions

View File

@ -366,6 +366,18 @@ e_config_init(void)
E_CONFIG_VAL(D, T, input_method, STR); /**/
E_CONFIG_LIST(D, T, path_append_input_methods, _e_config_path_append_edd); /**/
E_CONFIG_LIST(D, T, path_append_messages, _e_config_path_append_edd); /**/
E_CONFIG_VAL(D, T, exebuf_max_exe_list, INT); /**/
E_CONFIG_VAL(D, T, exebuf_max_eap_list, INT); /**/
E_CONFIG_VAL(D, T, exebuf_scroll_animate, INT); /**/
E_CONFIG_VAL(D, T, exebuf_scroll_speed, DOUBLE); /**/
E_CONFIG_VAL(D, T, exebuf_pos_align_x, DOUBLE); /**/
E_CONFIG_VAL(D, T, exebuf_pos_align_y, DOUBLE); /**/
E_CONFIG_VAL(D, T, exebuf_pos_size_w, DOUBLE); /**/
E_CONFIG_VAL(D, T, exebuf_pos_size_h, DOUBLE); /**/
E_CONFIG_VAL(D, T, exebuf_pos_min_w, INT); /**/
E_CONFIG_VAL(D, T, exebuf_pos_min_h, INT); /**/
E_CONFIG_VAL(D, T, exebuf_pos_max_w, INT); /**/
E_CONFIG_VAL(D, T, exebuf_pos_max_h, INT); /**/
e_config = e_config_domain_load("e", _e_config_edd);
if (e_config)
{
@ -498,6 +510,18 @@ e_config_init(void)
e_config->menu_eap_comment_show = 0;
e_config->fullscreen_policy = E_FULLSCREEN_RESIZE;
e_config->input_method = NULL;
e_config->exebuf_max_exe_list = 20;
e_config->exebuf_max_eap_list = 20;
e_config->exebuf_scroll_animate = 1;
e_config->exebuf_scroll_speed = 0.1;
e_config->exebuf_pos_align_x = 0.5;
e_config->exebuf_pos_align_y = 0.5;
e_config->exebuf_pos_size_w = 0.75;
e_config->exebuf_pos_size_h = 0.25;
e_config->exebuf_pos_min_w = 200;
e_config->exebuf_pos_min_h = 160;
e_config->exebuf_pos_max_w = 400;
e_config->exebuf_pos_max_h = 320;
{
E_Config_Module *em;

View File

@ -44,7 +44,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
* versioning feature. the value of this is really irrelevant - just as
* long as it increases every time we change something
*/
#define E_CONFIG_FILE_VERSION 133
#define E_CONFIG_FILE_VERSION 134
#define E_EVAS_ENGINE_DEFAULT 0
#define E_EVAS_ENGINE_SOFTWARE_X11 1
@ -186,6 +186,18 @@ struct _E_Config
int menu_eap_generic_show;
int menu_eap_comment_show;
int fullscreen_policy;
int exebuf_max_exe_list;
int exebuf_max_eap_list;
int exebuf_scroll_animate;
double exebuf_scroll_speed;
double exebuf_pos_align_x;
double exebuf_pos_align_y;
double exebuf_pos_size_w;
double exebuf_pos_size_h;
int exebuf_pos_min_w;
int exebuf_pos_min_h;
int exebuf_pos_max_w;
int exebuf_pos_max_h;
};
struct _E_Config_Module

View File

@ -142,19 +142,19 @@ e_exebuf_show(E_Zone *zone)
o = bg_object;
edje_object_size_min_calc(o, &mw, &mh);
w = (double)zone->w * e_config->winlist_pos_size_w;
if (w > e_config->winlist_pos_max_w) w = e_config->winlist_pos_max_w;
else if (w < e_config->winlist_pos_min_w) w = e_config->winlist_pos_min_w;
w = (double)zone->w * e_config->exebuf_pos_size_w;
if (w > e_config->exebuf_pos_max_w) w = e_config->exebuf_pos_max_w;
else if (w < e_config->exebuf_pos_min_w) w = e_config->exebuf_pos_min_w;
if (w < mw) w = mw;
if (w > zone->w) w = zone->w;
x = (double)(zone->w - w) * e_config->winlist_pos_align_x;
x = (double)(zone->w - w) * e_config->exebuf_pos_align_x;
h = (double)zone->h * e_config->winlist_pos_size_h;
if (h > e_config->winlist_pos_max_h) h = e_config->winlist_pos_max_h;
else if (h < e_config->winlist_pos_min_h) h = e_config->winlist_pos_min_h;
h = (double)zone->h * e_config->exebuf_pos_size_h;
if (h > e_config->exebuf_pos_max_h) h = e_config->exebuf_pos_max_h;
else if (h < e_config->exebuf_pos_min_h) h = e_config->exebuf_pos_min_h;
if (h < mh) h = mh;
if (h > zone->h) h = zone->h;
y = (double)(zone->h - h) * e_config->winlist_pos_align_y;
y = (double)(zone->h - h) * e_config->exebuf_pos_align_y;
e_popup_move_resize(exebuf, x, y, w, h);
evas_object_move(o, 0, 0);
@ -342,7 +342,7 @@ _e_exebuf_exe_scroll_to(int i)
if (n > 1)
{
exe_scroll_align_to = (double)i / (double)(n - 1);
if (e_config->winlist_scroll_animate)
if (e_config->exebuf_scroll_animate)
{
exe_scroll_to = 1;
if (!exe_scroll_timer)
@ -369,7 +369,7 @@ _e_exebuf_eap_scroll_to(int i)
if (n > 1)
{
eap_scroll_align_to = (double)i / (double)(n - 1);
if (e_config->winlist_scroll_animate)
if (e_config->exebuf_scroll_animate)
{
eap_scroll_to = 1;
if (!eap_scroll_timer)
@ -620,7 +620,7 @@ _e_exebuf_matches_update(void)
_e_exebuf_matches_clear();
if (strlen(cmd_buf) == 0) return;
snprintf(buf, sizeof(buf), "%s*", cmd_buf);
snprintf(buf, sizeof(buf), "*%s*", cmd_buf);
list = e_app_name_glob_list(buf);
for (l = list; l; l = l->next)
{
@ -720,7 +720,7 @@ _e_exebuf_matches_update(void)
/* FIXME: sort eap matches with most recently selected matches at the
* start and then from shortest to longest string
*/
max = 20;
max = e_config->exebuf_max_eap_list;
e_box_freeze(eap_list_object);
for (i = 0, l = eap_matches; l && (i < max); l = l->next, i++)
{
@ -763,7 +763,7 @@ _e_exebuf_matches_update(void)
/* FIXME: sort eap matches with most recently selected matches at the
* start and then from shortest to longest string
*/
max = 20;
max = e_config->exebuf_max_exe_list;
e_box_freeze(exe_list_object);
for (i = 0, l = exe_matches; l && (i < max); l = l->next, i++)
{
@ -904,7 +904,7 @@ _e_exebuf_exe_scroll_timer(void *data)
{
double spd;
spd = e_config->winlist_scroll_speed;
spd = e_config->exebuf_scroll_speed;
exe_scroll_align = (exe_scroll_align * (1.0 - spd)) + (exe_scroll_align_to * spd);
return 1;
}
@ -919,7 +919,7 @@ _e_exebuf_eap_scroll_timer(void *data)
{
double spd;
spd = e_config->winlist_scroll_speed;
spd = e_config->exebuf_scroll_speed;
eap_scroll_align = (eap_scroll_align * (1.0 - spd)) + (eap_scroll_align_to * spd);
return 1;
}