forked from enlightenment/enlightenment
parent
466ff0bed4
commit
8de709d69b
|
@ -1,68 +1,68 @@
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
typedef struct _E_Configure E_Configure;
|
typedef struct _E_Configure E_Configure;
|
||||||
typedef struct _E_Configure_CB E_Configure_CB;
|
typedef struct _E_Configure_CB E_Configure_CB;
|
||||||
typedef struct _E_Configure_Category E_Configure_Category;
|
typedef struct _E_Configure_Category E_Configure_Category;
|
||||||
typedef struct _E_Configure_Item E_Configure_Item;
|
typedef struct _E_Configure_Item E_Configure_Item;
|
||||||
|
|
||||||
#define E_CONFIGURE_TYPE 0xE0b01014
|
#define E_CONFIGURE_TYPE 0xE0b01014
|
||||||
|
|
||||||
struct _E_Configure
|
struct _E_Configure
|
||||||
{
|
{
|
||||||
E_Object e_obj_inherit;
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
E_Container *con;
|
E_Container *con;
|
||||||
E_Win *win;
|
E_Win *win;
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
Evas_Object *edje;
|
Evas_Object *edje;
|
||||||
|
|
||||||
Evas_Object *o_list;
|
Evas_Object *o_list;
|
||||||
Evas_Object *cat_list;
|
Evas_Object *cat_list;
|
||||||
Evas_Object *item_list;
|
Evas_Object *item_list;
|
||||||
Evas_Object *close;
|
Evas_Object *close;
|
||||||
|
|
||||||
Eina_List *cats;
|
Eina_List *cats;
|
||||||
Ecore_Event_Handler *mod_hdl;
|
Ecore_Event_Handler *mod_hdl;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Configure_CB
|
struct _E_Configure_CB
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
const char *path;
|
const char *path;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Configure_Category
|
struct _E_Configure_Category
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
const char *label;
|
const char *label;
|
||||||
Eina_List *items;
|
Eina_List *items;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Configure_Item
|
struct _E_Configure_Item
|
||||||
{
|
{
|
||||||
E_Configure_CB *cb;
|
E_Configure_CB *cb;
|
||||||
const char *label;
|
const char *label;
|
||||||
const char *icon_file;
|
const char *icon_file;
|
||||||
const char *icon;
|
const char *icon;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void _e_configure_free(E_Configure *eco);
|
static void _e_configure_free(E_Configure *eco);
|
||||||
static void _e_configure_cb_del_req(E_Win *win);
|
static void _e_configure_cb_del_req(E_Win *win);
|
||||||
static void _e_configure_cb_resize(E_Win *win);
|
static void _e_configure_cb_resize(E_Win *win);
|
||||||
static void _e_configure_cb_close(void *data, void *data2);
|
static void _e_configure_cb_close(void *data, void *data2);
|
||||||
static E_Configure_Category *_e_configure_category_add(E_Configure *eco, const char *label, const char *icon_file, const char *icon);
|
static E_Configure_Category *_e_configure_category_add(E_Configure *eco, const char *label, const char *icon_file, const char *icon);
|
||||||
static void _e_configure_category_cb(void *data, void *data2);
|
static void _e_configure_category_cb(void *data, void *data2);
|
||||||
static void _e_configure_item_add(E_Configure_Category *cat, const char *label, const char *icon_file, const char *icon, const char *path);
|
static void _e_configure_item_add(E_Configure_Category *cat, const char *label, const char *icon_file, const char *icon, const char *path);
|
||||||
static void _e_configure_item_cb(void *data);
|
static void _e_configure_item_cb(void *data);
|
||||||
static void _e_configure_focus_cb(void *data, Evas_Object *obj);
|
static void _e_configure_focus_cb(void *data, Evas_Object *obj);
|
||||||
static void _e_configure_keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event);
|
static void _e_configure_keydown_cb(void *data, Evas *e, Evas_Object *obj, void *event);
|
||||||
static void _e_configure_fill_cat_list(void *data);
|
static void _e_configure_fill_cat_list(void *data);
|
||||||
static Eina_Bool _e_configure_module_update_cb(void *data, int type, void *event);
|
static Eina_Bool _e_configure_module_update_cb(void *data, int type, void *event);
|
||||||
|
|
||||||
static E_Configure *_e_configure = NULL;
|
static E_Configure *_e_configure = NULL;
|
||||||
|
|
||||||
void
|
void
|
||||||
e_configure_show(E_Container *con)
|
e_configure_show(E_Container *con)
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
E_Manager *man;
|
E_Manager *man;
|
||||||
|
@ -71,55 +71,55 @@ e_configure_show(E_Container *con)
|
||||||
Evas_Modifier_Mask mask;
|
Evas_Modifier_Mask mask;
|
||||||
Eina_Bool kg;
|
Eina_Bool kg;
|
||||||
|
|
||||||
if (_e_configure)
|
if (_e_configure)
|
||||||
{
|
{
|
||||||
E_Zone *z, *z2;
|
E_Zone *z, *z2;
|
||||||
|
|
||||||
eco = _e_configure;
|
eco = _e_configure;
|
||||||
z = e_util_zone_current_get(e_manager_current_get());
|
z = e_util_zone_current_get(e_manager_current_get());
|
||||||
z2 = eco->win->border->zone;
|
z2 = eco->win->border->zone;
|
||||||
e_win_show(eco->win);
|
e_win_show(eco->win);
|
||||||
e_win_raise(eco->win);
|
e_win_raise(eco->win);
|
||||||
if (z->container == z2->container)
|
if (z->container == z2->container)
|
||||||
e_border_desk_set(eco->win->border, e_desk_current_get(z));
|
e_border_desk_set(eco->win->border, e_desk_current_get(z));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!eco->win->border->sticky)
|
if (!eco->win->border->sticky)
|
||||||
e_desk_show(eco->win->border->desk);
|
e_desk_show(eco->win->border->desk);
|
||||||
ecore_x_pointer_warp(z2->container->win,
|
ecore_x_pointer_warp(z2->container->win,
|
||||||
z2->x + (z2->w / 2), z2->y + (z2->h / 2));
|
z2->x + (z2->w / 2), z2->y + (z2->h / 2));
|
||||||
}
|
}
|
||||||
e_border_unshade(eco->win->border, E_DIRECTION_DOWN);
|
e_border_unshade(eco->win->border, E_DIRECTION_DOWN);
|
||||||
if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
|
if ((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
|
||||||
(e_config->focus_setting == E_FOCUS_NEW_WINDOW))
|
(e_config->focus_setting == E_FOCUS_NEW_WINDOW))
|
||||||
e_border_focus_set(eco->win->border, 1, 1);
|
e_border_focus_set(eco->win->border, 1, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!con)
|
if (!con)
|
||||||
{
|
{
|
||||||
man = e_manager_current_get();
|
man = e_manager_current_get();
|
||||||
if (!man) return;
|
if (!man) return;
|
||||||
con = e_container_current_get(man);
|
con = e_container_current_get(man);
|
||||||
if (!con) con = e_container_number_get(man, 0);
|
if (!con) con = e_container_number_get(man, 0);
|
||||||
if (!con) return;
|
if (!con) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
eco = E_OBJECT_ALLOC(E_Configure, E_CONFIGURE_TYPE, _e_configure_free);
|
eco = E_OBJECT_ALLOC(E_Configure, E_CONFIGURE_TYPE, _e_configure_free);
|
||||||
if (!eco) return;
|
if (!eco) return;
|
||||||
eco->win = e_win_new(con);
|
eco->win = e_win_new(con);
|
||||||
if (!eco->win)
|
if (!eco->win)
|
||||||
{
|
{
|
||||||
free(eco);
|
free(eco);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
eco->win->data = eco;
|
eco->win->data = eco;
|
||||||
eco->con = con;
|
eco->con = con;
|
||||||
eco->evas = e_win_evas_get(eco->win);
|
eco->evas = e_win_evas_get(eco->win);
|
||||||
|
|
||||||
/* Event Handler for Module Updates */
|
/* Event Handler for Module Updates */
|
||||||
eco->mod_hdl = ecore_event_handler_add(E_EVENT_MODULE_UPDATE,
|
eco->mod_hdl = ecore_event_handler_add(E_EVENT_MODULE_UPDATE,
|
||||||
_e_configure_module_update_cb, eco);
|
_e_configure_module_update_cb, eco);
|
||||||
|
|
||||||
e_win_title_set(eco->win, _("Settings"));
|
e_win_title_set(eco->win, _("Settings"));
|
||||||
e_win_name_class_set(eco->win, "E", "_configure");
|
e_win_name_class_set(eco->win, "E", "_configure");
|
||||||
|
@ -129,8 +129,8 @@ e_configure_show(E_Container *con)
|
||||||
e_win_centered_set(eco->win, 1);
|
e_win_centered_set(eco->win, 1);
|
||||||
|
|
||||||
eco->edje = edje_object_add(eco->evas);
|
eco->edje = edje_object_add(eco->evas);
|
||||||
e_theme_edje_object_set(eco->edje, "base/theme/configure",
|
e_theme_edje_object_set(eco->edje, "base/theme/configure",
|
||||||
"e/widgets/configure/main");
|
"e/widgets/configure/main");
|
||||||
edje_object_part_text_set(eco->edje, "e.text.title", _("Settings"));
|
edje_object_part_text_set(eco->edje, "e.text.title", _("Settings"));
|
||||||
|
|
||||||
eco->o_list = e_widget_list_add(eco->evas, 0, 0);
|
eco->o_list = e_widget_list_add(eco->evas, 0, 0);
|
||||||
|
@ -141,27 +141,27 @@ e_configure_show(E_Container *con)
|
||||||
mask = 0;
|
mask = 0;
|
||||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||||
if (!kg)
|
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 = evas_key_modifier_mask_get(e_win_evas_get(eco->win), "Shift");
|
mask = evas_key_modifier_mask_get(e_win_evas_get(eco->win), "Shift");
|
||||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||||
if (!kg)
|
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;
|
mask = 0;
|
||||||
kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
|
kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
|
||||||
if (!kg)
|
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;
|
mask = 0;
|
||||||
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
|
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
|
||||||
if (!kg)
|
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,
|
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
|
||||||
_e_configure_keydown_cb, eco->win);
|
_e_configure_keydown_cb, eco->win);
|
||||||
|
|
||||||
_e_configure_fill_cat_list(eco);
|
_e_configure_fill_cat_list(eco);
|
||||||
|
|
||||||
/* Close Button */
|
/* Close Button */
|
||||||
eco->close = e_widget_button_add(eco->evas, _("Close"), NULL,
|
eco->close = e_widget_button_add(eco->evas, _("Close"), NULL,
|
||||||
_e_configure_cb_close, eco, NULL);
|
_e_configure_cb_close, eco, NULL);
|
||||||
e_widget_on_focus_hook_set(eco->close, _e_configure_focus_cb, eco->win);
|
e_widget_on_focus_hook_set(eco->close, _e_configure_focus_cb, eco->win);
|
||||||
e_widget_size_min_get(eco->close, &mw, &mh);
|
e_widget_size_min_get(eco->close, &mw, &mh);
|
||||||
edje_extern_object_min_size_set(eco->close, mw, mh);
|
edje_extern_object_min_size_set(eco->close, mw, mh);
|
||||||
|
@ -180,54 +180,54 @@ e_configure_show(E_Container *con)
|
||||||
|
|
||||||
if (eco->cats)
|
if (eco->cats)
|
||||||
{
|
{
|
||||||
E_Configure_Category *cat;
|
E_Configure_Category *cat;
|
||||||
|
|
||||||
cat = eco->cats->data;
|
cat = eco->cats->data;
|
||||||
_e_configure_category_cb(cat, NULL);
|
_e_configure_category_cb(cat, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
_e_configure = eco;
|
_e_configure = eco;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
e_configure_del(void)
|
e_configure_del(void)
|
||||||
{
|
{
|
||||||
if (_e_configure) e_object_del(E_OBJECT(_e_configure));
|
if (_e_configure) e_object_del(E_OBJECT(_e_configure));
|
||||||
_e_configure = NULL;
|
_e_configure = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_free(E_Configure *eco)
|
_e_configure_free(E_Configure *eco)
|
||||||
{
|
{
|
||||||
if (_e_configure->mod_hdl)
|
if (_e_configure->mod_hdl)
|
||||||
ecore_event_handler_del(_e_configure->mod_hdl);
|
ecore_event_handler_del(_e_configure->mod_hdl);
|
||||||
_e_configure->mod_hdl = NULL;
|
_e_configure->mod_hdl = NULL;
|
||||||
_e_configure = NULL;
|
_e_configure = NULL;
|
||||||
while (eco->cats)
|
while (eco->cats)
|
||||||
{
|
{
|
||||||
E_Configure_Category *cat;
|
E_Configure_Category *cat;
|
||||||
|
|
||||||
if (!(cat = eco->cats->data)) return;
|
if (!(cat = eco->cats->data)) return;
|
||||||
if (cat->label) eina_stringshare_del(cat->label);
|
if (cat->label) eina_stringshare_del(cat->label);
|
||||||
|
|
||||||
while (cat->items)
|
while (cat->items)
|
||||||
{
|
{
|
||||||
E_Configure_Item *ci;
|
E_Configure_Item *ci;
|
||||||
|
|
||||||
if (!(ci = cat->items->data)) continue;
|
if (!(ci = cat->items->data)) continue;
|
||||||
if (ci->label) eina_stringshare_del(ci->label);
|
if (ci->label) eina_stringshare_del(ci->label);
|
||||||
if (ci->icon_file) eina_stringshare_del(ci->icon_file);
|
if (ci->icon_file) eina_stringshare_del(ci->icon_file);
|
||||||
if (ci->icon) eina_stringshare_del(ci->icon);
|
if (ci->icon) eina_stringshare_del(ci->icon);
|
||||||
if (ci->cb)
|
if (ci->cb)
|
||||||
{
|
{
|
||||||
if (ci->cb->path) eina_stringshare_del(ci->cb->path);
|
if (ci->cb->path) eina_stringshare_del(ci->cb->path);
|
||||||
free(ci->cb);
|
free(ci->cb);
|
||||||
}
|
}
|
||||||
cat->items = eina_list_remove_list(cat->items, cat->items);
|
cat->items = eina_list_remove_list(cat->items, cat->items);
|
||||||
E_FREE(ci);
|
E_FREE(ci);
|
||||||
}
|
}
|
||||||
eco->cats = eina_list_remove_list(eco->cats, eco->cats);
|
eco->cats = eina_list_remove_list(eco->cats, eco->cats);
|
||||||
E_FREE(cat);
|
E_FREE(cat);
|
||||||
}
|
}
|
||||||
// evas_object_del(eco->close);
|
// evas_object_del(eco->close);
|
||||||
// evas_object_del(eco->cat_list);
|
// evas_object_del(eco->cat_list);
|
||||||
|
@ -238,8 +238,8 @@ _e_configure_free(E_Configure *eco)
|
||||||
E_FREE(eco);
|
E_FREE(eco);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_cb_del_req(E_Win *win)
|
_e_configure_cb_del_req(E_Win *win)
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
|
|
||||||
|
@ -247,8 +247,8 @@ _e_configure_cb_del_req(E_Win *win)
|
||||||
e_object_del(E_OBJECT(eco));
|
e_object_del(E_OBJECT(eco));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_cb_resize(E_Win *win)
|
_e_configure_cb_resize(E_Win *win)
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
Evas_Coord w, h;
|
Evas_Coord w, h;
|
||||||
|
@ -279,20 +279,20 @@ _e_configure_category_add(E_Configure *eco, const char *label, const char *icon_
|
||||||
cat = E_NEW(E_Configure_Category, 1);
|
cat = E_NEW(E_Configure_Category, 1);
|
||||||
cat->eco = eco;
|
cat->eco = eco;
|
||||||
cat->label = eina_stringshare_add(label);
|
cat->label = eina_stringshare_add(label);
|
||||||
if (icon)
|
if (icon)
|
||||||
{
|
{
|
||||||
o = e_icon_add(eco->evas);
|
o = e_icon_add(eco->evas);
|
||||||
if (icon_file)
|
if (icon_file)
|
||||||
e_icon_file_edje_set(o, icon_file, icon);
|
e_icon_file_edje_set(o, icon_file, icon);
|
||||||
else if (!e_util_icon_theme_set(o, icon))
|
else if (!e_util_icon_theme_set(o, icon))
|
||||||
{
|
{
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
o = e_util_icon_add(icon, eco->evas);
|
o = e_util_icon_add(icon, eco->evas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eco->cats = eina_list_append(eco->cats, cat);
|
eco->cats = eina_list_append(eco->cats, cat);
|
||||||
|
|
||||||
e_widget_toolbar_item_append(eco->cat_list, o, label,
|
e_widget_toolbar_item_append(eco->cat_list, o, label,
|
||||||
_e_configure_category_cb, cat, NULL);
|
_e_configure_category_cb, cat, NULL);
|
||||||
return cat;
|
return cat;
|
||||||
}
|
}
|
||||||
|
@ -313,24 +313,24 @@ _e_configure_category_cb(void *data, void *data2 __UNUSED__)
|
||||||
e_widget_ilist_freeze(eco->item_list);
|
e_widget_ilist_freeze(eco->item_list);
|
||||||
e_widget_ilist_clear(eco->item_list);
|
e_widget_ilist_clear(eco->item_list);
|
||||||
/***--- fill ---***/
|
/***--- fill ---***/
|
||||||
for (l = cat->items; l; l = l->next)
|
for (l = cat->items; l; l = l->next)
|
||||||
{
|
{
|
||||||
E_Configure_Item *ci;
|
E_Configure_Item *ci;
|
||||||
Evas_Object *o = NULL;
|
Evas_Object *o = NULL;
|
||||||
|
|
||||||
if (!(ci = l->data)) continue;
|
if (!(ci = l->data)) continue;
|
||||||
if (ci->icon)
|
if (ci->icon)
|
||||||
{
|
{
|
||||||
o = e_icon_add(eco->evas);
|
o = e_icon_add(eco->evas);
|
||||||
if (ci->icon_file)
|
if (ci->icon_file)
|
||||||
e_icon_file_edje_set(o, ci->icon_file, ci->icon);
|
e_icon_file_edje_set(o, ci->icon_file, ci->icon);
|
||||||
else if (!e_util_icon_theme_set(o, ci->icon))
|
else if (!e_util_icon_theme_set(o, ci->icon))
|
||||||
{
|
{
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
o = e_util_icon_add(ci->icon, eco->evas);
|
o = e_util_icon_add(ci->icon, eco->evas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e_widget_ilist_append(eco->item_list, o, ci->label,
|
e_widget_ilist_append(eco->item_list, o, ci->label,
|
||||||
_e_configure_item_cb, ci, NULL);
|
_e_configure_item_cb, ci, NULL);
|
||||||
}
|
}
|
||||||
e_widget_ilist_go(eco->item_list);
|
e_widget_ilist_go(eco->item_list);
|
||||||
|
@ -360,8 +360,8 @@ _e_configure_item_add(E_Configure_Category *cat, const char *label, const char *
|
||||||
cat->items = eina_list_append(cat->items, ci);
|
cat->items = eina_list_append(cat->items, ci);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_item_cb(void *data)
|
_e_configure_item_cb(void *data)
|
||||||
{
|
{
|
||||||
E_Configure_Item *ci;
|
E_Configure_Item *ci;
|
||||||
E_Configure_CB *cb;
|
E_Configure_CB *cb;
|
||||||
|
@ -371,28 +371,28 @@ _e_configure_item_cb(void *data)
|
||||||
if (cb->path) e_configure_registry_call(cb->path, cb->eco->con, NULL);
|
if (cb->path) e_configure_registry_call(cb->path, cb->eco->con, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_focus_cb(void *data, Evas_Object *obj)
|
_e_configure_focus_cb(void *data, Evas_Object *obj)
|
||||||
{
|
{
|
||||||
E_Win *win;
|
E_Win *win;
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
|
|
||||||
win = data;
|
win = data;
|
||||||
if (!(eco = win->data)) return;
|
if (!(eco = win->data)) return;
|
||||||
if (obj == eco->close)
|
if (obj == eco->close)
|
||||||
{
|
{
|
||||||
e_widget_focused_object_clear(eco->item_list);
|
e_widget_focused_object_clear(eco->item_list);
|
||||||
e_widget_focused_object_clear(eco->cat_list);
|
e_widget_focused_object_clear(eco->cat_list);
|
||||||
}
|
}
|
||||||
else if (obj == eco->item_list)
|
else if (obj == eco->item_list)
|
||||||
{
|
{
|
||||||
e_widget_focused_object_clear(eco->cat_list);
|
e_widget_focused_object_clear(eco->cat_list);
|
||||||
e_widget_focused_object_clear(eco->close);
|
e_widget_focused_object_clear(eco->close);
|
||||||
}
|
}
|
||||||
else if (obj == eco->cat_list)
|
else if (obj == eco->cat_list)
|
||||||
{
|
{
|
||||||
e_widget_focused_object_clear(eco->item_list);
|
e_widget_focused_object_clear(eco->item_list);
|
||||||
e_widget_focused_object_clear(eco->close);
|
e_widget_focused_object_clear(eco->close);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,50 +407,50 @@ _e_configure_keydown_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
|
||||||
win = data;
|
win = data;
|
||||||
eco = win->data;
|
eco = win->data;
|
||||||
|
|
||||||
if (!strcmp(ev->keyname, "Tab"))
|
if (!strcmp(ev->keyname, "Tab"))
|
||||||
{
|
{
|
||||||
if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(win)), "Shift"))
|
if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(win)), "Shift"))
|
||||||
{
|
{
|
||||||
if (e_widget_focus_get(eco->close))
|
if (e_widget_focus_get(eco->close))
|
||||||
e_widget_focus_set(eco->item_list, 0);
|
e_widget_focus_set(eco->item_list, 0);
|
||||||
else if (e_widget_focus_get(eco->item_list))
|
else if (e_widget_focus_get(eco->item_list))
|
||||||
e_widget_focus_set(eco->cat_list, 1);
|
e_widget_focus_set(eco->cat_list, 1);
|
||||||
else if (e_widget_focus_get(eco->cat_list))
|
else if (e_widget_focus_get(eco->cat_list))
|
||||||
e_widget_focus_set(eco->close, 0);
|
e_widget_focus_set(eco->close, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e_widget_focus_get(eco->close))
|
if (e_widget_focus_get(eco->close))
|
||||||
e_widget_focus_set(eco->cat_list, 1);
|
e_widget_focus_set(eco->cat_list, 1);
|
||||||
else if (e_widget_focus_get(eco->item_list))
|
else if (e_widget_focus_get(eco->item_list))
|
||||||
e_widget_focus_set(eco->close, 0);
|
e_widget_focus_set(eco->close, 0);
|
||||||
else if (e_widget_focus_get(eco->cat_list))
|
else if (e_widget_focus_get(eco->cat_list))
|
||||||
e_widget_focus_set(eco->item_list, 0);
|
e_widget_focus_set(eco->item_list, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (((!strcmp(ev->keyname, "Return")) ||
|
else if (((!strcmp(ev->keyname, "Return")) ||
|
||||||
(!strcmp(ev->keyname, "KP_Enter")) ||
|
(!strcmp(ev->keyname, "KP_Enter")) ||
|
||||||
(!strcmp(ev->keyname, "space"))))
|
(!strcmp(ev->keyname, "space"))))
|
||||||
{
|
{
|
||||||
Evas_Object *o = NULL;
|
Evas_Object *o = NULL;
|
||||||
|
|
||||||
if (e_widget_focus_get(eco->cat_list))
|
if (e_widget_focus_get(eco->cat_list))
|
||||||
o = eco->cat_list;
|
o = eco->cat_list;
|
||||||
else if (e_widget_focus_get(eco->item_list))
|
else if (e_widget_focus_get(eco->item_list))
|
||||||
o = eco->item_list;
|
o = eco->item_list;
|
||||||
else if (e_widget_focus_get(eco->close))
|
else if (e_widget_focus_get(eco->close))
|
||||||
o = eco->close;
|
o = eco->close;
|
||||||
|
|
||||||
if (o)
|
if (o)
|
||||||
{
|
{
|
||||||
if (!(o = e_widget_focused_object_get(o))) return;
|
if (!(o = e_widget_focused_object_get(o))) return;
|
||||||
e_widget_activate(o);
|
e_widget_activate(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_fill_cat_list(void *data)
|
_e_configure_fill_cat_list(void *data)
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
E_Configure *eco;
|
||||||
Evas_Coord mw, mh;
|
Evas_Coord mw, mh;
|
||||||
|
@ -463,36 +463,36 @@ _e_configure_fill_cat_list(void *data)
|
||||||
if (eco->item_list) evas_object_del(eco->item_list);
|
if (eco->item_list) evas_object_del(eco->item_list);
|
||||||
eco->cat_list = NULL;
|
eco->cat_list = NULL;
|
||||||
eco->item_list = NULL;
|
eco->item_list = NULL;
|
||||||
|
|
||||||
/* Category List */
|
/* Category List */
|
||||||
eco->cat_list = e_widget_toolbar_add(eco->evas, 32 * e_scale, 32 * e_scale);
|
eco->cat_list = e_widget_toolbar_add(eco->evas, 32 * e_scale, 32 * e_scale);
|
||||||
e_widget_toolbar_scrollable_set(eco->cat_list, 1);
|
e_widget_toolbar_scrollable_set(eco->cat_list, 1);
|
||||||
/***--- fill ---***/
|
/***--- fill ---***/
|
||||||
for (l = e_configure_registry; l; l = l->next)
|
for (l = e_configure_registry; l; l = l->next)
|
||||||
{
|
{
|
||||||
Eina_List *ll;
|
Eina_List *ll;
|
||||||
E_Configure_Cat *ecat;
|
E_Configure_Cat *ecat;
|
||||||
|
|
||||||
ecat = l->data;
|
ecat = l->data;
|
||||||
if ((ecat->pri >= 0) && (ecat->items))
|
if ((ecat->pri >= 0) && (ecat->items))
|
||||||
{
|
{
|
||||||
cat = _e_configure_category_add(eco, _(ecat->label),
|
cat = _e_configure_category_add(eco, _(ecat->label),
|
||||||
ecat->icon_file, ecat->icon);
|
ecat->icon_file, ecat->icon);
|
||||||
for (ll = ecat->items; ll; ll = ll->next)
|
for (ll = ecat->items; ll; ll = ll->next)
|
||||||
{
|
{
|
||||||
E_Configure_It *eci;
|
E_Configure_It *eci;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
eci = ll->data;
|
eci = ll->data;
|
||||||
if (eci->pri >= 0)
|
if (eci->pri >= 0)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat,
|
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat,
|
||||||
eci->item);
|
eci->item);
|
||||||
_e_configure_item_add(cat, _(eci->label),
|
_e_configure_item_add(cat, _(eci->label),
|
||||||
eci->icon_file, eci->icon, buf);
|
eci->icon_file, eci->icon, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e_widget_on_focus_hook_set(eco->cat_list, _e_configure_focus_cb, eco->win);
|
e_widget_on_focus_hook_set(eco->cat_list, _e_configure_focus_cb, eco->win);
|
||||||
e_widget_list_object_append(eco->o_list, eco->cat_list, 1, 0, 0.5);
|
e_widget_list_object_append(eco->o_list, eco->cat_list, 1, 0, 0.5);
|
||||||
|
@ -525,3 +525,4 @@ _e_configure_module_update_cb(void *data, int type __UNUSED__, void *event __UNU
|
||||||
e_widget_toolbar_item_select(eco->cat_list, sel);
|
e_widget_toolbar_item_select(eco->cat_list, sel);
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@ struct _E_Config_Dialog_Data
|
||||||
int menu_augmentation;
|
int menu_augmentation;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *_create_data(E_Config_Dialog *cfd);
|
static void *_create_data(E_Config_Dialog *cfd);
|
||||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
static void _free_data(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 Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||||
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
static int _basic_apply(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_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
e_int_config_conf_module(E_Container *con, const char *params __UNUSED__)
|
||||||
|
@ -81,9 +81,9 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
if (conf->menu_augmentation)
|
if (conf->menu_augmentation)
|
||||||
{
|
{
|
||||||
conf->aug =
|
conf->aug =
|
||||||
e_int_menus_menu_augmentation_add
|
e_int_menus_menu_augmentation_add
|
||||||
("config/2", e_mod_config_menu_add, NULL, NULL, NULL);
|
("config/2", e_mod_config_menu_add, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
|
@ -93,5 +93,6 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
static int
|
static int
|
||||||
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
return (conf->menu_augmentation != cfdata->menu_augmentation);
|
return conf->menu_augmentation != cfdata->menu_augmentation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,29 +5,29 @@ typedef struct _Instance Instance;
|
||||||
struct _Instance
|
struct _Instance
|
||||||
{
|
{
|
||||||
E_Gadcon_Client *gcc;
|
E_Gadcon_Client *gcc;
|
||||||
Evas_Object *o_toggle;
|
Evas_Object *o_toggle;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* actual module specifics */
|
/* actual module specifics */
|
||||||
|
|
||||||
static void _e_mod_action_conf_cb(E_Object *obj, const char *params);
|
static void _e_mod_action_conf_cb(E_Object *obj, const char *params);
|
||||||
static void _e_mod_conf_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_mod_conf_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
static void _e_mod_menu_add(void *data, E_Menu *m);
|
static void _e_mod_menu_add(void *data, E_Menu *m);
|
||||||
static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
static void _config_pre_activate_cb(void *data, E_Menu *m);
|
static void _config_pre_activate_cb(void *data, E_Menu *m);
|
||||||
|
|
||||||
/* gadcon requirements */
|
/* gadcon requirements */
|
||||||
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style);
|
||||||
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
static void _gc_shutdown(E_Gadcon_Client *gcc);
|
||||||
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
static void _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient);
|
||||||
static const char *_gc_label(E_Gadcon_Client_Class *client_class);
|
static const char *_gc_label(E_Gadcon_Client_Class *client_class);
|
||||||
static Evas_Object *_gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas);
|
static Evas_Object *_gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas);
|
||||||
static const char *_gc_id_new(E_Gadcon_Client_Class *client_class);
|
static const char *_gc_id_new(E_Gadcon_Client_Class *client_class);
|
||||||
static void _cb_action_conf(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _cb_action_conf(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
|
|
||||||
static void _conf_new(void);
|
static void _conf_new(void);
|
||||||
static void _conf_free(void);
|
static void _conf_free(void);
|
||||||
static Eina_Bool _conf_timer(void *data);
|
static Eina_Bool _conf_timer(void *data);
|
||||||
|
|
||||||
static E_Module *conf_module = NULL;
|
static E_Module *conf_module = NULL;
|
||||||
static E_Action *act = NULL;
|
static E_Action *act = NULL;
|
||||||
|
@ -39,14 +39,14 @@ static Eina_List *instances = NULL;
|
||||||
|
|
||||||
/* and actually define the gadcon class that this module provides (just 1) */
|
/* and actually define the gadcon class that this module provides (just 1) */
|
||||||
static const E_Gadcon_Client_Class _gadcon_class =
|
static const E_Gadcon_Client_Class _gadcon_class =
|
||||||
{
|
{
|
||||||
GADCON_CLIENT_CLASS_VERSION, "configuration",
|
GADCON_CLIENT_CLASS_VERSION, "configuration",
|
||||||
{
|
{
|
||||||
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
_gc_init, _gc_shutdown, _gc_orient, _gc_label, _gc_icon, _gc_id_new, NULL,
|
||||||
e_gadcon_site_is_not_toolbar
|
e_gadcon_site_is_not_toolbar
|
||||||
},
|
},
|
||||||
E_GADCON_CLIENT_STYLE_PLAIN
|
E_GADCON_CLIENT_STYLE_PLAIN
|
||||||
};
|
};
|
||||||
|
|
||||||
static E_Gadcon_Client *
|
static E_Gadcon_Client *
|
||||||
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||||
|
@ -56,14 +56,14 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
|
||||||
inst = E_NEW(Instance, 1);
|
inst = E_NEW(Instance, 1);
|
||||||
inst->o_toggle = edje_object_add(gc->evas);
|
inst->o_toggle = edje_object_add(gc->evas);
|
||||||
e_theme_edje_object_set(inst->o_toggle,
|
e_theme_edje_object_set(inst->o_toggle,
|
||||||
"base/theme/modules/conf",
|
"base/theme/modules/conf",
|
||||||
"e/modules/conf/main");
|
"e/modules/conf/main");
|
||||||
|
|
||||||
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->o_toggle);
|
inst->gcc = e_gadcon_client_new(gc, name, id, style, inst->o_toggle);
|
||||||
inst->gcc->data = inst;
|
inst->gcc->data = inst;
|
||||||
|
|
||||||
edje_object_signal_callback_add(inst->o_toggle, "e,action,conf", "",
|
edje_object_signal_callback_add(inst->o_toggle, "e,action,conf", "",
|
||||||
_cb_action_conf, inst);
|
_cb_action_conf, inst);
|
||||||
|
|
||||||
instances = eina_list_append(instances, inst);
|
instances = eina_list_append(instances, inst);
|
||||||
e_gadcon_client_util_menu_attach(inst->gcc);
|
e_gadcon_client_util_menu_attach(inst->gcc);
|
||||||
|
@ -122,15 +122,15 @@ _gc_id_new(E_Gadcon_Client_Class *client_class __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static void
|
static void
|
||||||
_cb_button_click(void *data __UNUSED__, void *data2 __UNUSED__)
|
_cb_button_click(void *data __UNUSED__, void *data2 __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Action *a;
|
E_Action *a;
|
||||||
|
|
||||||
a = e_action_find("configuration");
|
a = e_action_find("configuration");
|
||||||
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
|
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_action_conf(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
_cb_action_conf(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||||
|
@ -208,24 +208,24 @@ _config_all_pre_activate_cb(void *data __UNUSED__, E_Menu *m)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
|
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
|
||||||
{
|
{
|
||||||
E_Menu_Item *mi;
|
E_Menu_Item *mi;
|
||||||
E_Menu *sub;
|
E_Menu *sub;
|
||||||
|
|
||||||
if ((ecat->pri < 0) || (!ecat->items)) continue;
|
if ((ecat->pri < 0) || (!ecat->items)) continue;
|
||||||
|
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_label_set(mi, ecat->label);
|
e_menu_item_label_set(mi, ecat->label);
|
||||||
if (ecat->icon)
|
if (ecat->icon)
|
||||||
{
|
{
|
||||||
if (ecat->icon_file)
|
if (ecat->icon_file)
|
||||||
e_menu_item_icon_edje_set(mi, ecat->icon_file, ecat->icon);
|
e_menu_item_icon_edje_set(mi, ecat->icon_file, ecat->icon);
|
||||||
else
|
else
|
||||||
e_util_menu_item_theme_icon_set(mi, ecat->icon);
|
e_util_menu_item_theme_icon_set(mi, ecat->icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub = e_menu_new();
|
sub = e_menu_new();
|
||||||
e_menu_item_submenu_set(mi, sub);
|
e_menu_item_submenu_set(mi, sub);
|
||||||
e_menu_pre_activate_callback_set(sub, _config_pre_activate_cb, ecat);
|
e_menu_pre_activate_callback_set(sub, _config_pre_activate_cb, ecat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,8 +260,8 @@ e_modapi_init(E_Module *m)
|
||||||
act = e_action_add("configuration");
|
act = e_action_add("configuration");
|
||||||
if (act)
|
if (act)
|
||||||
{
|
{
|
||||||
act->func.go = _e_mod_action_conf_cb;
|
act->func.go = _e_mod_action_conf_cb;
|
||||||
e_action_predef_name_set(_("Launch"), _("Settings Panel"),
|
e_action_predef_name_set(_("Launch"), _("Settings Panel"),
|
||||||
"configuration", NULL, NULL, 0);
|
"configuration", NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
maug =
|
maug =
|
||||||
|
@ -292,33 +292,33 @@ e_modapi_init(E_Module *m)
|
||||||
{
|
{
|
||||||
_conf_free();
|
_conf_free();
|
||||||
ecore_timer_add(1.0, _conf_timer,
|
ecore_timer_add(1.0, _conf_timer,
|
||||||
_("Configuration Panel Module Configuration data needed "
|
_("Configuration Panel Module Configuration data needed "
|
||||||
"upgrading. Your old configuration<br> has been"
|
"upgrading. Your old configuration<br> has been"
|
||||||
" wiped and a new set of defaults initialized. "
|
" wiped and a new set of defaults initialized. "
|
||||||
"This<br>will happen regularly during "
|
"This<br>will happen regularly during "
|
||||||
"development, so don't report a<br>bug. "
|
"development, so don't report a<br>bug. "
|
||||||
"This simply means the module needs "
|
"This simply means the module needs "
|
||||||
"new configuration<br>data by default for "
|
"new configuration<br>data by default for "
|
||||||
"usable functionality that your old<br>"
|
"usable functionality that your old<br>"
|
||||||
"configuration simply lacks. This new set of "
|
"configuration simply lacks. This new set of "
|
||||||
"defaults will fix<br>that by adding it in. "
|
"defaults will fix<br>that by adding it in. "
|
||||||
"You can re-configure things now to your<br>"
|
"You can re-configure things now to your<br>"
|
||||||
"liking. Sorry for the inconvenience.<br>"));
|
"liking. Sorry for the inconvenience.<br>"));
|
||||||
}
|
}
|
||||||
else if (conf->version > MOD_CONFIG_FILE_VERSION)
|
else if (conf->version > MOD_CONFIG_FILE_VERSION)
|
||||||
{
|
{
|
||||||
_conf_free();
|
_conf_free();
|
||||||
ecore_timer_add(1.0, _conf_timer,
|
ecore_timer_add(1.0, _conf_timer,
|
||||||
_("Your Configuration Panel Module configuration is NEWER "
|
_("Your Configuration Panel Module configuration is NEWER "
|
||||||
"than the module version. This is "
|
"than the module version. This is "
|
||||||
"very<br>strange. This should not happen unless"
|
"very<br>strange. This should not happen unless"
|
||||||
" you downgraded<br>the module or "
|
" you downgraded<br>the module or "
|
||||||
"copied the configuration from a place where"
|
"copied the configuration from a place where"
|
||||||
"<br>a newer version of the module "
|
"<br>a newer version of the module "
|
||||||
"was running. This is bad and<br>as a "
|
"was running. This is bad and<br>as a "
|
||||||
"precaution your configuration has been now "
|
"precaution your configuration has been now "
|
||||||
"restored to<br>defaults. Sorry for the "
|
"restored to<br>defaults. Sorry for the "
|
||||||
"inconvenience.<br>"));
|
"inconvenience.<br>"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@ e_modapi_init(E_Module *m)
|
||||||
{
|
{
|
||||||
conf->aug =
|
conf->aug =
|
||||||
e_int_menus_menu_augmentation_add
|
e_int_menus_menu_augmentation_add
|
||||||
("config/2", e_mod_config_menu_add, NULL, NULL, NULL);
|
("config/2", e_mod_config_menu_add, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
e_gadcon_provider_register(&_gadcon_class);
|
e_gadcon_provider_register(&_gadcon_class);
|
||||||
|
@ -352,8 +352,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||||
/* remove module-supplied menu additions */
|
/* remove module-supplied menu additions */
|
||||||
if (maug)
|
if (maug)
|
||||||
{
|
{
|
||||||
e_int_menus_menu_augmentation_del("config/0", maug);
|
e_int_menus_menu_augmentation_del("config/0", maug);
|
||||||
maug = NULL;
|
maug = NULL;
|
||||||
}
|
}
|
||||||
if (conf->aug)
|
if (conf->aug)
|
||||||
{
|
{
|
||||||
|
@ -364,9 +364,9 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||||
/* remove module-supplied action */
|
/* remove module-supplied action */
|
||||||
if (act)
|
if (act)
|
||||||
{
|
{
|
||||||
e_action_predef_name_del(_("Launch"), _("Settings Panel"));
|
e_action_predef_name_del(_("Launch"), _("Settings Panel"));
|
||||||
e_action_del("configuration");
|
e_action_del("configuration");
|
||||||
act = NULL;
|
act = NULL;
|
||||||
}
|
}
|
||||||
conf_module = NULL;
|
conf_module = NULL;
|
||||||
|
|
||||||
|
@ -391,14 +391,14 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params)
|
||||||
|
|
||||||
if (obj)
|
if (obj)
|
||||||
{
|
{
|
||||||
if (obj->type == E_MANAGER_TYPE)
|
if (obj->type == E_MANAGER_TYPE)
|
||||||
zone = e_util_zone_current_get((E_Manager *)obj);
|
zone = e_util_zone_current_get((E_Manager *)obj);
|
||||||
else if (obj->type == E_CONTAINER_TYPE)
|
else if (obj->type == E_CONTAINER_TYPE)
|
||||||
zone = e_util_zone_current_get(((E_Container *)obj)->manager);
|
zone = e_util_zone_current_get(((E_Container *)obj)->manager);
|
||||||
else if (obj->type == E_ZONE_TYPE)
|
else if (obj->type == E_ZONE_TYPE)
|
||||||
zone = ((E_Zone *)obj);
|
zone = ((E_Zone *)obj);
|
||||||
else
|
else
|
||||||
zone = e_util_zone_current_get(e_manager_current_get());
|
zone = e_util_zone_current_get(e_manager_current_get());
|
||||||
}
|
}
|
||||||
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
|
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
|
||||||
if ((zone) && (params))
|
if ((zone) && (params))
|
||||||
|
@ -490,12 +490,12 @@ _conf_new(void)
|
||||||
#define IFMODCFG(v) if ((conf->version & 0xffff) < v) {
|
#define IFMODCFG(v) if ((conf->version & 0xffff) < v) {
|
||||||
#define IFMODCFGEND }
|
#define IFMODCFGEND }
|
||||||
|
|
||||||
IFMODCFG(0x008d);
|
IFMODCFG(0x008d);
|
||||||
conf->menu_augmentation = 1;
|
conf->menu_augmentation = 1;
|
||||||
IFMODCFGEND;
|
IFMODCFGEND;
|
||||||
|
|
||||||
conf->version = MOD_CONFIG_FILE_VERSION;
|
conf->version = MOD_CONFIG_FILE_VERSION;
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -508,6 +508,7 @@ static Eina_Bool
|
||||||
_conf_timer(__UNUSED__ void *data)
|
_conf_timer(__UNUSED__ void *data)
|
||||||
{
|
{
|
||||||
e_util_dialog_show(_("Configuration Panel Configuration Updated"),
|
e_util_dialog_show(_("Configuration Panel Configuration Updated"),
|
||||||
"%s", (char *)data);
|
"%s", (char *)data);
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue