forked from enlightenment/enlightenment
Add checkbox to allow users to enable or disable the clientlist caption length limit.
SVN revision: 29473
This commit is contained in:
parent
1157a68929
commit
4f1c60dba9
|
@ -518,6 +518,7 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, clientlist_sort_by, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_separate_iconified_apps, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_warp_to_iconified_desktop, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_limit_caption_len, INT);
|
||||
E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
|
||||
|
||||
E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
|
||||
|
@ -1378,6 +1379,10 @@ e_config_init(void)
|
|||
e_config->thumb_nice = 0;
|
||||
IFCFGEND;
|
||||
|
||||
IFCFG(0x0115);
|
||||
e_config->clientlist_limit_caption_len = 0;
|
||||
IFCFGEND;
|
||||
|
||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||
|
||||
#if 0 /* example of new config */
|
||||
|
@ -1497,7 +1502,8 @@ e_config_init(void)
|
|||
E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 0, E_CLIENTLIST_MAX_CAPTION_LEN);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
|
||||
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
|
||||
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_numerator, 1, 10);
|
||||
E_CONFIG_LIMIT(e_config->mouse_accel_denominator, 1, 10);
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
|
|||
/* increment this whenever a new set of config values are added but the users
|
||||
* config doesn't need to be wiped - simply new values need to be put in
|
||||
*/
|
||||
#define E_CONFIG_FILE_GENERATION 0x0114
|
||||
#define E_CONFIG_FILE_GENERATION 0x0115
|
||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||
|
||||
#define E_EVAS_ENGINE_DEFAULT 0
|
||||
|
@ -256,7 +256,8 @@ struct _E_Config
|
|||
int clientlist_sort_by; // GUI
|
||||
int clientlist_separate_iconified_apps; // GUI
|
||||
int clientlist_warp_to_iconified_desktop; // GUI
|
||||
int clientlist_max_caption_len;
|
||||
int clientlist_limit_caption_len; // GUI
|
||||
int clientlist_max_caption_len; // GUI
|
||||
|
||||
int mouse_accel_numerator; // GUI
|
||||
int mouse_accel_denominator; // GUI
|
||||
|
|
|
@ -17,6 +17,7 @@ struct _E_Config_Dialog_Data
|
|||
int sort_by;
|
||||
int separate_iconified_apps;
|
||||
int warp_to_iconified_desktop;
|
||||
int limit_caption_len;
|
||||
int max_caption_len;
|
||||
};
|
||||
|
||||
|
@ -51,6 +52,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->sort_by = e_config->clientlist_sort_by;
|
||||
cfdata->separate_iconified_apps = e_config->clientlist_separate_iconified_apps;
|
||||
cfdata->warp_to_iconified_desktop = e_config->clientlist_warp_to_iconified_desktop;
|
||||
cfdata->limit_caption_len = e_config->clientlist_limit_caption_len;
|
||||
cfdata->max_caption_len = e_config->clientlist_max_caption_len;
|
||||
}
|
||||
|
||||
|
@ -79,6 +81,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
e_config->clientlist_sort_by = cfdata->sort_by;
|
||||
e_config->clientlist_separate_iconified_apps = cfdata->separate_iconified_apps;
|
||||
e_config->clientlist_warp_to_iconified_desktop = cfdata->warp_to_iconified_desktop;
|
||||
e_config->clientlist_limit_caption_len = cfdata->limit_caption_len;
|
||||
e_config->clientlist_max_caption_len = cfdata->max_caption_len;
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
|
@ -140,8 +143,10 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_table_object_append(ot, of, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
of = e_widget_framelist_add(evas, _("Maximum Caption Length"), 0);
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f Chars"), 0.0, E_CLIENTLIST_MAX_CAPTION_LEN, 2.0, 0, NULL, &(cfdata->max_caption_len), 200);
|
||||
of = e_widget_framelist_add(evas, _("Menu Item Captions"), 0);
|
||||
ob = e_widget_check_add(evas, _("Limit caption length"), &(cfdata->limit_caption_len));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f Chars"), 2.0, E_CLIENTLIST_MAX_CAPTION_LEN, 2.0, 0, NULL, &(cfdata->max_caption_len), 200);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_table_object_append(ot, of, 0, 2, 2, 1, 1, 1, 1, 0);
|
||||
|
||||
|
|
|
@ -1261,7 +1261,7 @@ _e_int_menus_clients_title_abbrv(const char *title)
|
|||
int max_len;
|
||||
|
||||
max_len = e_config->clientlist_max_caption_len;
|
||||
if ((max_len != 0) && (strlen(title) > max_len))
|
||||
if ((e_config->clientlist_limit_caption_len) && (strlen(title) > max_len))
|
||||
{
|
||||
char *abbv;
|
||||
const char *left, *right;
|
||||
|
|
Loading…
Reference in New Issue