Add Font Configuration Dialog, and...

* Added some e_widget api for handy things (Toggling checks, Setting Entry Text...)
 * Fixed some compiler warnings
 * TODO : Font hinting and this new font dialog should be merged, Also, need
   To add font fallbacks configuration to this dialog


SVN revision: 21655
devs/princeamd/enlightenment-0.17-elive
Stafford Mitchell Horne 17 years ago
parent 07debc81d4
commit afdd5b0686
  1. 2
      src/bin/Makefile.am
  2. 20
      src/bin/e_apps_cache.c
  3. 22
      src/bin/e_config.c
  4. 1
      src/bin/e_configure.c
  5. 4
      src/bin/e_font.c
  6. 4
      src/bin/e_ilist.c
  7. 4
      src/bin/e_ilist.h
  8. 1
      src/bin/e_includes.h
  9. 2
      src/bin/e_int_config_keybindings.c
  10. 1
      src/bin/e_ipc_handlers_list.h
  11. 29
      src/bin/e_widget_check.c
  12. 2
      src/bin/e_widget_check.h
  13. 9
      src/bin/e_widget_entry.c
  14. 6
      src/bin/e_widget_ilist.c
  15. 6
      src/bin/e_widget_ilist.h
  16. 4
      src/bin/e_widget_preview.c
  17. 4
      src/bin/e_widget_preview.h
  18. 85
      src/bin/e_widget_slider.c
  19. 6
      src/bin/e_widget_slider.h
  20. 1
      src/modules/itray/e_mod_main.c

@ -129,6 +129,7 @@ e_int_config_theme.h \
e_int_config_menus.h \
e_int_config_keybindings.h \
e_int_config_cursor.h \
e_int_config_fonts.h \
e_int_config_startup.h \
e_int_config_performance.h \
e_int_config_winlist.h \
@ -258,6 +259,7 @@ e_int_config_theme.c \
e_int_config_menus.c \
e_int_config_keybindings.c \
e_int_config_cursor.c \
e_int_config_fonts.c \
e_int_config_startup.c \
e_int_config_performance.c \
e_int_config_winlist.c \

@ -29,15 +29,17 @@ e_app_cache_init(void)
eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
eddc.func.mem_alloc = NULL;
eddc.func.mem_free = NULL;
eddc.func.str_alloc = evas_stringshare_add;
eddc.func.str_free = evas_stringshare_del;
eddc.func.list_next = evas_list_next;
eddc.func.list_append = evas_list_append;
eddc.func.list_data = evas_list_data;
eddc.func.list_free = evas_list_free;
eddc.func.hash_foreach = evas_hash_foreach;
eddc.func.hash_add = evas_hash_add;
eddc.func.hash_free = evas_hash_free;
eddc.func.str_alloc = (char *(*)(const char *)) evas_stringshare_add;
eddc.func.str_free = (void (*)(const char *)) evas_stringshare_del;
eddc.func.list_next = (void *(*)(void *)) evas_list_next;
eddc.func.list_append = (void *(*)(void *l, void *d)) evas_list_append;
eddc.func.list_data = (void *(*)(void *)) evas_list_data;
eddc.func.list_free = (void *(*)(void *)) evas_list_free;
eddc.func.hash_foreach =
(void (*) (void *, int (*) (void *, const char *, void *, void *), void *))
evas_hash_foreach;
eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add;
eddc.func.hash_free = (void (*) (void *)) evas_hash_free;
NEWD("E_App_Cache", E_App_Cache);
_e_app_cache_edd = eet_data_descriptor2_new(&eddc);

@ -664,7 +664,7 @@ e_config_init(void)
CFG_MODULE("pager", 1);
}
{
E_Font_Fallback* eff;
// E_Font_Fallback* eff;
#define CFG_FONTFALLBACK(_name) \
eff = E_NEW(E_Font_Fallback, 1); \
@ -1209,15 +1209,17 @@ e_config_descriptor_new(const char *name, int size)
eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION;
eddc.func.mem_alloc = NULL;
eddc.func.mem_free = NULL;
eddc.func.str_alloc = evas_stringshare_add;
eddc.func.str_free = evas_stringshare_del;
eddc.func.list_next = evas_list_next;
eddc.func.list_append = evas_list_append;
eddc.func.list_data = evas_list_data;
eddc.func.list_free = evas_list_free;
eddc.func.hash_foreach = evas_hash_foreach;
eddc.func.hash_add = evas_hash_add;
eddc.func.hash_free = evas_hash_free;
eddc.func.str_alloc = (char *(*)(const char *)) evas_stringshare_add;
eddc.func.str_free = (void (*)(const char *)) evas_stringshare_del;
eddc.func.list_next = (void *(*)(void *)) evas_list_next;
eddc.func.list_append = (void *(*)(void *l, void *d)) evas_list_append;
eddc.func.list_data = (void *(*)(void *)) evas_list_data;
eddc.func.list_free = (void *(*)(void *)) evas_list_free;
eddc.func.hash_foreach =
(void (*) (void *, int (*) (void *, const char *, void *, void *), void *))
evas_hash_foreach;
eddc.func.hash_add = (void *(*) (void *, const char *, void *)) evas_hash_add;
eddc.func.hash_free = (void (*) (void *)) evas_hash_free;
eddc.name = name;
eddc.size = size;
return (E_Config_DD *)eet_data_descriptor2_new(&eddc);

@ -66,6 +66,7 @@ e_configure_show(E_Container *con)
e_configure_header_item_add(eco, "enlightenment/appearance", _("Appearance"));
e_configure_standard_item_add(eco, "enlightenment/desktops", _("Background Settings"), e_int_config_background);
e_configure_standard_item_add(eco, "enlightenment/themes", _("Theme Selector"), e_int_config_theme);
e_configure_standard_item_add(eco, "enlightenment/e", _("Font Properties"), e_int_config_fonts);
e_configure_standard_item_add(eco, "enlightenment/e", _("Font Display Hinting"), e_int_config_hinting);
e_configure_standard_item_add(eco, "enlightenment/mouse", _("Cursor Settings"), e_int_config_cursor);
e_configure_standard_item_add(eco, "enlightenment/windows", _("Window Display Settings"), e_int_config_window_display);

@ -279,6 +279,10 @@ e_font_default_list(void)
return e_config->font_defaults;
}
/* return the default font name with fallbacks, font size is returned
* in size_ret. This function is needed when all hell breaks loose and
* we need a font name and size.
*/
EAPI const char *
e_font_default_string_get(const char *text_class, int *size_ret)
{

@ -93,7 +93,7 @@ e_ilist_icon_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
}
EAPI void
e_ilist_append(Evas_Object *obj, Evas_Object *icon, char *label, int header, void (*func) (void *data, void *data2), void (*func_hilight) (void *data, void *data2), void *data, void *data2)
e_ilist_append(Evas_Object *obj, Evas_Object *icon, const char *label, int header, void (*func) (void *data, void *data2), void (*func_hilight) (void *data, void *data2), void *data, void *data2)
{
E_Smart_Item *si;
Evas_Coord mw = 0, mh = 0;
@ -267,7 +267,7 @@ e_ilist_remove_num(Evas_Object *obj, int n)
}
EAPI void
e_ilist_remove_label(Evas_Object *obj, char *label)
e_ilist_remove_label(Evas_Object *obj, const char *label)
{
E_Smart_Item *si;
Evas_List *l;

@ -8,7 +8,7 @@
EAPI Evas_Object *e_ilist_add (Evas *evas);
EAPI void e_ilist_icon_size_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
EAPI void e_ilist_append (Evas_Object *obj, Evas_Object *icon, char *label, int header, void (*func) (void *data, void *data2), void (*func_hilight) (void *data, void *data2), void *data, void *data2);
EAPI void e_ilist_append (Evas_Object *obj, Evas_Object *icon, const char *label, int header, void (*func) (void *data, void *data2), void (*func_hilight) (void *data, void *data2), void *data, void *data2);
EAPI void e_ilist_selected_set (Evas_Object *obj, int n);
EAPI int e_ilist_selected_get (Evas_Object *obj);
EAPI const char *e_ilist_selected_label_get (Evas_Object *obj);
@ -19,7 +19,7 @@ EAPI void e_ilist_min_size_get (Evas_Object *obj, Evas_Coord *w
EAPI void e_ilist_selector_set (Evas_Object *obj, int selector);
EAPI int e_ilist_selector_get (Evas_Object *obj);
EAPI void e_ilist_remove_num (Evas_Object *obj, int n);
EAPI void e_ilist_remove_label (Evas_Object *obj, char *label);
EAPI void e_ilist_remove_label (Evas_Object *obj, const char *label);
EAPI int e_ilist_count (Evas_Object *obj);
EAPI void e_ilist_clear (Evas_Object *obj);

@ -107,6 +107,7 @@
#include "e_int_config_menus.h"
#include "e_int_config_keybindings.h"
#include "e_int_config_cursor.h"
#include "e_int_config_fonts.h"
#include "e_int_config_startup.h"
#include "e_int_config_performance.h"
#include "e_int_config_winlist.h"

@ -85,7 +85,7 @@ typedef struct
char *action_params;
int def_action;
int restrictions;
}ACTION;
} ACTION;
const ACTION actions_predefined_names[ ] = {
{"Flip Desktop Left", "desk_flip_by", "-1 0", _DEFAULT_ACTION,

@ -379,3 +379,4 @@
#define E_IPC_OP_MAXIMIZE_MANIPULATION_GET_REPLY 352
#define E_IPC_OP_DESKTOP_LOCK 353

@ -59,6 +59,35 @@ e_widget_check_add(Evas *evas, char *label, int *val)
return obj;
}
EAPI void
e_widget_check_checked_set(Evas_Object *check, int checked)
{
E_Widget_Data *wd;
wd = e_widget_data_get(check);
if (wd->valptr)
*(wd->valptr) = checked;
if (checked)
edje_object_signal_emit(wd->o_check, "toggle_on", "");
else
edje_object_signal_emit(wd->o_check, "toggle_off", "");
}
EAPI int
e_widget_check_checked_get(Evas_Object *check)
{
E_Widget_Data *wd;
int ret;
wd = e_widget_data_get(check);
if (wd->valptr)
ret = *(wd->valptr);
else
ret = -1;
return ret;
}
static void
_e_wid_del_hook(Evas_Object *obj)
{

@ -7,6 +7,8 @@
#define E_WIDGET_CHECK_H
EAPI Evas_Object *e_widget_check_add(Evas *evas, char *label, int *val);
EAPI void e_widget_check_checked_set(Evas_Object *check, int checked);
EAPI int e_widget_check_checked_get(Evas_Object *check);
#endif
#endif

@ -149,13 +149,18 @@ e_widget_entry_on_change_callback_set(Evas_Object *obj, void (*func) (void *data
wd->on_change_data = data;
}
#if 0
void
e_widget_entry_text_set(Evas_Object *entry, const char *text)
{
e_entry_text_set(entry, text);
E_Widget_Data *wd;
wd = e_widget_data_get(entry);
e_entry_text_set(wd->o_entry, text);
E_FREE(*(wd->valptr));
*(wd->valptr) = strdup(text);
}
#if 0
const char *
e_widget_entry_text_get(Evas_Object *entry)
{

@ -62,7 +62,7 @@ e_widget_ilist_add(Evas *evas, int icon_w, int icon_h, char **value)
}
EAPI void
e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, char *label, void (*func) (void *data), void *data, char *val)
e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data), void *data, char *val)
{
E_Widget_Data *wd;
E_Widget_Callback *wcb;
@ -78,7 +78,7 @@ e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, char *label, void (*f
}
EAPI void
e_widget_ilist_header_append(Evas_Object *obj, Evas_Object *icon, char *label)
e_widget_ilist_header_append(Evas_Object *obj, Evas_Object *icon, const char *label)
{
E_Widget_Data *wd;
@ -158,7 +158,7 @@ e_widget_ilist_remove_num(Evas_Object *obj, int n)
}
EAPI void
e_widget_ilist_remove_label(Evas_Object *obj, char *label)
e_widget_ilist_remove_label(Evas_Object *obj, const char *label)
{
E_Widget_Data *wd;

@ -7,15 +7,15 @@
#define E_WIDGET_ILIST_H
EAPI Evas_Object *e_widget_ilist_add(Evas *evas, int icon_w, int icon_h, char **value);
EAPI void e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, char *label, void (*func) (void *data), void *data, char *val);
EAPI void e_widget_ilist_header_append(Evas_Object *obj, Evas_Object *icon, char *label);
EAPI void e_widget_ilist_append(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data), void *data, char *val);
EAPI void e_widget_ilist_header_append(Evas_Object *obj, Evas_Object *icon, const char *label);
EAPI void e_widget_ilist_selected_set(Evas_Object *obj, int n);
EAPI void e_widget_ilist_selector_set(Evas_Object *obj, int selector);
EAPI void e_widget_ilist_go(Evas_Object *obj);
EAPI int e_widget_ilist_selected_get(Evas_Object *obj);
EAPI const char *e_widget_ilist_selected_label_get(Evas_Object *obj);
EAPI void e_widget_ilist_remove_num(Evas_Object *obj, int n);
EAPI void e_widget_ilist_remove_label(Evas_Object *obj, char *label);
EAPI void e_widget_ilist_remove_label(Evas_Object *obj, const char *label);
EAPI int e_widget_ilist_count(Evas_Object *obj);
EAPI void e_widget_ilist_clear(Evas_Object *obj);

@ -51,7 +51,7 @@ e_widget_preview_add(Evas *evas, int minw, int minh)
}
EAPI int
e_widget_preview_file_set(Evas_Object *obj, char *file, char *key)
e_widget_preview_file_set(Evas_Object *obj, const char *file, const char *key)
{
E_Widget_Data *wd;
@ -65,7 +65,7 @@ e_widget_preview_file_set(Evas_Object *obj, char *file, char *key)
}
EAPI int
e_widget_preview_edje_set(Evas_Object *obj, char *file, char *group)
e_widget_preview_edje_set(Evas_Object *obj, const char *file, const char *group)
{
E_Widget_Data *wd;
int ret;

@ -7,8 +7,8 @@
#define E_WIDGET_PREVIEW_H
EAPI Evas_Object *e_widget_preview_add(Evas *evas, int minw, int minh);
EAPI int e_widget_preview_file_set(Evas_Object *obj, char *file, char *key);
EAPI int e_widget_preview_edje_set(Evas_Object *obj, char *file, char *group);
EAPI int e_widget_preview_file_set(Evas_Object *obj, const char *file, const char *key);
EAPI int e_widget_preview_edje_set(Evas_Object *obj, const char *file, const char *group);
#endif
#endif

@ -61,6 +61,91 @@ e_widget_slider_add(Evas *evas, int horiz, int rev, char *fmt, double min, doubl
return obj;
}
/**
* Set the double value for the slider. This will also move the slider to
* the correct position and update the text indecator. Will not do anything
* if the slider was not created with a double value.
*
* @param slider pointer to the slider to be modified
* @param dval the double value to set the slider to
* @return 1 if value set, return 0 if value not set
*/
EAPI int
e_widget_slider_value_double_set(Evas_Object *slider, double dval)
{
E_Widget_Data *wd;
wd = e_widget_data_get(slider);
if (!wd->dval) return 0;
*(wd->dval) = dval;
e_slider_value_set(wd->o_slider, dval);
return 1;
}
/**
* Set the integer value for the slider. This will also move the slider to
* the correct position and update the text indecator. Will not do anything
* if the slider was not created with an integer value.
*
* @param slider pointer to the slider to be modified
* @param int the integer value to set the slider to
* @return 1 if value set, return 0 if value not set
*/
EAPI int
e_widget_slider_value_int_set(Evas_Object *slider, int ival)
{
E_Widget_Data *wd;
wd = e_widget_data_get(slider);
if (!wd->ival) return 0;
*(wd->ival) = ival;
e_slider_value_set(wd->o_slider, ival);
return 1;
}
/**
* Get the double value for the slider. The value of dval is undefined
* if the slider was not created with a double value.
*
* @param slider pointer to the slider to be queried
* @param dval the pointer to the double value to be set with the value of the slider
* @return 1 if value returned, return 0 if value not returned
*/
EAPI int
e_widget_slider_value_double_get(Evas_Object *slider, double *dval)
{
E_Widget_Data *wd;
wd = e_widget_data_get(slider);
if (!wd->dval) return 0;
if (!dval) return 0;
*dval = *(wd->dval);
return 1;
}
/**
* Get the integer value for the slider. The value of ival is undefined
* if the slider was not created with an integer value.
*
* @param slider pointer to the slider to be queried
* @param ival the pointer to the integer value to be set with the value of the slider
* @return 1 if value returned, return 0 if value not returned
*/
EAPI int
e_widget_slider_value_int_get(Evas_Object *slider, int *ival)
{
E_Widget_Data *wd;
wd = e_widget_data_get(slider);
if (!wd->ival) return 0;
if (!ival) return 0;
*ival = *(wd->ival);
return 1;
}
/* Private functions */
static void
_e_wid_del_hook(Evas_Object *obj)
{

@ -7,6 +7,10 @@
#define E_WIDGET_SLIDER_H
EAPI Evas_Object *e_widget_slider_add(Evas *evas, int horiz, int rev, char *fmt, double min, double max, double step, int count, double *dval, int *ival, Evas_Coord size);
EAPI int e_widget_slider_value_double_set(Evas_Object *slider, double dval);
EAPI int e_widget_slider_value_int_set(Evas_Object *slider, int ival);
EAPI int e_widget_slider_value_double_get(Evas_Object *slider, double *dval);
EAPI int e_widget_slider_value_int_get(Evas_Object *slider, int *ival);
#endif
#endif

@ -479,6 +479,7 @@ _itray_box_frame_resize(ITray_Box *itb)
w = h = TRAY_ICON_SIZE + itb->box_inset.l + itb->box_inset.r;
else
{
if (itb->tray->rows > 0) itb->tray->rows = 1;
icons_per_row = (itb->tray->icons +
(itb->tray->icons % itb->tray->rows)) / itb->tray->rows;
w = (icons_per_row * TRAY_ICON_SIZE)

Loading…
Cancel
Save