parent
82ee910b78
commit
f19d0eeaba
|
@ -2,20 +2,20 @@
|
|||
|
||||
static E_Config_Dialog_View *_config_view_new(void);
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static void _basic_apply_border(E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static void _basic_apply_border(E_Config_Dialog_Data *cfdata);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Border *border;
|
||||
E_Border *border;
|
||||
E_Container *container;
|
||||
const char *bordername;
|
||||
int remember_border;
|
||||
const char *bordername;
|
||||
int remember_border;
|
||||
};
|
||||
|
||||
E_Config_Dialog *
|
||||
|
@ -28,8 +28,8 @@ e_int_config_borders(E_Container *con, const char *params __UNUSED__)
|
|||
v = _config_view_new();
|
||||
if (!v) return NULL;
|
||||
cfd = e_config_dialog_new(con, _("Default Border Style"),
|
||||
"E", "appearance/borders",
|
||||
"preferences-system-windows", 0, v, con);
|
||||
"E", "appearance/borders",
|
||||
"preferences-system-windows", 0, v, con);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -47,9 +47,9 @@ e_int_config_borders_border(E_Container *con __UNUSED__, const char *params)
|
|||
v = _config_view_new();
|
||||
if (!v) return NULL;
|
||||
cfd = e_config_dialog_new(bd->zone->container,
|
||||
_("Window Border Selection"),
|
||||
"E", "_config_border_border_style_dialog",
|
||||
"preferences-system-windows", 0, v, bd);
|
||||
_("Window Border Selection"),
|
||||
"E", "_config_border_border_style_dialog",
|
||||
"preferences-system-windows", 0, v, bd);
|
||||
bd->border_border_dialog = cfd;
|
||||
return cfd;
|
||||
}
|
||||
|
@ -92,12 +92,12 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
if (cfdata->border)
|
||||
{
|
||||
if ((cfdata->border->remember) &&
|
||||
(cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))
|
||||
{
|
||||
cfdata->remember_border = 1;
|
||||
}
|
||||
cfdata->bordername = eina_stringshare_add(cfdata->border->client.border.name);
|
||||
if ((cfdata->border->remember) &&
|
||||
(cfdata->border->remember->apply & E_REMEMBER_APPLY_BORDER))
|
||||
{
|
||||
cfdata->remember_border = 1;
|
||||
}
|
||||
cfdata->bordername = eina_stringshare_add(cfdata->border->client.border.name);
|
||||
}
|
||||
else
|
||||
cfdata->bordername = eina_stringshare_add(e_config->theme_default_border_style);
|
||||
|
@ -129,10 +129,10 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
_basic_apply_border(cfdata);
|
||||
else if (cfdata->container)
|
||||
{
|
||||
eina_stringshare_del(e_config->theme_default_border_style);
|
||||
e_config->theme_default_border_style =
|
||||
eina_stringshare_del(e_config->theme_default_border_style);
|
||||
e_config->theme_default_border_style =
|
||||
eina_stringshare_ref(cfdata->bordername);
|
||||
/* FIXME: Should this trigger an E Restart to reset all borders ? */
|
||||
/* FIXME: Should this trigger an E Restart to reset all borders ? */
|
||||
}
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
|
@ -143,42 +143,42 @@ _basic_apply_border(E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
if ((!cfdata->border->lock_border) && (!cfdata->border->shaded))
|
||||
{
|
||||
eina_stringshare_del(cfdata->border->bordername);
|
||||
cfdata->border->bordername = eina_stringshare_ref(cfdata->bordername);
|
||||
cfdata->border->client.border.changed = 1;
|
||||
cfdata->border->changed = 1;
|
||||
eina_stringshare_del(cfdata->border->bordername);
|
||||
cfdata->border->bordername = eina_stringshare_ref(cfdata->bordername);
|
||||
cfdata->border->client.border.changed = 1;
|
||||
cfdata->border->changed = 1;
|
||||
}
|
||||
if (cfdata->remember_border)
|
||||
{
|
||||
E_Remember *rem = cfdata->border->remember;
|
||||
E_Remember *rem = cfdata->border->remember;
|
||||
|
||||
if (!rem)
|
||||
{
|
||||
if (!rem)
|
||||
{
|
||||
rem = e_remember_new();
|
||||
if (rem) e_remember_use(rem);
|
||||
}
|
||||
if (rem)
|
||||
{
|
||||
rem->apply |= E_REMEMBER_APPLY_BORDER;
|
||||
}
|
||||
if (rem)
|
||||
{
|
||||
rem->apply |= E_REMEMBER_APPLY_BORDER;
|
||||
e_remember_default_match_set(rem, cfdata->border);
|
||||
if (rem->prop.border) eina_stringshare_del(rem->prop.border);
|
||||
rem->prop.border = eina_stringshare_add(cfdata->border->bordername);
|
||||
cfdata->border->remember = rem;
|
||||
if (rem->prop.border) eina_stringshare_del(rem->prop.border);
|
||||
rem->prop.border = eina_stringshare_add(cfdata->border->bordername);
|
||||
cfdata->border->remember = rem;
|
||||
e_remember_update(cfdata->border);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cfdata->border->remember)
|
||||
{
|
||||
cfdata->border->remember->apply &= ~E_REMEMBER_APPLY_BORDER;
|
||||
if (cfdata->border->remember->apply == 0)
|
||||
{
|
||||
e_remember_unuse(cfdata->border->remember);
|
||||
e_remember_del(cfdata->border->remember);
|
||||
cfdata->border->remember = NULL;
|
||||
}
|
||||
}
|
||||
if (cfdata->border->remember)
|
||||
{
|
||||
cfdata->border->remember->apply &= ~E_REMEMBER_APPLY_BORDER;
|
||||
if (cfdata->border->remember->apply == 0)
|
||||
{
|
||||
e_remember_unuse(cfdata->border->remember);
|
||||
e_remember_del(cfdata->border->remember);
|
||||
cfdata->border->remember = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,22 +212,22 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
for (n = 1, l = borders; l; l = l->next, n++)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[PATH_MAX];
|
||||
|
||||
ob = e_livethumb_add(evas);
|
||||
e_livethumb_vsize_set(ob, 96, 96);
|
||||
oj = edje_object_add(e_livethumb_evas_get(ob));
|
||||
snprintf(buf, sizeof(buf), "e/widgets/border/%s/border",
|
||||
ob = e_livethumb_add(evas);
|
||||
e_livethumb_vsize_set(ob, 96, 96);
|
||||
oj = edje_object_add(e_livethumb_evas_get(ob));
|
||||
snprintf(buf, sizeof(buf), "e/widgets/border/%s/border",
|
||||
(char *)l->data);
|
||||
e_theme_edje_object_set(oj, "base/theme/borders", buf);
|
||||
e_livethumb_thumb_set(ob, oj);
|
||||
orect = evas_object_rectangle_add(e_livethumb_evas_get(ob));
|
||||
evas_object_color_set(orect, 0, 0, 0, 128);
|
||||
evas_object_show(orect);
|
||||
edje_object_part_swallow(oj, "e.swallow.client", orect);
|
||||
e_widget_ilist_append(ol, ob, (char *)l->data, NULL, NULL, l->data);
|
||||
if (!strcmp(tmp, (char *)l->data))
|
||||
sel = n;
|
||||
e_theme_edje_object_set(oj, "base/theme/borders", buf);
|
||||
e_livethumb_thumb_set(ob, oj);
|
||||
orect = evas_object_rectangle_add(e_livethumb_evas_get(ob));
|
||||
evas_object_color_set(orect, 0, 0, 0, 128);
|
||||
evas_object_show(orect);
|
||||
edje_object_part_swallow(oj, "e.swallow.client", orect);
|
||||
e_widget_ilist_append(ol, ob, (char *)l->data, NULL, NULL, l->data);
|
||||
if (!strcmp(tmp, (char *)l->data))
|
||||
sel = n;
|
||||
}
|
||||
|
||||
e_widget_size_min_get(ol, &w, &h);
|
||||
|
@ -244,9 +244,9 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if (cfdata->border)
|
||||
{
|
||||
ob = e_widget_check_add(evas, _("Remember this Border for this window next time it appears"),
|
||||
ob = e_widget_check_add(evas, _("Remember this Border for this window next time it appears"),
|
||||
&(cfdata->remember_border));
|
||||
e_widget_list_object_append(o, ob, 1, 0, 0.0);
|
||||
e_widget_list_object_append(o, ob, 1, 0, 0.0);
|
||||
}
|
||||
|
||||
EINA_LIST_FREE(borders, str)
|
||||
|
@ -256,3 +256,4 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,66 +1,69 @@
|
|||
#include "e.h"
|
||||
|
||||
typedef struct _CFColor_Class CFColor_Class;
|
||||
typedef struct _CFColor_Class CFColor_Class;
|
||||
typedef struct _CFColor_Class_Description CFColor_Class_Description;
|
||||
|
||||
typedef enum {
|
||||
COLOR_CLASS_UNKNOWN = 0,
|
||||
COLOR_CLASS_SOLID = 1,
|
||||
COLOR_CLASS_TEXT = 2
|
||||
COLOR_CLASS_UNKNOWN = 0,
|
||||
COLOR_CLASS_SOLID = 1,
|
||||
COLOR_CLASS_TEXT = 2
|
||||
} CFColor_Class_Type;
|
||||
|
||||
struct _CFColor_Class
|
||||
{
|
||||
const char *key;
|
||||
const char *name;
|
||||
const char *key;
|
||||
const char *name;
|
||||
|
||||
E_Color_Class *cc;
|
||||
|
||||
struct {
|
||||
int r[3], g[3], b[3], a[3];
|
||||
struct
|
||||
{
|
||||
int r[3], g[3], b[3], a[3];
|
||||
Eina_Bool changed;
|
||||
Eina_Bool enabled;
|
||||
} val;
|
||||
|
||||
struct {
|
||||
Evas_Object *icon;
|
||||
Evas_Object *end;
|
||||
struct
|
||||
{
|
||||
Evas_Object *icon;
|
||||
Evas_Object *end;
|
||||
CFColor_Class_Type type;
|
||||
} gui;
|
||||
};
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int state;
|
||||
E_Color color[3];
|
||||
int state;
|
||||
E_Color color[3];
|
||||
|
||||
Eina_List *classes;
|
||||
Eina_List *selected;
|
||||
Eina_List *changed;
|
||||
|
||||
struct {
|
||||
Evas *evas;
|
||||
struct
|
||||
{
|
||||
Evas *evas;
|
||||
Evas_Object *ilist;
|
||||
Evas_Object *frame;
|
||||
Evas_Object *state;
|
||||
Evas_Object *color[3];
|
||||
Evas_Object *reset;
|
||||
Evas_Object *text_preview;
|
||||
Eina_List *disable_list;
|
||||
Eina_List *disable_list;
|
||||
} gui;
|
||||
|
||||
Ecore_Timer *delay_load_timer;
|
||||
Ecore_Timer *delay_color_timer;
|
||||
Ecore_Idler *selection_idler;
|
||||
|
||||
Eina_Bool populating;
|
||||
Eina_Bool populating;
|
||||
};
|
||||
|
||||
struct _CFColor_Class_Description
|
||||
{
|
||||
const char *key;
|
||||
size_t keylen;
|
||||
const char *name;
|
||||
const char *key;
|
||||
size_t keylen;
|
||||
const char *name;
|
||||
CFColor_Class_Type type;
|
||||
};
|
||||
|
||||
|
@ -72,76 +75,75 @@ struct _CFColor_Class_Description
|
|||
*/
|
||||
static const CFColor_Class_Description _color_classes_wm[] =
|
||||
{
|
||||
CCDESC_T("border_title", N_("Border Title")),
|
||||
CCDESC_T("border_title_active", N_("Border Title Active")),
|
||||
CCDESC_T("border_frame", N_("Border Frame")),
|
||||
CCDESC_T("border_frame_active", N_("Border Frame Active")),
|
||||
CCDESC_T("error_text", N_("Error Text")),
|
||||
CCDESC_S("menu_base", N_("Menu Background Base")),
|
||||
CCDESC_T("menu_title", N_("Menu Title")),
|
||||
CCDESC_T("menu_title_active", N_("Menu Title Active")),
|
||||
CCDESC_T("menu_item", N_("Menu Item")),
|
||||
CCDESC_T("menu_item_active", N_("Menu Item Active")),
|
||||
CCDESC_T("menu_item_disabled", N_("Menu Item Disabled")),
|
||||
CCDESC_T("move_text", N_("Move Text")),
|
||||
CCDESC_T("resize_text", N_("Resize Text")),
|
||||
CCDESC_T("winlist_item", N_("Winlist Item")),
|
||||
CCDESC_T("winlist_item_active", N_("Winlist Item Active")),
|
||||
CCDESC_T("winlist_label", N_("Winlist Label")),
|
||||
CCDESC_T("winlist_title", N_("Winlist Title")),
|
||||
CCDESC_S("dialog_base", N_("Dialog Background Base")),
|
||||
CCDESC_S("shelf_base", N_("Shelf Background Base")),
|
||||
CCDESC_S("fileman_base", N_("File Manager Background Base")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
CCDESC_T("border_title", N_("Border Title")),
|
||||
CCDESC_T("border_title_active", N_("Border Title Active")),
|
||||
CCDESC_T("border_frame", N_("Border Frame")),
|
||||
CCDESC_T("border_frame_active", N_("Border Frame Active")),
|
||||
CCDESC_T("error_text", N_("Error Text")),
|
||||
CCDESC_S("menu_base", N_("Menu Background Base")),
|
||||
CCDESC_T("menu_title", N_("Menu Title")),
|
||||
CCDESC_T("menu_title_active", N_("Menu Title Active")),
|
||||
CCDESC_T("menu_item", N_("Menu Item")),
|
||||
CCDESC_T("menu_item_active", N_("Menu Item Active")),
|
||||
CCDESC_T("menu_item_disabled", N_("Menu Item Disabled")),
|
||||
CCDESC_T("move_text", N_("Move Text")),
|
||||
CCDESC_T("resize_text", N_("Resize Text")),
|
||||
CCDESC_T("winlist_item", N_("Winlist Item")),
|
||||
CCDESC_T("winlist_item_active", N_("Winlist Item Active")),
|
||||
CCDESC_T("winlist_label", N_("Winlist Label")),
|
||||
CCDESC_T("winlist_title", N_("Winlist Title")),
|
||||
CCDESC_S("dialog_base", N_("Dialog Background Base")),
|
||||
CCDESC_S("shelf_base", N_("Shelf Background Base")),
|
||||
CCDESC_S("fileman_base", N_("File Manager Background Base")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
};
|
||||
static const CFColor_Class_Description _color_classes_widgets[] =
|
||||
{
|
||||
CCDESC_S("focus", N_("Focus")),
|
||||
CCDESC_T("button_text", N_("Button Text")),
|
||||
CCDESC_T("button_text_disabled", N_("Button Text Disabled")),
|
||||
CCDESC_T("check_text", N_("Check Text")),
|
||||
CCDESC_T("check_text_disabled", N_("Check Text Disabled")),
|
||||
CCDESC_T("entry_text", N_("Entry Text")),
|
||||
CCDESC_T("entry_text_disabled", N_("Entry Text Disabled")),
|
||||
CCDESC_T("label_text", N_("Label Text")),
|
||||
CCDESC_T("ilist_item_selected", N_("List Item Text Selected")),
|
||||
CCDESC_T("ilist_item", N_("List Item Text (Even)")),
|
||||
CCDESC_S("ilist_item_base", N_("List Item Background Base (Even)")),
|
||||
CCDESC_T("ilist_item_odd", N_("List Item Text (Odd)")),
|
||||
CCDESC_S("ilist_item_odd_base", N_("List Item Background Base (Odd)")),
|
||||
CCDESC_T("ilist_item_header", N_("List Header Text (Even)")),
|
||||
CCDESC_S("ilist_item_header_base", N_("List Header Background Base (Even)")),
|
||||
CCDESC_T("ilist_item_header_odd", N_("List Header Text (Odd)")),
|
||||
CCDESC_S("ilist_item_header_odd_base",
|
||||
N_("List Header Background Base (Odd)")),
|
||||
CCDESC_T("radio_text", N_("Radio Text")),
|
||||
CCDESC_T("radio_text_disabled", N_("Radio Text Disabled")),
|
||||
CCDESC_T("slider_text", N_("Slider Text")),
|
||||
CCDESC_T("slider_text_disabled", N_("Slider Text Disabled")),
|
||||
CCDESC_S("frame_base", N_("Frame Background Base")),
|
||||
CCDESC_S("scrollframe_base", N_("Scroller Frame Background Base")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
CCDESC_S("focus", N_("Focus")),
|
||||
CCDESC_T("button_text", N_("Button Text")),
|
||||
CCDESC_T("button_text_disabled", N_("Button Text Disabled")),
|
||||
CCDESC_T("check_text", N_("Check Text")),
|
||||
CCDESC_T("check_text_disabled", N_("Check Text Disabled")),
|
||||
CCDESC_T("entry_text", N_("Entry Text")),
|
||||
CCDESC_T("entry_text_disabled", N_("Entry Text Disabled")),
|
||||
CCDESC_T("label_text", N_("Label Text")),
|
||||
CCDESC_T("ilist_item_selected", N_("List Item Text Selected")),
|
||||
CCDESC_T("ilist_item", N_("List Item Text (Even)")),
|
||||
CCDESC_S("ilist_item_base", N_("List Item Background Base (Even)")),
|
||||
CCDESC_T("ilist_item_odd", N_("List Item Text (Odd)")),
|
||||
CCDESC_S("ilist_item_odd_base", N_("List Item Background Base (Odd)")),
|
||||
CCDESC_T("ilist_item_header", N_("List Header Text (Even)")),
|
||||
CCDESC_S("ilist_item_header_base", N_("List Header Background Base (Even)")),
|
||||
CCDESC_T("ilist_item_header_odd", N_("List Header Text (Odd)")),
|
||||
CCDESC_S("ilist_item_header_odd_base",
|
||||
N_("List Header Background Base (Odd)")),
|
||||
CCDESC_T("radio_text", N_("Radio Text")),
|
||||
CCDESC_T("radio_text_disabled", N_("Radio Text Disabled")),
|
||||
CCDESC_T("slider_text", N_("Slider Text")),
|
||||
CCDESC_T("slider_text_disabled", N_("Slider Text Disabled")),
|
||||
CCDESC_S("frame_base", N_("Frame Background Base")),
|
||||
CCDESC_S("scrollframe_base", N_("Scroller Frame Background Base")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
};
|
||||
static const CFColor_Class_Description _color_classes_modules[] =
|
||||
{
|
||||
CCDESC_T("module_label", N_("Module Label")),
|
||||
CCDESC_S("comp_focus-out_color", N_("Composite Focus-out Color")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
CCDESC_T("module_label", N_("Module Label")),
|
||||
CCDESC_S("comp_focus-out_color", N_("Composite Focus-out Color")),
|
||||
{NULL, 0, NULL, COLOR_CLASS_UNKNOWN}
|
||||
};
|
||||
#undef CCDESC_S
|
||||
#undef CCDESC_T
|
||||
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static void _config_color_class_free(CFColor_Class *ccc);
|
||||
static void _config_color_class_icon_state_apply(CFColor_Class *ccc);
|
||||
static void _config_color_class_end_state_apply(CFColor_Class *ccc);
|
||||
static Eina_Bool _fill_data_delayed(void *data);
|
||||
static Eina_Bool _color_changed_delay(void *data);
|
||||
static void _config_color_class_free(CFColor_Class *ccc);
|
||||
static void _config_color_class_icon_state_apply(CFColor_Class *ccc);
|
||||
static void _config_color_class_end_state_apply(CFColor_Class *ccc);
|
||||
static Eina_Bool _fill_data_delayed(void *data);
|
||||
static Eina_Bool _color_changed_delay(void *data);
|
||||
|
||||
E_Config_Dialog *
|
||||
e_int_config_color_classes(E_Container *con, const char *params __UNUSED__)
|
||||
|
@ -159,7 +161,7 @@ e_int_config_color_classes(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create_widgets;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Colors"), "E", "appearance/colors",
|
||||
"preferences-desktop-color", 0, v, NULL);
|
||||
"preferences-desktop-color", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -213,9 +215,9 @@ _color_class_list_selection_idler(void *data)
|
|||
|
||||
if (cfdata->delay_color_timer)
|
||||
{
|
||||
ecore_timer_del(cfdata->delay_color_timer);
|
||||
cfdata->delay_color_timer = NULL;
|
||||
_color_changed_delay(cfdata);
|
||||
ecore_timer_del(cfdata->delay_color_timer);
|
||||
cfdata->delay_color_timer = NULL;
|
||||
_color_changed_delay(cfdata);
|
||||
}
|
||||
|
||||
eina_list_free(cfdata->selected);
|
||||
|
@ -223,64 +225,64 @@ _color_class_list_selection_idler(void *data)
|
|||
|
||||
EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->gui.ilist), l, it)
|
||||
{
|
||||
if ((!it->selected) || (it->header)) continue;
|
||||
ccc = e_widget_ilist_item_data_get(it);
|
||||
cfdata->selected = eina_list_append(cfdata->selected, ccc);
|
||||
if ((!it->selected) || (it->header)) continue;
|
||||
ccc = e_widget_ilist_item_data_get(it);
|
||||
cfdata->selected = eina_list_append(cfdata->selected, ccc);
|
||||
|
||||
if ((!enabled) && (ccc->val.enabled))
|
||||
enabled = EINA_TRUE;
|
||||
if ((!enabled) && (ccc->val.enabled))
|
||||
enabled = EINA_TRUE;
|
||||
|
||||
#define _X(_n) \
|
||||
do \
|
||||
{ \
|
||||
for (i = 0; i < 3; i++) \
|
||||
{ \
|
||||
if (ccc->val._n[i] >= 0) \
|
||||
{ \
|
||||
if (_n[i] == -1) \
|
||||
_n[i] = ccc->val._n[i]; \
|
||||
else if ((_n[i] >= 0) && \
|
||||
(ccc->val._n[i] != _n[i])) \
|
||||
_n[i] = -2; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
#define _X(_n) \
|
||||
do \
|
||||
{ \
|
||||
for (i = 0; i < 3; i++) \
|
||||
{ \
|
||||
if (ccc->val._n[i] >= 0) \
|
||||
{ \
|
||||
if (_n[i] == -1) \
|
||||
_n[i] = ccc->val._n[i]; \
|
||||
else if ((_n[i] >= 0) && \
|
||||
(ccc->val._n[i] != _n[i])) \
|
||||
_n[i] = -2; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
_X(r);
|
||||
_X(g);
|
||||
_X(b);
|
||||
_X(a);
|
||||
_X(r);
|
||||
_X(g);
|
||||
_X(b);
|
||||
_X(a);
|
||||
#undef _X
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
mixed[i] = ((r[i] == -2) || (g[i] == -2) ||
|
||||
(b[i] == -2) || (a[i] == -2));
|
||||
mixed[i] = ((r[i] == -2) || (g[i] == -2) ||
|
||||
(b[i] == -2) || (a[i] == -2));
|
||||
|
||||
unset[i] = ((r[i] == -1) && (g[i] == -1) &&
|
||||
(b[i] == -1) && (a[i] == -1));
|
||||
unset[i] = ((r[i] == -1) && (g[i] == -1) &&
|
||||
(b[i] == -1) && (a[i] == -1));
|
||||
}
|
||||
|
||||
count = eina_list_count(cfdata->selected);
|
||||
if ((ccc) && (count == 1))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), _("Color class: %s"), ccc->name);
|
||||
description = buf;
|
||||
snprintf(buf, sizeof(buf), _("Color class: %s"), ccc->name);
|
||||
description = buf;
|
||||
}
|
||||
else if (count > 1)
|
||||
{
|
||||
if (mixed[0] || mixed[1] || mixed[2])
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u mixed colors classes"), count);
|
||||
else if (unset[0] && unset[1] && unset[2])
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u unset colors classes"), count);
|
||||
else
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u uniform colors classes"), count);
|
||||
description = buf;
|
||||
if (mixed[0] || mixed[1] || mixed[2])
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u mixed colors classes"), count);
|
||||
else if (unset[0] && unset[1] && unset[2])
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u unset colors classes"), count);
|
||||
else
|
||||
snprintf(buf, sizeof(buf),
|
||||
_("Selected %u uniform colors classes"), count);
|
||||
description = buf;
|
||||
}
|
||||
else
|
||||
description = _("No selected color class");
|
||||
|
@ -289,22 +291,22 @@ _color_class_list_selection_idler(void *data)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (unset[i] || mixed[i])
|
||||
r[i] = g[i] = b[i] = a[i] = 0;
|
||||
if (unset[i] || mixed[i])
|
||||
r[i] = g[i] = b[i] = a[i] = 0;
|
||||
|
||||
cfdata->color[i].r = r[i];
|
||||
cfdata->color[i].g = g[i];
|
||||
cfdata->color[i].b = b[i];
|
||||
cfdata->color[i].a = a[i];
|
||||
e_color_update_rgb(cfdata->color + i);
|
||||
e_widget_color_well_update(cfdata->gui.color[i]);
|
||||
cfdata->color[i].r = r[i];
|
||||
cfdata->color[i].g = g[i];
|
||||
cfdata->color[i].b = b[i];
|
||||
cfdata->color[i].a = a[i];
|
||||
e_color_update_rgb(cfdata->color + i);
|
||||
e_widget_color_well_update(cfdata->gui.color[i]);
|
||||
}
|
||||
|
||||
edje_object_color_class_set
|
||||
(cfdata->gui.text_preview, "color_preview",
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
|
||||
e_widget_frametable_label_set(cfdata->gui.frame, description);
|
||||
|
||||
|
@ -327,7 +329,7 @@ _color_class_list_selection_changed(void *data, Evas_Object *obj __UNUSED__)
|
|||
if (cfdata->selection_idler)
|
||||
ecore_idler_del(cfdata->selection_idler);
|
||||
cfdata->selection_idler = ecore_idler_add
|
||||
(_color_class_list_selection_idler, cfdata);
|
||||
(_color_class_list_selection_idler, cfdata);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -346,21 +348,21 @@ _config_color_class_color_reset(CFColor_Class *ccc)
|
|||
*/
|
||||
if (ccc->gui.icon)
|
||||
ret = edje_object_color_class_get
|
||||
(ccc->gui.icon, ccc->key,
|
||||
r + 0, g + 0, b + 0, a + 0,
|
||||
r + 1, g + 1, b + 1, a + 1,
|
||||
r + 2, g + 2, b + 2, a + 2);
|
||||
(ccc->gui.icon, ccc->key,
|
||||
r + 0, g + 0, b + 0, a + 0,
|
||||
r + 1, g + 1, b + 1, a + 1,
|
||||
r + 2, g + 2, b + 2, a + 2);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
r[i] = -1;
|
||||
g[i] = -1;
|
||||
b[i] = -1;
|
||||
a[i] = -1;
|
||||
}
|
||||
unsigned int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
r[i] = -1;
|
||||
g[i] = -1;
|
||||
b[i] = -1;
|
||||
a[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -373,49 +375,49 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if (cfdata->delay_color_timer)
|
||||
{
|
||||
ecore_timer_del(cfdata->delay_color_timer);
|
||||
cfdata->delay_color_timer = NULL;
|
||||
_color_changed_delay(cfdata);
|
||||
ecore_timer_del(cfdata->delay_color_timer);
|
||||
cfdata->delay_color_timer = NULL;
|
||||
_color_changed_delay(cfdata);
|
||||
}
|
||||
|
||||
EINA_LIST_FREE(cfdata->changed, ccc)
|
||||
{
|
||||
ccc->val.changed = EINA_FALSE;
|
||||
ccc->val.changed = EINA_FALSE;
|
||||
|
||||
if (ccc->val.enabled)
|
||||
{
|
||||
int *r = ccc->val.r;
|
||||
int *g = ccc->val.g;
|
||||
int *b = ccc->val.b;
|
||||
int *a = ccc->val.a;
|
||||
if (ccc->val.enabled)
|
||||
{
|
||||
int *r = ccc->val.r;
|
||||
int *g = ccc->val.g;
|
||||
int *b = ccc->val.b;
|
||||
int *a = ccc->val.a;
|
||||
|
||||
if (ccc->cc)
|
||||
{
|
||||
e_color_class_instance_set
|
||||
(ccc->cc,
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ccc->cc = e_color_class_set_stringshared
|
||||
(ccc->key,
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ccc->cc)
|
||||
{
|
||||
e_color_class_instance_del(ccc->cc);
|
||||
ccc->cc = NULL;
|
||||
}
|
||||
_config_color_class_color_reset(ccc);
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
if (ccc->cc)
|
||||
{
|
||||
e_color_class_instance_set
|
||||
(ccc->cc,
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ccc->cc = e_color_class_set_stringshared
|
||||
(ccc->key,
|
||||
r[0], g[0], b[0], a[0],
|
||||
r[1], g[1], b[1], a[1],
|
||||
r[2], g[2], b[2], a[2]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ccc->cc)
|
||||
{
|
||||
e_color_class_instance_del(ccc->cc);
|
||||
ccc->cc = NULL;
|
||||
}
|
||||
_config_color_class_color_reset(ccc);
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -435,19 +437,19 @@ _custom_color_cb_change(void *data, Evas_Object *obj)
|
|||
enabled = e_widget_check_checked_get(obj);
|
||||
EINA_LIST_FOREACH(cfdata->selected, l, ccc)
|
||||
{
|
||||
ccc->val.enabled = enabled;
|
||||
_config_color_class_end_state_apply(ccc);
|
||||
if (!enabled)
|
||||
{
|
||||
_config_color_class_color_reset(ccc);
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
ccc->val.enabled = enabled;
|
||||
_config_color_class_end_state_apply(ccc);
|
||||
if (!enabled)
|
||||
{
|
||||
_config_color_class_color_reset(ccc);
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
|
||||
if (!ccc->val.changed)
|
||||
{
|
||||
ccc->val.changed = EINA_TRUE;
|
||||
cfdata->changed = eina_list_append(cfdata->changed, ccc);
|
||||
}
|
||||
if (!ccc->val.changed)
|
||||
{
|
||||
ccc->val.changed = EINA_TRUE;
|
||||
cfdata->changed = eina_list_append(cfdata->changed, ccc);
|
||||
}
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(cfdata->gui.disable_list, l, o)
|
||||
|
@ -470,9 +472,9 @@ _color_changed_delay(void *data)
|
|||
col = cfdata->color;
|
||||
edje_object_color_class_set
|
||||
(cfdata->gui.text_preview, "color_preview",
|
||||
col[0].r, col[0].g, col[0].b, col[0].a,
|
||||
col[1].r, col[1].g, col[1].b, col[1].a,
|
||||
col[2].r, col[2].g, col[2].b, col[2].a);
|
||||
col[0].r, col[0].g, col[0].b, col[0].a,
|
||||
col[1].r, col[1].g, col[1].b, col[1].a,
|
||||
col[2].r, col[2].g, col[2].b, col[2].a);
|
||||
|
||||
cfdata->delay_color_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
|
@ -495,28 +497,28 @@ _color_cb_change(void *data, Evas_Object *obj)
|
|||
|
||||
if (i == 3)
|
||||
{
|
||||
EINA_LOG_ERR("unknown widget changed color: %p\n", obj);
|
||||
return;
|
||||
EINA_LOG_ERR("unknown widget changed color: %p\n", obj);
|
||||
return;
|
||||
}
|
||||
|
||||
col = cfdata->color + i;
|
||||
EINA_LIST_FOREACH(cfdata->selected, l, ccc)
|
||||
{
|
||||
ccc->val.r[i] = col->r;
|
||||
ccc->val.g[i] = col->g;
|
||||
ccc->val.b[i] = col->b;
|
||||
ccc->val.a[i] = col->a;
|
||||
ccc->val.r[i] = col->r;
|
||||
ccc->val.g[i] = col->g;
|
||||
ccc->val.b[i] = col->b;
|
||||
ccc->val.a[i] = col->a;
|
||||
|
||||
if (!ccc->val.changed)
|
||||
{
|
||||
ccc->val.changed = EINA_TRUE;
|
||||
cfdata->changed = eina_list_append(cfdata->changed, ccc);
|
||||
}
|
||||
if (!ccc->val.changed)
|
||||
{
|
||||
ccc->val.changed = EINA_TRUE;
|
||||
cfdata->changed = eina_list_append(cfdata->changed, ccc);
|
||||
}
|
||||
}
|
||||
|
||||
if (!cfdata->delay_color_timer)
|
||||
cfdata->delay_color_timer = ecore_timer_add
|
||||
(0.2, _color_changed_delay, cfdata);
|
||||
(0.2, _color_changed_delay, cfdata);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -542,10 +544,10 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_list_object_append(ol, cfdata->gui.ilist, 1, 1, 0.0);
|
||||
|
||||
cfdata->gui.frame = ot = e_widget_frametable_add
|
||||
(evas, _("No selected color class"), 0);
|
||||
(evas, _("No selected color class"), 0);
|
||||
|
||||
cfdata->gui.state = o = e_widget_check_add
|
||||
(evas, _("Custom colors"), &(cfdata->state));
|
||||
(evas, _("Custom colors"), &(cfdata->state));
|
||||
e_widget_on_change_hook_set(o, _custom_color_cb_change, cfdata);
|
||||
e_widget_size_min_get(o, &mw, &mh);
|
||||
e_widget_frametable_object_append_full
|
||||
|
@ -573,32 +575,32 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
o = e_widget_color_well_add_full(evas, cfdata->color + i, 1, 1);
|
||||
cfdata->gui.color[i] = o;
|
||||
cfdata->gui.disable_list = eina_list_append
|
||||
(cfdata->gui.disable_list, o);
|
||||
e_widget_on_change_hook_set(o, _color_cb_change, cfdata);
|
||||
e_widget_size_min_get(o, &mw, NULL);
|
||||
mw = 32 * e_scale;
|
||||
e_widget_frametable_object_append_full
|
||||
(ot, o, i, 2, 1, 1, 1, 1, 1, 0, 0.0, 0.0, mw, mh, 9999, 9999);
|
||||
o = e_widget_color_well_add_full(evas, cfdata->color + i, 1, 1);
|
||||
cfdata->gui.color[i] = o;
|
||||
cfdata->gui.disable_list = eina_list_append
|
||||
(cfdata->gui.disable_list, o);
|
||||
e_widget_on_change_hook_set(o, _color_cb_change, cfdata);
|
||||
e_widget_size_min_get(o, &mw, NULL);
|
||||
mw = 32 * e_scale;
|
||||
e_widget_frametable_object_append_full
|
||||
(ot, o, i, 2, 1, 1, 1, 1, 1, 0, 0.0, 0.0, mw, mh, 9999, 9999);
|
||||
}
|
||||
|
||||
o = edje_object_add(evas);
|
||||
if (!e_theme_edje_object_set(o, "base/theme/widgets",
|
||||
"e/modules/conf_colors/preview/text"))
|
||||
"e/modules/conf_colors/preview/text"))
|
||||
{
|
||||
evas_object_del(o);
|
||||
evas_object_del(o);
|
||||
}
|
||||
else
|
||||
{
|
||||
cfdata->gui.text_preview = o;
|
||||
edje_object_color_class_set
|
||||
(o, "color_preview", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
edje_object_part_text_set(o, "e.text", _("Text with applied colors."));
|
||||
edje_object_size_min_calc(o, &mw, &mh);
|
||||
e_widget_frametable_object_append_full
|
||||
(ot, o, 0, 3, 3, 1, 0, 0, 0, 0, 0.5, 0.5, mw, mh, 9999, 9999);
|
||||
cfdata->gui.text_preview = o;
|
||||
edje_object_color_class_set
|
||||
(o, "color_preview", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
edje_object_part_text_set(o, "e.text", _("Text with applied colors."));
|
||||
edje_object_size_min_calc(o, &mw, &mh);
|
||||
e_widget_frametable_object_append_full
|
||||
(ot, o, 0, 3, 3, 1, 0, 0, 0, 0, 0.5, 0.5, mw, mh, 9999, 9999);
|
||||
}
|
||||
|
||||
o = e_widget_label_add(evas, _("Colors depend on theme capabilities."));
|
||||
|
@ -642,30 +644,30 @@ _config_color_class_new(const char *key_stringshared, const char *name, E_Color_
|
|||
|
||||
if (cc)
|
||||
{
|
||||
ccc->val.r[0] = cc->r;
|
||||
ccc->val.g[0] = cc->g;
|
||||
ccc->val.b[0] = cc->b;
|
||||
ccc->val.a[0] = cc->a;
|
||||
ccc->val.r[0] = cc->r;
|
||||
ccc->val.g[0] = cc->g;
|
||||
ccc->val.b[0] = cc->b;
|
||||
ccc->val.a[0] = cc->a;
|
||||
|
||||
ccc->val.r[1] = cc->r2;
|
||||
ccc->val.g[1] = cc->g2;
|
||||
ccc->val.b[1] = cc->b2;
|
||||
ccc->val.a[1] = cc->a2;
|
||||
ccc->val.r[1] = cc->r2;
|
||||
ccc->val.g[1] = cc->g2;
|
||||
ccc->val.b[1] = cc->b2;
|
||||
ccc->val.a[1] = cc->a2;
|
||||
|
||||
ccc->val.r[2] = cc->r3;
|
||||
ccc->val.g[2] = cc->g3;
|
||||
ccc->val.b[2] = cc->b3;
|
||||
ccc->val.a[2] = cc->a3;
|
||||
ccc->val.r[2] = cc->r3;
|
||||
ccc->val.g[2] = cc->g3;
|
||||
ccc->val.b[2] = cc->b3;
|
||||
ccc->val.a[2] = cc->a3;
|
||||
|
||||
ccc->val.enabled = EINA_TRUE;
|
||||
ccc->val.enabled = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
ccc->val.r[i] = ccc->val.g[i] = ccc->val.b[i] = ccc->val.a[i] = -1;
|
||||
unsigned int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
ccc->val.r[i] = ccc->val.g[i] = ccc->val.b[i] = ccc->val.a[i] = -1;
|
||||
|
||||
ccc->val.enabled = EINA_FALSE;
|
||||
ccc->val.enabled = EINA_FALSE;
|
||||
}
|
||||
|
||||
return ccc;
|
||||
|
@ -680,28 +682,28 @@ _config_color_class_icon_state_apply(CFColor_Class *ccc)
|
|||
if ((ccc->gui.type == COLOR_CLASS_TEXT) ||
|
||||
(ccc->gui.type == COLOR_CLASS_SOLID))
|
||||
{
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview",
|
||||
ccc->val.r[0], ccc->val.g[0], ccc->val.b[0], ccc->val.a[0],
|
||||
ccc->val.r[1], ccc->val.g[1], ccc->val.b[1], ccc->val.a[1],
|
||||
ccc->val.r[2], ccc->val.g[2], ccc->val.b[2], ccc->val.a[2]);
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview",
|
||||
ccc->val.r[0], ccc->val.g[0], ccc->val.b[0], ccc->val.a[0],
|
||||
ccc->val.r[1], ccc->val.g[1], ccc->val.b[1], ccc->val.a[1],
|
||||
ccc->val.r[2], ccc->val.g[2], ccc->val.b[2], ccc->val.a[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c1",
|
||||
ccc->val.r[0], ccc->val.g[0], ccc->val.b[0], ccc->val.a[0],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c1",
|
||||
ccc->val.r[0], ccc->val.g[0], ccc->val.b[0], ccc->val.a[0],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c2",
|
||||
ccc->val.r[1], ccc->val.g[1], ccc->val.b[1], ccc->val.a[1],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c2",
|
||||
ccc->val.r[1], ccc->val.g[1], ccc->val.b[1], ccc->val.a[1],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c3",
|
||||
ccc->val.r[2], ccc->val.g[2], ccc->val.b[2], ccc->val.a[2],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
edje_object_color_class_set
|
||||
(ccc->gui.icon, "color_preview_c3",
|
||||
ccc->val.r[2], ccc->val.g[2], ccc->val.b[2], ccc->val.a[2],
|
||||
0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,8 +737,8 @@ _fill_data_add_header(E_Config_Dialog_Data *cfdata, const char *name, const char
|
|||
|
||||
if (icon)
|
||||
{
|
||||
ic = e_icon_add(cfdata->gui.evas);
|
||||
e_util_icon_theme_set(ic, icon);
|
||||
ic = e_icon_add(cfdata->gui.evas);
|
||||
e_util_icon_theme_set(ic, icon);
|
||||
}
|
||||
else
|
||||
ic = NULL;
|
||||
|
@ -752,48 +754,50 @@ _fill_data_add_item(E_Config_Dialog_Data *cfdata, CFColor_Class *ccc)
|
|||
icon = edje_object_add(cfdata->gui.evas);
|
||||
if (icon)
|
||||
{
|
||||
const char *group;
|
||||
const char *group;
|
||||
|
||||
switch (ccc->gui.type)
|
||||
{
|
||||
case COLOR_CLASS_TEXT:
|
||||
group = "e/modules/conf_colors/preview/text";
|
||||
break;
|
||||
case COLOR_CLASS_SOLID:
|
||||
group = "e/modules/conf_colors/preview/solid";
|
||||
break;
|
||||
default:
|
||||
group = "e/modules/conf_colors/preview/unknown";
|
||||
}
|
||||
switch (ccc->gui.type)
|
||||
{
|
||||
case COLOR_CLASS_TEXT:
|
||||
group = "e/modules/conf_colors/preview/text";
|
||||
break;
|
||||
|
||||
if (e_theme_edje_object_set(icon, "base/theme/widgets", group))
|
||||
{
|
||||
ccc->gui.icon = icon;
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LOG_ERR("your theme misses '%s'!", group);
|
||||
evas_object_del(icon);
|
||||
icon = NULL;
|
||||
}
|
||||
case COLOR_CLASS_SOLID:
|
||||
group = "e/modules/conf_colors/preview/solid";
|
||||
break;
|
||||
|
||||
default:
|
||||
group = "e/modules/conf_colors/preview/unknown";
|
||||
}
|
||||
|
||||
if (e_theme_edje_object_set(icon, "base/theme/widgets", group))
|
||||
{
|
||||
ccc->gui.icon = icon;
|
||||
_config_color_class_icon_state_apply(ccc);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LOG_ERR("your theme misses '%s'!", group);
|
||||
evas_object_del(icon);
|
||||
icon = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
end = edje_object_add(cfdata->gui.evas);
|
||||
if (end)
|
||||
{
|
||||
if (e_theme_edje_object_set(end, "base/theme/widgets",
|
||||
"e/widgets/ilist/toggle_end"))
|
||||
{
|
||||
ccc->gui.end = end;
|
||||
_config_color_class_end_state_apply(ccc);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LOG_ERR("your theme misses 'e/widgets/ilist/toggle_end'!");
|
||||
evas_object_del(end);
|
||||
end = NULL;
|
||||
}
|
||||
if (e_theme_edje_object_set(end, "base/theme/widgets",
|
||||
"e/widgets/ilist/toggle_end"))
|
||||
{
|
||||
ccc->gui.end = end;
|
||||
_config_color_class_end_state_apply(ccc);
|
||||
}
|
||||
else
|
||||
{
|
||||
EINA_LOG_ERR("your theme misses 'e/widgets/ilist/toggle_end'!");
|
||||
evas_object_del(end);
|
||||
end = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
e_widget_ilist_append_full
|
||||
|
@ -809,35 +813,35 @@ _fill_data_add_batch(E_Config_Dialog_Data *cfdata, Eina_List **p_todo, const CFC
|
|||
|
||||
for (itr = descs; itr->key; itr++)
|
||||
{
|
||||
E_Color_Class *cc;
|
||||
Eina_List *l, *found_node = NULL;
|
||||
const char *key_stringshared = eina_stringshare_add(itr->key);
|
||||
E_Color_Class *cc;
|
||||
Eina_List *l, *found_node = NULL;
|
||||
const char *key_stringshared = eina_stringshare_add(itr->key);
|
||||
|
||||
EINA_LIST_FOREACH(*p_todo, l, cc)
|
||||
{
|
||||
if (cc->name == key_stringshared)
|
||||
{
|
||||
found_node = l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EINA_LIST_FOREACH(*p_todo, l, cc)
|
||||
{
|
||||
if (cc->name == key_stringshared)
|
||||
{
|
||||
found_node = l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found_node)
|
||||
cc = NULL;
|
||||
else
|
||||
{
|
||||
cc = found_node->data;
|
||||
*p_todo = eina_list_remove_list(*p_todo, found_node);
|
||||
}
|
||||
if (!found_node)
|
||||
cc = NULL;
|
||||
else
|
||||
{
|
||||
cc = found_node->data;
|
||||
*p_todo = eina_list_remove_list(*p_todo, found_node);
|
||||
}
|
||||
|
||||
ccc = _config_color_class_new(key_stringshared, itr->name, cc);
|
||||
eina_stringshare_del(key_stringshared);
|
||||
ccc = _config_color_class_new(key_stringshared, itr->name, cc);
|
||||
eina_stringshare_del(key_stringshared);
|
||||
|
||||
if (ccc)
|
||||
{
|
||||
batch = eina_list_append(batch, ccc);
|
||||
ccc->gui.type = itr->type;
|
||||
}
|
||||
if (ccc)
|
||||
{
|
||||
batch = eina_list_append(batch, ccc);
|
||||
ccc->gui.type = itr->type;
|
||||
}
|
||||
}
|
||||
|
||||
batch = eina_list_sort(batch, -1, _config_color_class_sort);
|
||||
|
@ -863,31 +867,31 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
todo = eina_list_sort(todo, -1, _color_class_sort);
|
||||
EINA_LIST_FREE(todo, cc)
|
||||
{
|
||||
CFColor_Class *ccc;
|
||||
char name[256], *d = name, *d_end = name + sizeof(name) - 1;
|
||||
const char *s = cc->name;
|
||||
Eina_Bool needs_upcase = EINA_TRUE;
|
||||
CFColor_Class *ccc;
|
||||
char name[256], *d = name, *d_end = name + sizeof(name) - 1;
|
||||
const char *s = cc->name;
|
||||
Eina_Bool needs_upcase = EINA_TRUE;
|
||||
|
||||
for (; *s && d < d_end; s++, d++)
|
||||
{
|
||||
if (!isalnum(*s))
|
||||
{
|
||||
*d = ' ';
|
||||
needs_upcase = EINA_TRUE;
|
||||
}
|
||||
else if (needs_upcase)
|
||||
{
|
||||
*d = toupper(*s);
|
||||
needs_upcase = EINA_FALSE;
|
||||
}
|
||||
else
|
||||
*d = *s;
|
||||
}
|
||||
*d = '\0';
|
||||
for (; *s && d < d_end; s++, d++)
|
||||
{
|
||||
if (!isalnum(*s))
|
||||
{
|
||||
*d = ' ';
|
||||
needs_upcase = EINA_TRUE;
|
||||
}
|
||||
else if (needs_upcase)
|
||||
{
|
||||
*d = toupper(*s);
|
||||
needs_upcase = EINA_FALSE;
|
||||
}
|
||||
else
|
||||
*d = *s;
|
||||
}
|
||||
*d = '\0';
|
||||
|
||||
ccc = _config_color_class_new(cc->name, name, cc);
|
||||
if (!ccc) continue;
|
||||
_fill_data_add_item(cfdata, ccc);
|
||||
ccc = _config_color_class_new(cc->name, name, cc);
|
||||
if (!ccc) continue;
|
||||
_fill_data_add_item(cfdata, ccc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -899,3 +903,4 @@ _fill_data_delayed(void *data)
|
|||
_fill_data(cfdata);
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
#include "e.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int show_cursor;
|
||||
int idle_cursor;
|
||||
int use_e_cursor;
|
||||
int cursor_size;
|
||||
int show_cursor;
|
||||
int idle_cursor;
|
||||
int use_e_cursor;
|
||||
int cursor_size;
|
||||
|
||||
Eina_List *disable_list;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
Evas_Object *idle_cursor;
|
||||
} gui;
|
||||
};
|
||||
|
@ -35,9 +36,9 @@ e_int_config_cursor(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.check_changed = _basic_check_changed;
|
||||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Cursor Settings"),
|
||||
"E", "appearance/mouse_cursor",
|
||||
"preferences-desktop-pointer", 0, v, NULL);
|
||||
_("Cursor Settings"),
|
||||
"E", "appearance/mouse_cursor",
|
||||
"preferences-desktop-pointer", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -76,13 +77,13 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
EINA_LIST_FOREACH(e_manager_list(), l, man)
|
||||
{
|
||||
if (man->pointer && !e_config->show_cursor)
|
||||
{
|
||||
e_pointer_hide(man->pointer);
|
||||
continue;
|
||||
}
|
||||
if (man->pointer) e_object_del(E_OBJECT(man->pointer));
|
||||
man->pointer = e_pointer_window_new(man->root, 1);
|
||||
if (man->pointer && !e_config->show_cursor)
|
||||
{
|
||||
e_pointer_hide(man->pointer);
|
||||
continue;
|
||||
}
|
||||
if (man->pointer) e_object_del(E_OBJECT(man->pointer));
|
||||
man->pointer = e_pointer_window_new(man->root, 1);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -91,10 +92,10 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
static int
|
||||
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
return ((e_config->show_cursor != cfdata->show_cursor) ||
|
||||
(e_config->idle_cursor != cfdata->idle_cursor) ||
|
||||
(e_config->use_e_cursor != cfdata->use_e_cursor) ||
|
||||
(e_config->cursor_size != cfdata->cursor_size));
|
||||
return (e_config->show_cursor != cfdata->show_cursor) ||
|
||||
(e_config->idle_cursor != cfdata->idle_cursor) ||
|
||||
(e_config->use_e_cursor != cfdata->use_e_cursor) ||
|
||||
(e_config->cursor_size != cfdata->cursor_size);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -113,7 +114,7 @@ _show_cursor_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
|||
Evas_Object *o;
|
||||
|
||||
EINA_LIST_FOREACH(cfdata->disable_list, l, o)
|
||||
e_widget_disabled_set(o, !cfdata->show_cursor);
|
||||
e_widget_disabled_set(o, !cfdata->show_cursor);
|
||||
|
||||
_use_e_cursor_cb_change(cfdata, NULL);
|
||||
}
|
||||
|
@ -139,7 +140,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
cfdata->disable_list = eina_list_append(cfdata->disable_list, ob);
|
||||
|
||||
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"),
|
||||
8, 128, 4, 0, NULL, &(cfdata->cursor_size), 100);
|
||||
8, 128, 4, 0, NULL, &(cfdata->cursor_size), 100);
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
cfdata->disable_list = eina_list_append(cfdata->disable_list, ob);
|
||||
|
||||
|
@ -158,7 +159,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
cfdata->disable_list = eina_list_append(cfdata->disable_list, ob);
|
||||
|
||||
ob = e_widget_check_add(evas, _("Idle effects"),
|
||||
&(cfdata->idle_cursor));
|
||||
&(cfdata->idle_cursor));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
cfdata->gui.idle_cursor = ob;
|
||||
|
||||
|
@ -168,3 +169,4 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,28 +1,28 @@
|
|||
#include "e.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _sort_icon_themes(const void *data1, const void *data2);
|
||||
static int _sort_icon_themes(const void *data1, const void *data2);
|
||||
static Evas_Object *_icon_new(Evas *evas, const char *theme, const char *icon, unsigned int size);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
Eina_List *icon_themes;
|
||||
const char *themename;
|
||||
int overrides;
|
||||
int enable_icon_theme;
|
||||
int match_e17_icon_theme;
|
||||
int populating;
|
||||
Eina_List *icon_themes;
|
||||
const char *themename;
|
||||
int overrides;
|
||||
int enable_icon_theme;
|
||||
int match_e17_icon_theme;
|
||||
int populating;
|
||||
struct
|
||||
{
|
||||
Evas_Object *list;
|
||||
Evas_Object *preview[4]; /* same size as _icon_previews */
|
||||
} gui;
|
||||
Ecore_Idler *fill_icon_themes_delayed;
|
||||
{
|
||||
Evas_Object *list;
|
||||
Evas_Object *preview[4]; /* same size as _icon_previews */
|
||||
} gui;
|
||||
Ecore_Idler *fill_icon_themes_delayed;
|
||||
};
|
||||
|
||||
static const char *_icon_previews[4] =
|
||||
|
@ -52,7 +52,7 @@ e_int_config_icon_themes(E_Container *con, const char *params __UNUSED__)
|
|||
|
||||
cfd = e_config_dialog_new(con, _("Icon Theme Settings"),
|
||||
"E", "appearance/icon_theme",
|
||||
"preferences-icon-theme", 0, v, NULL);
|
||||
"preferences-icon-theme", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -133,8 +133,8 @@ _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
ev = E_NEW(E_Event_Config_Icon_Theme, 1);
|
||||
if (ev)
|
||||
{
|
||||
ev->icon_theme = e_config->icon_theme;
|
||||
ecore_event_add(E_EVENT_CONFIG_ICON_THEME, ev, NULL, NULL);
|
||||
ev->icon_theme = e_config->icon_theme;
|
||||
ecore_event_add(E_EVENT_CONFIG_ICON_THEME, ev, NULL, NULL);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -145,24 +145,24 @@ _populate_preview(E_Config_Dialog_Data *cfdata)
|
|||
const char *t = cfdata->themename;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sizeof(_icon_previews)/sizeof(_icon_previews[0]); i++)
|
||||
for (i = 0; i < sizeof(_icon_previews) / sizeof(_icon_previews[0]); i++)
|
||||
{
|
||||
const char *path;
|
||||
const char *path;
|
||||
|
||||
if (!(path = efreet_icon_path_find(t, _icon_previews[i], PREVIEW_SIZE)))
|
||||
continue;
|
||||
if (e_icon_file_set(cfdata->gui.preview[i], path))
|
||||
e_icon_fill_inside_set(cfdata->gui.preview[i], EINA_TRUE);
|
||||
if (e_icon_file_set(cfdata->gui.preview[i], path))
|
||||
e_icon_fill_inside_set(cfdata->gui.preview[i], EINA_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
struct _fill_icon_themes_data
|
||||
{
|
||||
Eina_List *l;
|
||||
int i;
|
||||
Evas *evas;
|
||||
Eina_List *l;
|
||||
int i;
|
||||
Evas *evas;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_Bool themes_loaded;
|
||||
Eina_Bool themes_loaded;
|
||||
};
|
||||
|
||||
static Eina_Bool
|
||||
|
@ -172,47 +172,47 @@ _fill_icon_themes(void *data)
|
|||
Efreet_Icon_Theme *theme;
|
||||
Evas_Object *oc = NULL;
|
||||
const char **example_icon, *example_icons[] =
|
||||
{
|
||||
NULL,
|
||||
"folder",
|
||||
"user-home",
|
||||
"text-x-generic",
|
||||
"system-run",
|
||||
"preferences-system",
|
||||
NULL,
|
||||
};
|
||||
{
|
||||
NULL,
|
||||
"folder",
|
||||
"user-home",
|
||||
"text-x-generic",
|
||||
"system-run",
|
||||
"preferences-system",
|
||||
NULL,
|
||||
};
|
||||
|
||||
if (!d->themes_loaded)
|
||||
{
|
||||
d->cfdata->icon_themes = eina_list_free(d->cfdata->icon_themes);
|
||||
_fill_data(d->cfdata);
|
||||
d->l = d->cfdata->icon_themes;
|
||||
d->i = 0;
|
||||
d->themes_loaded = 1;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
d->cfdata->icon_themes = eina_list_free(d->cfdata->icon_themes);
|
||||
_fill_data(d->cfdata);
|
||||
d->l = d->cfdata->icon_themes;
|
||||
d->i = 0;
|
||||
d->themes_loaded = 1;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
if (!d->l)
|
||||
{
|
||||
int mw, mh;
|
||||
|
||||
e_widget_ilist_go(d->cfdata->gui.list);
|
||||
e_widget_ilist_go(d->cfdata->gui.list);
|
||||
|
||||
e_widget_size_min_get(d->cfdata->gui.list, &mw, &mh);
|
||||
e_widget_size_min_set(d->cfdata->gui.list, mw, 100);
|
||||
|
||||
d->cfdata->fill_icon_themes_delayed = NULL;
|
||||
d->cfdata->populating = EINA_FALSE;
|
||||
_populate_preview(d->cfdata);
|
||||
free(d);
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
d->cfdata->fill_icon_themes_delayed = NULL;
|
||||
d->cfdata->populating = EINA_FALSE;
|
||||
_populate_preview(d->cfdata);
|
||||
free(d);
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
theme = d->l->data;
|
||||
if (theme->example_icon)
|
||||
{
|
||||
example_icons[0] = theme->example_icon;
|
||||
example_icon = example_icons;
|
||||
example_icons[0] = theme->example_icon;
|
||||
example_icon = example_icons;
|
||||
}
|
||||
else
|
||||
example_icon = example_icons + 1;
|
||||
|
@ -222,11 +222,11 @@ _fill_icon_themes(void *data)
|
|||
|
||||
if (oc)
|
||||
{
|
||||
e_widget_ilist_append(d->cfdata->gui.list, oc, theme->name.name,
|
||||
NULL, NULL, theme->name.internal);
|
||||
if ((d->cfdata->themename) && (theme->name.internal) &&
|
||||
(strcmp(d->cfdata->themename, theme->name.internal) == 0))
|
||||
e_widget_ilist_selected_set(d->cfdata->gui.list, d->i);
|
||||
e_widget_ilist_append(d->cfdata->gui.list, oc, theme->name.name,
|
||||
NULL, NULL, theme->name.internal);
|
||||
if ((d->cfdata->themename) && (theme->name.internal) &&
|
||||
(strcmp(d->cfdata->themename, theme->name.internal) == 0))
|
||||
e_widget_ilist_selected_set(d->cfdata->gui.list, d->i);
|
||||
}
|
||||
|
||||
d->i++;
|
||||
|
@ -261,12 +261,12 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
e_widget_list_object_append(o, ilist, 1, 1, 0.5);
|
||||
|
||||
ol = e_widget_framelist_add(evas, _("Preview"), 1);
|
||||
for (i = 0; i < sizeof(_icon_previews)/sizeof(_icon_previews[0]); i++)
|
||||
for (i = 0; i < sizeof(_icon_previews) / sizeof(_icon_previews[0]); i++)
|
||||
{
|
||||
cfdata->gui.preview[i] = e_icon_add(evas);
|
||||
e_icon_preload_set(cfdata->gui.preview[i], EINA_TRUE);
|
||||
e_icon_scale_size_set(cfdata->gui.preview[i], PREVIEW_SIZE);
|
||||
e_widget_framelist_object_append_full(ol, cfdata->gui.preview[i],
|
||||
cfdata->gui.preview[i] = e_icon_add(evas);
|
||||
e_icon_preload_set(cfdata->gui.preview[i], EINA_TRUE);
|
||||
e_icon_scale_size_set(cfdata->gui.preview[i], PREVIEW_SIZE);
|
||||
e_widget_framelist_object_append_full(ol, cfdata->gui.preview[i],
|
||||
0, 0, 0, 0, 0.5, 0.5,
|
||||
PREVIEW_SIZE, PREVIEW_SIZE,
|
||||
PREVIEW_SIZE, PREVIEW_SIZE);
|
||||
|
@ -314,7 +314,7 @@ _sort_icon_themes(const void *data1, const void *data2)
|
|||
if (!m1->name.name) return 1;
|
||||
if (!m2->name.name) return -1;
|
||||
|
||||
return (strcmp(m1->name.name, m2->name.name));
|
||||
return strcmp(m1->name.name, m2->name.name);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -329,9 +329,10 @@ _icon_new(Evas *evas, const char *theme, const char *icon, unsigned int size)
|
|||
e_icon_fill_inside_set(o, 1);
|
||||
else
|
||||
{
|
||||
evas_object_del(o);
|
||||
o = NULL;
|
||||
evas_object_del(o);
|
||||
o = NULL;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
#include "e.h"
|
||||
|
||||
/* local function prototypes */
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static void _basic_use_dpi_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||
static int _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static void _basic_use_dpi_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||
static Evas_Object *_adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static int _adv_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static void _adv_policy_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||
static int _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static int _adv_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
||||
static void _adv_policy_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int use_dpi;
|
||||
int use_dpi;
|
||||
double min, max, factor;
|
||||
int use_mode, base_dpi, use_custom;
|
||||
int use_mode, base_dpi, use_custom;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
Evas_Object *o_lbl, *o_slider;
|
||||
} basic;
|
||||
struct
|
||||
{
|
||||
Evas_Object *dpi_lbl, *dpi_slider;
|
||||
Evas_Object *custom_slider;
|
||||
Evas_Object *min_lbl, *min_slider;
|
||||
Evas_Object *max_lbl, *max_slider;
|
||||
} adv;
|
||||
} gui;
|
||||
{
|
||||
struct
|
||||
{
|
||||
Evas_Object *o_lbl, *o_slider;
|
||||
} basic;
|
||||
struct
|
||||
{
|
||||
Evas_Object *dpi_lbl, *dpi_slider;
|
||||
Evas_Object *custom_slider;
|
||||
Evas_Object *min_lbl, *min_slider;
|
||||
Evas_Object *max_lbl, *max_slider;
|
||||
} adv;
|
||||
} gui;
|
||||
};
|
||||
|
||||
E_Config_Dialog *
|
||||
|
@ -75,7 +75,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
cfdata->use_custom = e_config->scale.use_custom;
|
||||
cfdata->use_mode = 0;
|
||||
if (cfdata->use_dpi) cfdata->use_mode = 1;
|
||||
else if (cfdata->use_custom) cfdata->use_mode = 2;
|
||||
else if (cfdata->use_custom)
|
||||
cfdata->use_mode = 2;
|
||||
cfdata->min = e_config->scale.min;
|
||||
cfdata->max = e_config->scale.max;
|
||||
cfdata->factor = e_config->scale.factor;
|
||||
|
@ -141,8 +142,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
static int
|
||||
_basic_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
return ((cfdata->use_dpi != e_config->scale.use_dpi) ||
|
||||
(cfdata->base_dpi != e_config->scale.base_dpi));
|
||||
return (cfdata->use_dpi != e_config->scale.use_dpi) ||
|
||||
(cfdata->base_dpi != e_config->scale.base_dpi);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -193,7 +194,6 @@ _adv_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *c
|
|||
e_widget_toolbook_page_append(otb, NULL, _("Policy"), o,
|
||||
1, 0, 1, 0, 0.5, 0.0);
|
||||
|
||||
|
||||
/* Constraints */
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
ow = e_widget_label_add(evas, _("Minimum"));
|
||||
|
@ -252,12 +252,12 @@ _adv_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
else if (cfdata->use_mode == 2)
|
||||
use_custom = 1;
|
||||
|
||||
return ((use_dpi != e_config->scale.use_dpi) ||
|
||||
(use_custom != e_config->scale.use_custom) ||
|
||||
(cfdata->min != e_config->scale.min) ||
|
||||
(cfdata->max != e_config->scale.max) ||
|
||||
(cfdata->factor != e_config->scale.factor) ||
|
||||
(cfdata->base_dpi != e_config->scale.base_dpi));
|
||||
return (use_dpi != e_config->scale.use_dpi) ||
|
||||
(use_custom != e_config->scale.use_custom) ||
|
||||
(cfdata->min != e_config->scale.min) ||
|
||||
(cfdata->max != e_config->scale.max) ||
|
||||
(cfdata->factor != e_config->scale.factor) ||
|
||||
(cfdata->base_dpi != e_config->scale.base_dpi);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -271,3 +271,4 @@ _adv_policy_changed(void *data, Evas_Object *obj __UNUSED__)
|
|||
e_widget_disabled_set(cfdata->gui.adv.dpi_slider, (cfdata->use_mode != 1));
|
||||
e_widget_disabled_set(cfdata->gui.adv.custom_slider, (cfdata->use_mode != 2));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#include "e.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
Evas_Object *o_frame;
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir;
|
||||
Evas_Object *o_frame;
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir;
|
||||
|
||||
int show_splash;
|
||||
char *splash;
|
||||
int show_splash;
|
||||
char *splash;
|
||||
};
|
||||
|
||||
E_Config_Dialog *
|
||||
|
@ -35,9 +35,9 @@ e_int_config_startup(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.create_widgets = _basic_create_widgets;
|
||||
|
||||
cfd = e_config_dialog_new(con,
|
||||
_("Startup Settings"),
|
||||
"E", "appearance/startup",
|
||||
"preferences-startup", 0, v, NULL);
|
||||
_("Startup Settings"),
|
||||
"E", "appearance/startup",
|
||||
"preferences-startup", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,13 @@ _cb_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
|
|||
if (!cfdata->o_fm) return;
|
||||
if (!e_fm2_has_parent_get(cfdata->o_fm))
|
||||
{
|
||||
if (cfdata->o_up_button)
|
||||
e_widget_disabled_set(cfdata->o_up_button, 1);
|
||||
if (cfdata->o_up_button)
|
||||
e_widget_disabled_set(cfdata->o_up_button, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cfdata->o_up_button)
|
||||
e_widget_disabled_set(cfdata->o_up_button, 0);
|
||||
if (cfdata->o_up_button)
|
||||
e_widget_disabled_set(cfdata->o_up_button, 0);
|
||||
}
|
||||
if (cfdata->o_frame)
|
||||
e_widget_scrollframe_child_pos_set(cfdata->o_frame, 0, 0);
|
||||
|
@ -117,7 +117,7 @@ _cb_files_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
p = e_fm2_real_path_get(cfdata->o_fm);
|
||||
if (p)
|
||||
{
|
||||
if (strncmp(p, cfdata->splash, strlen(p))) return;
|
||||
if (strncmp(p, cfdata->splash, strlen(p))) return;
|
||||
}
|
||||
len = e_user_dir_concat_static(buf, "themes");
|
||||
if (!p) return;
|
||||
|
@ -125,11 +125,11 @@ _cb_files_files_changed(void *data, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
p = cfdata->splash + len + 1;
|
||||
else
|
||||
{
|
||||
len = e_prefix_data_concat_static(buf, "data/themes");
|
||||
if (!strncmp(cfdata->splash, buf, len))
|
||||
p = cfdata->splash + len + 1;
|
||||
else
|
||||
p = cfdata->splash;
|
||||
len = e_prefix_data_concat_static(buf, "data/themes");
|
||||
if (!strncmp(cfdata->splash, buf, len))
|
||||
p = cfdata->splash + len + 1;
|
||||
else
|
||||
p = cfdata->splash;
|
||||
}
|
||||
e_fm2_select_set(cfdata->o_fm, p, 1);
|
||||
e_fm2_file_show(cfdata->o_fm, p);
|
||||
|
@ -144,11 +144,11 @@ _cb_dir(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
|||
cfdata = data;
|
||||
if (cfdata->fmdir == 1)
|
||||
{
|
||||
e_prefix_data_concat_static(path, "data/themes");
|
||||
e_prefix_data_concat_static(path, "data/themes");
|
||||
}
|
||||
else
|
||||
{
|
||||
e_user_dir_concat_static(path, "themes");
|
||||
e_user_dir_concat_static(path, "themes");
|
||||
}
|
||||
e_fm2_path_set(cfdata->o_fm, path, "/");
|
||||
}
|
||||
|
@ -166,25 +166,25 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
else
|
||||
{
|
||||
e_prefix_data_concat_static(path, "data/themes/default.edj");
|
||||
cfdata->splash = strdup(path);
|
||||
cfdata->splash = strdup(path);
|
||||
}
|
||||
if (cfdata->splash[0] != '/')
|
||||
{
|
||||
e_user_dir_snprintf(path, sizeof(path), "themes/%s", cfdata->splash);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
E_FREE(cfdata->splash);
|
||||
cfdata->splash = strdup(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
e_prefix_data_snprintf(path, sizeof(path), "data/themes/%s", cfdata->splash);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
E_FREE(cfdata->splash);
|
||||
cfdata->splash = strdup(path);
|
||||
}
|
||||
}
|
||||
e_user_dir_snprintf(path, sizeof(path), "themes/%s", cfdata->splash);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
E_FREE(cfdata->splash);
|
||||
cfdata->splash = strdup(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
e_prefix_data_snprintf(path, sizeof(path), "data/themes/%s", cfdata->splash);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
E_FREE(cfdata->splash);
|
||||
cfdata->splash = strdup(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
len = e_prefix_data_concat_static(path, "data/themes");
|
||||
|
@ -221,13 +221,13 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
|
||||
if (cfdata->splash)
|
||||
{
|
||||
if (cfdata->splash[0])
|
||||
{
|
||||
const char *f;
|
||||
if (cfdata->splash[0])
|
||||
{
|
||||
const char *f;
|
||||
|
||||
f = ecore_file_file_get(cfdata->splash);
|
||||
e_config->init_default_theme = eina_stringshare_add(f);
|
||||
}
|
||||
f = ecore_file_file_get(cfdata->splash);
|
||||
e_config->init_default_theme = eina_stringshare_add(f);
|
||||
}
|
||||
}
|
||||
|
||||
e_config_save_queue();
|
||||
|
@ -253,18 +253,18 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
o = e_widget_radio_add(evas, _("Personal"), 0, rg);
|
||||
cfdata->o_personal = o;
|
||||
evas_object_smart_callback_add(o, "changed",
|
||||
_cb_dir, cfdata);
|
||||
_cb_dir, cfdata);
|
||||
e_widget_table_object_append(il, o, 0, 0, 1, 1, 1, 1, 0, 0);
|
||||
o = e_widget_radio_add(evas, _("System"), 1, rg);
|
||||
cfdata->o_system = o;
|
||||
evas_object_smart_callback_add(o, "changed",
|
||||
_cb_dir, cfdata);
|
||||
_cb_dir, cfdata);
|
||||
e_widget_table_object_append(il, o, 1, 0, 1, 1, 1, 1, 0, 0);
|
||||
|
||||
e_widget_table_object_append(ol, il, 0, 0, 1, 1, 0, 0, 0, 0);
|
||||
|
||||
o = e_widget_button_add(evas, _("Go up a Directory"), "go-up",
|
||||
_cb_button_up, cfdata, NULL);
|
||||
_cb_button_up, cfdata, NULL);
|
||||
cfdata->o_up_button = o;
|
||||
e_widget_table_object_append(ol, o, 0, 1, 1, 1, 0, 0, 0, 0);
|
||||
|
||||
|
@ -295,18 +295,18 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_fm2_config_set(o, &fmc);
|
||||
e_fm2_icon_menu_flags_set(o, E_FM2_MENU_NO_SHOW_HIDDEN);
|
||||
evas_object_smart_callback_add(o, "dir_changed",
|
||||
_cb_files_changed, cfdata);
|
||||
_cb_files_changed, cfdata);
|
||||
evas_object_smart_callback_add(o, "selection_change",
|
||||
_cb_files_selection_change, cfdata);
|
||||
_cb_files_selection_change, cfdata);
|
||||
evas_object_smart_callback_add(o, "changed",
|
||||
_cb_files_files_changed, cfdata);
|
||||
_cb_files_files_changed, cfdata);
|
||||
e_fm2_path_set(o, path, "/");
|
||||
|
||||
of = e_widget_scrollframe_pan_add(evas, o,
|
||||
e_fm2_pan_set,
|
||||
e_fm2_pan_get,
|
||||
e_fm2_pan_max_get,
|
||||
e_fm2_pan_child_size_get);
|
||||
e_fm2_pan_set,
|
||||
e_fm2_pan_get,
|
||||
e_fm2_pan_max_get,
|
||||
e_fm2_pan_child_size_get);
|
||||
cfdata->o_frame = of;
|
||||
e_widget_size_min_set(of, 160, 160);
|
||||
e_widget_table_object_append(ol, of, 0, 2, 1, 1, 1, 1, 1, 1);
|
||||
|
@ -315,7 +315,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
of = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
o = e_widget_check_add(evas, _("Show Splash Screen on Login"),
|
||||
&(cfdata->show_splash));
|
||||
&(cfdata->show_splash));
|
||||
e_widget_list_object_append(of, o, 1, 0, 0.0);
|
||||
|
||||
o = e_widget_preview_add(evas, 320, (320 * z->h) / z->w);
|
||||
|
@ -328,3 +328,4 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
return ot;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,69 +2,69 @@
|
|||
#include "e_int_config_theme_import.h"
|
||||
#include "e_int_config_theme_web.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static Eina_List *_get_theme_categories_list(void);
|
||||
static Eina_List *_get_theme_categories_list(void);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
|
||||
/* Basic */
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir;
|
||||
const char *theme;
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir;
|
||||
const char *theme;
|
||||
|
||||
/* Advanced */
|
||||
Evas_Object *o_categories_ilist;
|
||||
Evas_Object *o_files_ilist;
|
||||
int personal_file_count;
|
||||
Eina_List *theme_list;
|
||||
Eina_List *parts_list;
|
||||
Evas_Object *o_categories_ilist;
|
||||
Evas_Object *o_files_ilist;
|
||||
int personal_file_count;
|
||||
Eina_List *theme_list;
|
||||
Eina_List *parts_list;
|
||||
|
||||
/* Dialog */
|
||||
E_Win *win_import;
|
||||
E_Dialog *dia_web;
|
||||
E_Win *win_import;
|
||||
E_Dialog *dia_web;
|
||||
};
|
||||
|
||||
static const char *parts_list[] =
|
||||
{
|
||||
"about:e/widgets/about/main",
|
||||
"borders:e/widgets/border/default/border",
|
||||
"background:e/desktop/background",
|
||||
"configure:e/widgets/configure/main",
|
||||
"dialog:e/widgets/dialog/main",
|
||||
"dnd:ZZZ",
|
||||
"error:e/error/main",
|
||||
"exebuf:e/widgets/exebuf/main",
|
||||
"fileman:ZZZ",
|
||||
"gadman:e/gadman/control",
|
||||
"icons:ZZZ",
|
||||
"menus:ZZZ",
|
||||
"modules:ZZZ",
|
||||
"modules/pager:e/widgets/pager/popup",
|
||||
"modules/ibar:ZZZ",
|
||||
"modules/ibox:ZZZ",
|
||||
"modules/clock:e/modules/clock/main",
|
||||
"modules/battery:e/modules/battery/main",
|
||||
"modules/cpufreq:e/modules/cpufreq/main",
|
||||
"modules/start:e/modules/start/main",
|
||||
"modules/temperature:e/modules/temperature/main",
|
||||
"pointer:e/pointer",
|
||||
"shelf:e/shelf/default/base",
|
||||
"transitions:ZZZ",
|
||||
"widgets:ZZZ",
|
||||
"winlist:e/widgets/winlist/main",
|
||||
NULL
|
||||
"borders:e/widgets/border/default/border",
|
||||
"background:e/desktop/background",
|
||||
"configure:e/widgets/configure/main",
|
||||
"dialog:e/widgets/dialog/main",
|
||||
"dnd:ZZZ",
|
||||
"error:e/error/main",
|
||||
"exebuf:e/widgets/exebuf/main",
|
||||
"fileman:ZZZ",
|
||||
"gadman:e/gadman/control",
|
||||
"icons:ZZZ",
|
||||
"menus:ZZZ",
|
||||
"modules:ZZZ",
|
||||
"modules/pager:e/widgets/pager/popup",
|
||||
"modules/ibar:ZZZ",
|
||||
"modules/ibox:ZZZ",
|
||||
"modules/clock:e/modules/clock/main",
|
||||
"modules/battery:e/modules/battery/main",
|
||||
"modules/cpufreq:e/modules/cpufreq/main",
|
||||
"modules/start:e/modules/start/main",
|
||||
"modules/temperature:e/modules/temperature/main",
|
||||
"pointer:e/pointer",
|
||||
"shelf:e/shelf/default/base",
|
||||
"transitions:ZZZ",
|
||||
"widgets:ZZZ",
|
||||
"winlist:e/widgets/winlist/main",
|
||||
NULL
|
||||
};
|
||||
|
||||
E_Config_Dialog *
|
||||
|
@ -194,6 +194,7 @@ _cb_files_selected(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
cfdata = data;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -300,12 +301,13 @@ _cb_web(void *data1, void *data2 __UNUSED__)
|
|||
else
|
||||
cfdata->dia_web = e_int_config_theme_web(cfdata->cfd);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
E_Config_Theme * c;
|
||||
E_Config_Theme *c;
|
||||
char path[4096];
|
||||
size_t len;
|
||||
|
||||
|
@ -596,10 +598,10 @@ _files_ilist_nth_label_to_file(void *data, int n)
|
|||
|
||||
if (n > cfdata->personal_file_count)
|
||||
e_prefix_data_snprintf(file, sizeof(file), "data/themes/%s.edj",
|
||||
e_widget_ilist_nth_label_get(cfdata->o_files_ilist, n));
|
||||
e_widget_ilist_nth_label_get(cfdata->o_files_ilist, n));
|
||||
else
|
||||
e_user_dir_snprintf(file, sizeof(file), "themes/%s.edj",
|
||||
e_widget_ilist_nth_label_get(cfdata->o_files_ilist, n));
|
||||
e_widget_ilist_nth_label_get(cfdata->o_files_ilist, n));
|
||||
|
||||
return eina_stringshare_add(file);
|
||||
}
|
||||
|
@ -1098,3 +1100,4 @@ _advanced_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,19 +6,19 @@ typedef struct _Import Import;
|
|||
|
||||
struct _Import
|
||||
{
|
||||
E_Config_Dialog *parent;
|
||||
E_Config_Dialog *parent;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
Evas_Object *bg_obj;
|
||||
Evas_Object *box_obj;
|
||||
Evas_Object *content_obj;
|
||||
Evas_Object *event_obj;
|
||||
Evas_Object *fsel_obj;
|
||||
Evas_Object *bg_obj;
|
||||
Evas_Object *box_obj;
|
||||
Evas_Object *content_obj;
|
||||
Evas_Object *event_obj;
|
||||
Evas_Object *fsel_obj;
|
||||
|
||||
Evas_Object *ok_obj;
|
||||
Evas_Object *cancel_obj;
|
||||
Evas_Object *ok_obj;
|
||||
Evas_Object *cancel_obj;
|
||||
|
||||
E_Win *win;
|
||||
E_Win *win;
|
||||
};
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
|
@ -53,8 +53,8 @@ e_int_config_theme_import(E_Config_Dialog *parent)
|
|||
win = e_win_new(parent->con);
|
||||
if (!win)
|
||||
{
|
||||
E_FREE(import);
|
||||
return NULL;
|
||||
E_FREE(import);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
evas = e_win_evas_get(win);
|
||||
|
@ -90,25 +90,25 @@ e_int_config_theme_import(E_Config_Dialog *parent)
|
|||
mask = evas_key_modifier_mask_get(evas, "Shift");
|
||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
|
||||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
|
||||
_theme_import_cb_key_down, import);
|
||||
_theme_import_cb_key_down, import);
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
import->content_obj = o;
|
||||
|
||||
ofm = e_widget_fsel_add(evas, e_user_homedir_get(), "/",
|
||||
NULL, NULL,
|
||||
_theme_import_cb_selected, import,
|
||||
_theme_import_cb_changed, import, 1);
|
||||
NULL, NULL,
|
||||
_theme_import_cb_selected, import,
|
||||
_theme_import_cb_changed, import, 1);
|
||||
import->fsel_obj = ofm;
|
||||
e_widget_list_object_append(o, ofm, 1, 1, 0.5);
|
||||
|
||||
|
@ -118,12 +118,12 @@ e_int_config_theme_import(E_Config_Dialog *parent)
|
|||
evas_object_show(o);
|
||||
|
||||
import->ok_obj = e_widget_button_add(evas, _("OK"), NULL,
|
||||
_theme_import_cb_ok, win, cfdata);
|
||||
_theme_import_cb_ok, win, cfdata);
|
||||
e_widget_list_object_append(import->box_obj, import->ok_obj, 1, 0, 0.5);
|
||||
|
||||
import->cancel_obj = e_widget_button_add(evas, _("Cancel"), NULL,
|
||||
_theme_import_cb_close,
|
||||
win, cfdata);
|
||||
_theme_import_cb_close,
|
||||
win, cfdata);
|
||||
e_widget_list_object_append(import->box_obj, import->cancel_obj, 1, 0, 0.5);
|
||||
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
|
@ -219,24 +219,24 @@ _theme_import_cb_changed(void *data, Evas_Object *obj __UNUSED__)
|
|||
|
||||
if (import->cfdata->file)
|
||||
{
|
||||
char *strip;
|
||||
char *strip;
|
||||
|
||||
file = ecore_file_file_get(import->cfdata->file);
|
||||
strip = ecore_file_strip_ext(file);
|
||||
if (!strip)
|
||||
{
|
||||
E_FREE(import->cfdata->file);
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
return;
|
||||
}
|
||||
free(strip);
|
||||
if (!e_util_glob_case_match(file, "*.edj"))
|
||||
{
|
||||
E_FREE(import->cfdata->file);
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
return;
|
||||
}
|
||||
e_widget_disabled_set(import->ok_obj, 0);
|
||||
file = ecore_file_file_get(import->cfdata->file);
|
||||
strip = ecore_file_strip_ext(file);
|
||||
if (!strip)
|
||||
{
|
||||
E_FREE(import->cfdata->file);
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
return;
|
||||
}
|
||||
free(strip);
|
||||
if (!e_util_glob_case_match(file, "*.edj"))
|
||||
{
|
||||
E_FREE(import->cfdata->file);
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
return;
|
||||
}
|
||||
e_widget_disabled_set(import->ok_obj, 0);
|
||||
}
|
||||
else
|
||||
e_widget_disabled_set(import->ok_obj, 1);
|
||||
|
@ -262,41 +262,41 @@ _theme_import_cb_ok(void *data, void *data2 __UNUSED__)
|
|||
|
||||
if (import->cfdata->file)
|
||||
{
|
||||
char *strip;
|
||||
char *strip;
|
||||
|
||||
file = ecore_file_file_get(import->cfdata->file);
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "themes/%s", file);
|
||||
file = ecore_file_file_get(import->cfdata->file);
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "themes/%s", file);
|
||||
|
||||
if (ecore_file_exists(buf))
|
||||
ecore_file_unlink(buf);
|
||||
if (ecore_file_exists(buf))
|
||||
ecore_file_unlink(buf);
|
||||
|
||||
strip = ecore_file_strip_ext(file);
|
||||
if (!strip)
|
||||
return;
|
||||
free(strip);
|
||||
strip = ecore_file_strip_ext(file);
|
||||
if (!strip)
|
||||
return;
|
||||
free(strip);
|
||||
|
||||
if (!e_util_glob_case_match(file, "*.edj"))
|
||||
return;
|
||||
if (!e_util_glob_case_match(file, "*.edj"))
|
||||
return;
|
||||
|
||||
if (!edje_file_group_exists(import->cfdata->file,
|
||||
"e/widgets/border/default/border"))
|
||||
{
|
||||
e_util_dialog_show(_("Theme Import Error"),
|
||||
_("Enlightenment was unable to import "
|
||||
"the theme.<br><br>Are you sure this "
|
||||
"is really a valid theme?"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ecore_file_cp(import->cfdata->file, buf))
|
||||
{
|
||||
e_util_dialog_show(_("Theme Import Error"),
|
||||
_("Enlightenment was unable to import "
|
||||
"the theme<br>due to a copy error."));
|
||||
}
|
||||
else
|
||||
e_int_config_theme_update(import->parent, buf);
|
||||
}
|
||||
if (!edje_file_group_exists(import->cfdata->file,
|
||||
"e/widgets/border/default/border"))
|
||||
{
|
||||
e_util_dialog_show(_("Theme Import Error"),
|
||||
_("Enlightenment was unable to import "
|
||||
"the theme.<br><br>Are you sure this "
|
||||
"is really a valid theme?"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ecore_file_cp(import->cfdata->file, buf))
|
||||
{
|
||||
e_util_dialog_show(_("Theme Import Error"),
|
||||
_("Enlightenment was unable to import "
|
||||
"the theme<br>due to a copy error."));
|
||||
}
|
||||
else
|
||||
e_int_config_theme_update(import->parent, buf);
|
||||
}
|
||||
}
|
||||
|
||||
e_int_config_theme_del(import->win);
|
||||
|
@ -321,51 +321,52 @@ _theme_import_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
|
|||
import = data;
|
||||
if (!strcmp(ev->keyname, "Tab"))
|
||||
{
|
||||
if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(import->win)), "Shift"))
|
||||
{
|
||||
if (e_widget_focus_get(import->box_obj))
|
||||
{
|
||||
if (!e_widget_focus_jump(import->box_obj, 0))
|
||||
{
|
||||
e_widget_focus_set(import->content_obj, 0);
|
||||
if (!e_widget_focus_get(import->content_obj))
|
||||
e_widget_focus_set(import->box_obj, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e_widget_focus_jump(import->content_obj, 0))
|
||||
e_widget_focus_set(import->box_obj, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e_widget_focus_get(import->box_obj))
|
||||
{
|
||||
if (!e_widget_focus_jump(import->box_obj, 1))
|
||||
{
|
||||
e_widget_focus_set(import->content_obj, 1);
|
||||
if (!e_widget_focus_get(import->content_obj))
|
||||
e_widget_focus_set(import->box_obj, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e_widget_focus_jump(import->content_obj, 1))
|
||||
e_widget_focus_set(import->box_obj, 1);
|
||||
}
|
||||
}
|
||||
if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(import->win)), "Shift"))
|
||||
{
|
||||
if (e_widget_focus_get(import->box_obj))
|
||||
{
|
||||
if (!e_widget_focus_jump(import->box_obj, 0))
|
||||
{
|
||||
e_widget_focus_set(import->content_obj, 0);
|
||||
if (!e_widget_focus_get(import->content_obj))
|
||||
e_widget_focus_set(import->box_obj, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e_widget_focus_jump(import->content_obj, 0))
|
||||
e_widget_focus_set(import->box_obj, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e_widget_focus_get(import->box_obj))
|
||||
{
|
||||
if (!e_widget_focus_jump(import->box_obj, 1))
|
||||
{
|
||||
e_widget_focus_set(import->content_obj, 1);
|
||||
if (!e_widget_focus_get(import->content_obj))
|
||||
e_widget_focus_set(import->box_obj, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!e_widget_focus_jump(import->content_obj, 1))
|
||||
e_widget_focus_set(import->box_obj, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (((!strcmp(ev->keyname, "Return")) ||
|
||||
(!strcmp(ev->keyname, "KP_Enter")) ||
|
||||
(!strcmp(ev->keyname, "space"))))
|
||||
(!strcmp(ev->keyname, "KP_Enter")) ||
|
||||
(!strcmp(ev->keyname, "space"))))
|
||||
{
|
||||
Evas_Object *o = NULL;
|
||||
Evas_Object *o = NULL;
|
||||
|
||||
if ((import->content_obj) && (e_widget_focus_get(import->content_obj)))
|
||||
o = e_widget_focused_object_get(import->content_obj);
|
||||
else
|
||||
o = e_widget_focused_object_get(import->box_obj);
|
||||
if (o) e_widget_activate(o);
|
||||
if ((import->content_obj) && (e_widget_focus_get(import->content_obj)))
|
||||
o = e_widget_focused_object_get(import->content_obj);
|
||||
else
|
||||
o = e_widget_focused_object_get(import->box_obj);
|
||||
if (o) e_widget_activate(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ typedef struct _Web Web;
|
|||
struct _Web
|
||||
{
|
||||
E_Config_Dialog *parent;
|
||||
E_Dialog *dia;
|
||||
E_Dialog *dia;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
@ -100,6 +100,7 @@ _web_apply(const char *path, void *data)
|
|||
a = e_action_find("restart");
|
||||
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
E_Dialog *
|
||||
|
@ -113,7 +114,6 @@ e_int_config_theme_web(E_Config_Dialog *parent)
|
|||
E_Fm2_Config fmc;
|
||||
char usr_dir[PATH_MAX];
|
||||
|
||||
|
||||
dia = e_dialog_new(parent->con, "E", "_theme_web_dialog");
|
||||
if (!dia) return NULL;
|
||||
|
||||
|
@ -132,7 +132,6 @@ e_int_config_theme_web(E_Config_Dialog *parent)
|
|||
e_object_del_attach_func_set(E_OBJECT(dia), _web_del_cb);
|
||||
e_win_centered_set(dia->win, 1);
|
||||
|
||||
|
||||
ol = e_widget_list_add(e_win_evas_get(dia->win), 0, 1);
|
||||
|
||||
// The Exchange Smart Object
|
||||
|
@ -147,7 +146,7 @@ e_int_config_theme_web(E_Config_Dialog *parent)
|
|||
e_scrollframe_extern_pan_set(sf, exsm, _web_pan_set, _web_pan_get,
|
||||
_web_pan_max_get, _web_pan_child_size_get);
|
||||
e_scrollframe_policy_set(sf, E_SCROLLFRAME_POLICY_OFF,
|
||||
E_SCROLLFRAME_POLICY_ON);
|
||||
E_SCROLLFRAME_POLICY_ON);
|
||||
e_scrollframe_thumbscroll_force(sf, 1);
|
||||
|
||||
e_widget_list_object_append(ol, sf, 1, 1, 0.5);
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#include "e.h"
|
||||
|
||||
static Evas_Object *_trans_preview_add(E_Config_Dialog_Data *cfdata, Evas *evas, int minw, int minh);
|
||||
static void _e_wid_done(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||
static void _trans_preview_trans_set(E_Config_Dialog_Data *cfdata, const char *trans);
|
||||
static void _e_wid_done(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||
static void _trans_preview_trans_set(E_Config_Dialog_Data *cfdata, const char *trans);
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static void _event_cb_changed(void *data);
|
||||
static void _trans_cb_changed(void *data);
|
||||
static void _event_cb_changed(void *data);
|
||||
static void _trans_cb_changed(void *data);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
char *transition_start;
|
||||
char *transition_desk;
|
||||
char *transition_change;
|
||||
char *transition_start;
|
||||
char *transition_desk;
|
||||
char *transition_change;
|
||||
|
||||
Evas_Object *event_list;
|
||||
Evas_Object *trans_list;
|
||||
|
@ -44,8 +44,8 @@ e_int_config_transitions(E_Container *con, const char *params __UNUSED__)
|
|||
v->basic.check_changed = _basic_check_changed;
|
||||
|
||||
cfd = e_config_dialog_new(con, _("Transition Settings"),
|
||||
"E", "appearance/transitions",
|
||||
"preferences-transitions", 0, v, NULL);
|
||||
"E", "appearance/transitions",
|
||||
"preferences-transitions", 0, v, NULL);
|
||||
return cfd;
|
||||
}
|
||||
|
||||
|
@ -82,18 +82,18 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
static int
|
||||
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
return ((!cfdata->transition_start && e_config->transition_start) ||
|
||||
(cfdata->transition_start && !e_config->transition_start) ||
|
||||
(!cfdata->transition_desk && e_config->transition_desk) ||
|
||||
(cfdata->transition_desk && !e_config->transition_desk) ||
|
||||
(!cfdata->transition_change && e_config->transition_change) ||
|
||||
(cfdata->transition_change && !e_config->transition_change) ||
|
||||
(cfdata->transition_start && e_config->transition_start &&
|
||||
strcmp(cfdata->transition_start, e_config->transition_start)) ||
|
||||
(cfdata->transition_desk && e_config->transition_desk &&
|
||||
strcmp(cfdata->transition_desk, e_config->transition_desk)) ||
|
||||
(cfdata->transition_change && e_config->transition_change &&
|
||||
strcmp(cfdata->transition_change, e_config->transition_change)));
|
||||
return (!cfdata->transition_start && e_config->transition_start) ||
|
||||
(cfdata->transition_start && !e_config->transition_start) ||
|
||||
(!cfdata->transition_desk && e_config->transition_desk) ||
|
||||
(cfdata->transition_desk && !e_config->transition_desk) ||
|
||||
(!cfdata->transition_change && e_config->transition_change) ||
|
||||
(cfdata->transition_change && !e_config->transition_change) ||
|
||||
(cfdata->transition_start && e_config->transition_start &&
|
||||
strcmp(cfdata->transition_start, e_config->transition_start)) ||
|
||||
(cfdata->transition_desk && e_config->transition_desk &&
|
||||
strcmp(cfdata->transition_desk, e_config->transition_desk)) ||
|
||||
(cfdata->transition_change && e_config->transition_change &&
|
||||
strcmp(cfdata->transition_change, e_config->transition_change));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -115,8 +115,8 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config->transition_start =
|
||||
eina_stringshare_add(cfdata->transition_start);
|
||||
}
|
||||
/* if (e_theme_transition_find(cfdata->transition_start)) */
|
||||
/* e_config->transition_start = */
|
||||
/* if (e_theme_transition_find(cfdata->transition_start)) */
|
||||
/* e_config->transition_start = */
|
||||
/* eina_stringshare_add(cfdata->transition_start); */
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,8 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config->transition_desk =
|
||||
eina_stringshare_add(cfdata->transition_desk);
|
||||
}
|
||||
/* if (e_theme_transition_find(cfdata->transition_desk)) */
|
||||
/* e_config->transition_desk = eina_stringshare_add(cfdata->transition_desk); */
|
||||
/* if (e_theme_transition_find(cfdata->transition_desk)) */
|
||||
/* e_config->transition_desk = eina_stringshare_add(cfdata->transition_desk); */
|
||||
}
|
||||
|
||||
if (e_config->transition_change)
|
||||
|
@ -146,8 +146,8 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config->transition_change =
|
||||
eina_stringshare_add(cfdata->transition_change);
|
||||
}
|
||||
/* if (e_theme_transition_find(cfdata->transition_change)) */
|
||||
/* e_config->transition_change = eina_stringshare_add(cfdata->transition_change); */
|
||||
/* if (e_theme_transition_find(cfdata->transition_change)) */
|
||||
/* e_config->transition_change = eina_stringshare_add(cfdata->transition_change); */
|
||||
}
|
||||
|
||||
e_config_save_queue();
|
||||
|
@ -200,9 +200,9 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
for (l = e_theme_transition_list(); l; l = l->next)
|
||||
{
|
||||
t = l->data;
|
||||
if (!t) continue;
|
||||
e_widget_ilist_append(il, NULL, t, _trans_cb_changed, cfdata, NULL);
|
||||
t = l->data;
|
||||
if (!t) continue;
|
||||
e_widget_ilist_append(il, NULL, t, _trans_cb_changed, cfdata, NULL);
|
||||
}
|
||||
|
||||
EINA_LIST_FREE(l, t)
|
||||
|
@ -237,36 +237,38 @@ _event_cb_changed(void *data)
|
|||
switch (sel)
|
||||
{
|
||||
case 0:
|
||||
trans = e_config->transition_start;
|
||||
break;
|
||||
trans = e_config->transition_start;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
trans = e_config->transition_desk;
|
||||
break;
|
||||
trans = e_config->transition_desk;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
trans = e_config->transition_change;
|
||||
break;
|
||||
trans = e_config->transition_change;
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < e_widget_ilist_count(cfdata->trans_list); i++)
|
||||
{
|
||||
list = e_widget_ilist_nth_label_get(cfdata->trans_list, i);
|
||||
if (!list) continue;
|
||||
if (!trans)
|
||||
{
|
||||
if (!strcmp(_("None"), list))
|
||||
{
|
||||
e_widget_ilist_selected_set(cfdata->trans_list, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!strcmp(trans, list))
|
||||
{
|
||||
e_widget_ilist_selected_set(cfdata->trans_list, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
list = e_widget_ilist_nth_label_get(cfdata->trans_list, i);
|
||||
if (!list) continue;
|
||||
if (!trans)
|
||||
{
|
||||
if (!strcmp(_("None"), list))
|
||||
{
|
||||
e_widget_ilist_selected_set(cfdata->trans_list, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!strcmp(trans, list))
|
||||
{
|
||||
e_widget_ilist_selected_set(cfdata->trans_list, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
e_widget_ilist_unselect(cfdata->trans_list);
|
||||
|
@ -289,19 +291,22 @@ _trans_cb_changed(void *data)
|
|||
switch (sel)
|
||||
{
|
||||
case 0:
|
||||
E_FREE(cfdata->transition_start);
|
||||
if (t) cfdata->transition_start = strdup(t);
|
||||
break;
|
||||
E_FREE(cfdata->transition_start);
|
||||
if (t) cfdata->transition_start = strdup(t);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
E_FREE(cfdata->transition_desk);
|
||||
if (t) cfdata->transition_desk = strdup(t);
|
||||
break;
|
||||
E_FREE(cfdata->transition_desk);
|
||||
if (t) cfdata->transition_desk = strdup(t);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
E_FREE(cfdata->transition_change);
|
||||
if (t) cfdata->transition_change = strdup(t);
|
||||
break;
|
||||
E_FREE(cfdata->transition_change);
|
||||
if (t) cfdata->transition_change = strdup(t);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if (!t) return;
|
||||
_trans_preview_trans_set(cfdata, t);
|
||||
|
@ -393,3 +398,4 @@ _e_wid_done(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUS
|
|||
evas_object_show(o);
|
||||
e_widget_preview_extern_object_set(cfdata->tp, o);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _adv_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void _fill_data(E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static int _adv_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_adv_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static E_Config_Dialog *_e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int desk_x, int desk_y);
|
||||
|
||||
static void _cb_button_up(void *data1, void *data2);
|
||||
static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_selection_change(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_theme_wallpaper(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_dir(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_import(void *data1, void *data2);
|
||||
static void _cb_button_up(void *data1, void *data2);
|
||||
static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_selection_change(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_theme_wallpaper(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_dir(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_import(void *data1, void *data2);
|
||||
|
||||
#define E_CONFIG_WALLPAPER_ALL 0
|
||||
#define E_CONFIG_WALLPAPER_DESK 1
|
||||
#define E_CONFIG_WALLPAPER_ALL 0
|
||||
#define E_CONFIG_WALLPAPER_DESK 1
|
||||
#define E_CONFIG_WALLPAPER_SCREEN 2
|
||||
|
||||
struct _E_Config_Wallpaper
|
||||
|
@ -34,22 +34,22 @@ struct _E_Config_Wallpaper
|
|||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_theme_bg;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir, use_theme_bg;
|
||||
char *bg;
|
||||
Evas_Object *o_fm;
|
||||
Evas_Object *o_up_button;
|
||||
Evas_Object *o_preview;
|
||||
Evas_Object *o_theme_bg;
|
||||
Evas_Object *o_personal;
|
||||
Evas_Object *o_system;
|
||||
int fmdir, use_theme_bg;
|
||||
char *bg;
|
||||
|
||||
/* advanced */
|
||||
int all_this_desk_screen;
|
||||
int all_this_desk_screen;
|
||||
|
||||
/* dialogs */
|
||||
E_Win *win_import;
|
||||
E_Win *win_import;
|
||||
#ifdef HAVE_EXCHANGE
|
||||
E_Dialog *dia_web;
|
||||
E_Dialog *dia_web;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -91,7 +91,7 @@ _e_int_config_wallpaper_desk(E_Container *con, int con_num, int zone_num, int de
|
|||
cw->specific_config = 1;
|
||||
else
|
||||
{
|
||||
v->advanced.apply_cfdata = _adv_apply;
|
||||
v->advanced.apply_cfdata = _adv_apply;
|
||||
v->advanced.create_widgets = _adv_create;
|
||||
}
|
||||
|
||||
|
@ -115,11 +115,11 @@ _bg_set(E_Config_Dialog_Data *cfdata)
|
|||
if (cfdata->bg)
|
||||
{
|
||||
if (eina_str_has_extension(cfdata->bg, ".edj"))
|
||||
e_widget_preview_edje_set(cfdata->o_preview, cfdata->bg,
|
||||
"e/desktop/background");
|
||||
e_widget_preview_edje_set(cfdata->o_preview, cfdata->bg,
|
||||
"e/desktop/background");
|
||||
else
|
||||
e_widget_preview_file_set(cfdata->o_preview, cfdata->bg,
|
||||
NULL);
|
||||
e_widget_preview_file_set(cfdata->o_preview, cfdata->bg,
|
||||
NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -170,6 +170,7 @@ e_int_config_wallpaper_web_done(E_Config_Dialog *dia)
|
|||
cfdata = dia->cfdata;
|
||||
cfdata->dia_web = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -346,10 +347,11 @@ _cb_web(void *data1, void *data2 __UNUSED__)
|
|||
|
||||
cfdata = data1;
|
||||
if (cfdata->dia_web)
|
||||
e_win_raise(cfdata->dia_web->win);
|
||||
e_win_raise(cfdata->dia_web->win);
|
||||
else
|
||||
cfdata->dia_web = e_int_config_wallpaper_web(cfdata->cfd);
|
||||
cfdata->dia_web = e_int_config_wallpaper_web(cfdata->cfd);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
|
@ -729,3 +731,4 @@ _adv_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
e_config_save_queue();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,12 +9,12 @@ typedef struct _Web Web;
|
|||
struct _Web
|
||||
{
|
||||
E_Config_Dialog *parent;
|
||||
E_Dialog *dia;
|
||||
Evas_Object *list;
|
||||
Evas_Object *textblock;
|
||||
Evas_Object *image;
|
||||
Eina_List *jobs;
|
||||
Eina_List *objs;
|
||||
E_Dialog *dia;
|
||||
Evas_Object *list;
|
||||
Evas_Object *textblock;
|
||||
Evas_Object *image;
|
||||
Eina_List *jobs;
|
||||
Eina_List *objs;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -35,10 +35,10 @@ e_int_config_wallpaper_web_del(E_Dialog *dia)
|
|||
e_int_config_wallpaper_web_done(web->parent);
|
||||
|
||||
EINA_LIST_FOREACH(web->jobs, l, job)
|
||||
ecore_file_download_abort(job);
|
||||
ecore_file_download_abort(job);
|
||||
|
||||
EINA_LIST_FREE(web->objs, wp)
|
||||
exchange_object_free(wp);
|
||||
exchange_object_free(wp);
|
||||
|
||||
evas_object_del(web->list);
|
||||
evas_object_del(web->textblock);
|
||||
|
@ -66,8 +66,8 @@ _web_download_complete_cb(Exchange_Object *obj __UNUSED__, const char *file __UN
|
|||
|
||||
if (wp == e_widget_ilist_selected_data_get(web->list))
|
||||
{
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ _web_apply_btn_cb(void *data, E_Dialog *dia __UNUSED__)
|
|||
if (!wp) return;
|
||||
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s",
|
||||
exchange_obj_file_name_get(wp));
|
||||
exchange_obj_file_name_get(wp));
|
||||
|
||||
if (!ecore_file_exists(buf)) return;
|
||||
|
||||
|
@ -119,7 +119,7 @@ _screenshot_get_cb(Exchange_Object *obj, const char *file, void *data)
|
|||
Web *web = data;
|
||||
|
||||
if (obj == e_widget_ilist_selected_data_get(web->list))
|
||||
e_widget_image_file_set(web->image, file);
|
||||
e_widget_image_file_set(web->image, file);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -137,34 +137,34 @@ _list_selection_changed(void *data, Evas_Object *obj)
|
|||
// enable download button ?
|
||||
e_user_dir_concat(buf, sizeof(buf), "backgrounds");
|
||||
if (exchange_obj_update_available(wp, buf))
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 0);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 0);
|
||||
else
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_DOWNLOAD, 1);
|
||||
|
||||
// enable apply button ?
|
||||
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s",
|
||||
exchange_obj_file_name_get(wp));
|
||||
if (ecore_file_exists(buf))
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 0);
|
||||
else
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 1);
|
||||
e_dialog_button_disable_num_set(web->dia, BTN_APPLY, 1);
|
||||
|
||||
// update textblock
|
||||
sbuf = eina_strbuf_new();
|
||||
e_widget_textblock_plain_set(web->textblock, "");
|
||||
|
||||
if (exchange_obj_name_get(wp))
|
||||
eina_strbuf_append_printf(sbuf,"<b>%s</b>", exchange_obj_name_get(wp));
|
||||
eina_strbuf_append_printf(sbuf, "<b>%s</b>", exchange_obj_name_get(wp));
|
||||
if (exchange_obj_version_get(wp))
|
||||
eina_strbuf_append_printf(sbuf, " v %s", exchange_obj_version_get(wp));
|
||||
eina_strbuf_append_printf(sbuf, " v %s", exchange_obj_version_get(wp));
|
||||
eina_strbuf_append(sbuf, "<br>");
|
||||
if (exchange_obj_author_get(wp))
|
||||
eina_strbuf_append_printf(sbuf, "%s %s<br>", _("By"),
|
||||
exchange_obj_author_get(wp));
|
||||
eina_strbuf_append_printf(sbuf, "%s %s<br>", _("By"),
|
||||
exchange_obj_author_get(wp));
|
||||
if (exchange_obj_description_get(wp))
|
||||
{
|
||||
printf("\n%s\n",exchange_obj_description_get(wp)); // TODO Fix '&' markup error
|
||||
eina_strbuf_append_printf(sbuf, "<br>%s<br>", exchange_obj_description_get(wp));
|
||||
printf("\n%s\n", exchange_obj_description_get(wp)); // TODO Fix '&' markup error
|
||||
eina_strbuf_append_printf(sbuf, "<br>%s<br>", exchange_obj_description_get(wp));
|
||||
}
|
||||
e_widget_textblock_markup_set(web->textblock, eina_strbuf_string_get(sbuf));
|
||||
eina_strbuf_free(sbuf);
|
||||
|
@ -195,14 +195,14 @@ _exchange_query_cb(Eina_List *results, void *data)
|
|||
e_widget_ilist_clear(web->list);
|
||||
if (!results)
|
||||
{
|
||||
e_widget_ilist_append(web->list, NULL, _("Error getting data !"),
|
||||
NULL, NULL, NULL);
|
||||
return;
|
||||
e_widget_ilist_append(web->list, NULL, _("Error getting data !"),
|
||||
NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
EINA_LIST_FOREACH(results, l, wp)
|
||||
{
|
||||
exchange_obj_thumbnail_get(wp, _thumbnail_download_cb, web);
|
||||
exchange_obj_data_set(wp, web);
|
||||
exchange_obj_thumbnail_get(wp, _thumbnail_download_cb, web);
|
||||
exchange_obj_data_set(wp, web);
|
||||
}
|
||||
|
||||
web->objs = results;
|
||||
|
@ -218,7 +218,7 @@ e_int_config_wallpaper_web(E_Config_Dialog *parent)
|
|||
Ecore_File_Download_Job *job;
|
||||
|
||||
if (!exchange_init())
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
// e_dialog
|
||||
dia = e_dialog_new(parent->con, "E", "_wallpaper_web_dialog");
|
||||
|
@ -252,7 +252,7 @@ e_int_config_wallpaper_web(E_Config_Dialog *parent)
|
|||
e_widget_ilist_multi_select_set(o, 0);
|
||||
e_widget_on_change_hook_set(o, _list_selection_changed, web);
|
||||
e_widget_ilist_append(o, NULL, _("Getting data, please wait..."),
|
||||
NULL, NULL, NULL);
|
||||
NULL, NULL, NULL);
|
||||
e_widget_table_object_append(ot, o, 0, 0, 1, 1, 0, 1, 0, 1);
|
||||
web->list = o;
|
||||
|
||||
|
@ -274,13 +274,13 @@ e_int_config_wallpaper_web(E_Config_Dialog *parent)
|
|||
|
||||
// request list from exchange
|
||||
job = exchange_query(NULL, "e/desktop/background", 0, 0, 0, NULL, 0, 0,
|
||||
_exchange_query_cb, web);
|
||||
_exchange_query_cb, web);
|
||||
if (!job)
|
||||
{
|
||||
e_widget_ilist_clear(web->list);
|
||||
e_widget_ilist_append(web->list, NULL, _("Error: can't start the request."),
|
||||
NULL, NULL, NULL);
|
||||
e_widget_textblock_plain_set(web->textblock, "");
|
||||
e_widget_ilist_clear(web->list);
|
||||
e_widget_ilist_append(web->list, NULL, _("Error: can't start the request."),
|
||||
NULL, NULL, NULL);
|
||||
e_widget_textblock_plain_set(web->textblock, "");
|
||||
}
|
||||
else web->jobs = eina_list_append(web->jobs, job);
|
||||
|
||||
|
@ -291,4 +291,5 @@ e_int_config_wallpaper_web(E_Config_Dialog *parent)
|
|||
|
||||
return dia;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
#include "e.h"
|
||||
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
//static int _sort_widget_themes(const void *data1, const void *data2);
|
||||
//static Evas_Object *_icon_new(Evas *evas, const char *theme, const char *icon, unsigned int size);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
Eina_List *widget_themes;
|
||||
const char *widget_theme;
|
||||
int enable_xsettings;
|
||||
int match_e17_theme;
|
||||
int match_e17_icon_theme;
|
||||
struct
|
||||
{
|
||||
Evas_Object *list;
|
||||
} gui;
|
||||
E_Config_Dialog *cfd;
|
||||
Eina_List *widget_themes;
|
||||
const char *widget_theme;
|
||||
int enable_xsettings;
|
||||
int match_e17_theme;
|
||||
int match_e17_icon_theme;
|
||||
struct
|
||||
{
|
||||
Evas_Object *list;
|
||||
} gui;
|
||||
};
|
||||
|
||||
E_Config_Dialog *
|
||||
|
@ -134,7 +134,6 @@ _ilist_files_add(E_Config_Dialog_Data *cfdata, const char *dir)
|
|||
{
|
||||
if (!eina_list_data_find(cfdata->widget_themes, file))
|
||||
{
|
||||
|
||||
cfdata->widget_themes = eina_list_append(cfdata->widget_themes, file);
|
||||
continue;
|
||||
}
|
||||
|
@ -227,7 +226,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
e_widget_list_object_append(o, ilist, 1, 1, 0.5);
|
||||
|
||||
ow = e_widget_check_add(evas, _("Use icon theme for applications"),
|
||||
&(cfdata->match_e17_icon_theme));
|
||||
&(cfdata->match_e17_icon_theme));
|
||||
e_widget_list_object_append(o, ow, 0, 0, 0.0);
|
||||
|
||||
ow = e_widget_check_add(evas, _("Match Enlightenment theme if possible"),
|
||||
|
@ -244,10 +243,10 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
/* e_widget_on_change_hook_set(ow, _settings_changed, cfdata); */
|
||||
e_widget_list_object_append(o, ow, 0, 0, 0.0);
|
||||
|
||||
|
||||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
|
||||
_fill_files_ilist(cfdata);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ static E_Int_Menu_Augmentation *maug[8] = {0};
|
|||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
E_MODULE_API_VERSION,
|
||||
"Settings - Theme"
|
||||
"Settings - Theme"
|
||||
};
|
||||
|
||||
EAPI void *
|
||||
|
@ -64,8 +64,8 @@ e_modapi_init(E_Module *m)
|
|||
e_int_config_startup);
|
||||
|
||||
maug[0] =
|
||||
e_int_menus_menu_augmentation_add_sorted("config/1", _("Wallpaper"),
|
||||
_e_mod_menu_wallpaper_add, NULL, NULL, NULL);
|
||||
e_int_menus_menu_augmentation_add_sorted("config/1", _("Wallpaper"),
|
||||
_e_mod_menu_wallpaper_add, NULL, NULL, NULL);
|
||||
maug[1] =
|
||||
e_int_menus_menu_augmentation_add_sorted("config/1", _("Theme"),
|
||||
_e_mod_menu_theme_add, NULL, NULL, NULL);
|
||||
|
@ -83,35 +83,35 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
/* remove module-supplied menu additions */
|
||||
if (maug[0])
|
||||
{
|
||||
e_int_menus_menu_augmentation_del("config/1", maug[0]);
|
||||
maug[0] = NULL;
|
||||
e_int_menus_menu_augmentation_del("config/1", maug[0]);
|
||||
maug[0] = NULL;
|
||||
}
|
||||
if (maug[1])
|
||||
{
|
||||
e_int_menus_menu_augmentation_del("config/1", maug[1]);
|
||||
maug[1] = NULL;
|
||||
e_int_menus_menu_augmentation_del("config/1", maug[1]);
|
||||
maug[1] = NULL;
|
||||
}
|
||||
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/startup")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/scale")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/transitions")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/mouse_cursor")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/icon_theme")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/borders")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/fonts")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/colors")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "apppearance/theme")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/wallpaper")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/xsettings")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
|
||||
|
@ -129,9 +129,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
|||
e_configure_registry_category_del("appearance");
|
||||
|
||||
while ((cfd = e_config_dialog_get("E", "internal/borders_border")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
while ((cfd = e_config_dialog_get("E", "appearance/wallpaper")))
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_object_del(E_OBJECT(cfd));
|
||||
e_configure_registry_item_del("appearance/borders");
|
||||
e_configure_registry_item_del("internal/wallpaper_desk");
|
||||
e_configure_registry_category_del("internal");
|
||||
|
@ -180,3 +180,4 @@ _e_mod_menu_theme_add(void *data __UNUSED__, E_Menu *m)
|
|||
e_util_menu_item_theme_icon_set(mi, "preferences-desktop-theme");
|
||||
e_menu_item_callback_set(mi, _e_mod_run_theme_cb, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue