forked from enlightenment/enlightenment
remove E_Win+e_canvas, convert all internal wins to use elm_win
known issues: * keybindings for efm windows (eg. ctrl+w) are broken until the rest of the conversion is completed
This commit is contained in:
parent
caf521875c
commit
99589eb5af
|
@ -5,7 +5,6 @@ src/bin/e_atoms.c
|
||||||
src/bin/e_bg.c
|
src/bin/e_bg.c
|
||||||
src/bin/e_bindings.c
|
src/bin/e_bindings.c
|
||||||
src/bin/e_box.c
|
src/bin/e_box.c
|
||||||
src/bin/e_canvas.c
|
|
||||||
src/bin/e_client.c
|
src/bin/e_client.c
|
||||||
src/bin/e_color.c
|
src/bin/e_color.c
|
||||||
src/bin/e_color_class.c
|
src/bin/e_color_class.c
|
||||||
|
|
|
@ -48,7 +48,6 @@ src/bin/e_backlight.h \
|
||||||
src/bin/e_bg.h \
|
src/bin/e_bg.h \
|
||||||
src/bin/e_bindings.h \
|
src/bin/e_bindings.h \
|
||||||
src/bin/e_box.h \
|
src/bin/e_box.h \
|
||||||
src/bin/e_canvas.h \
|
|
||||||
src/bin/e_client.h \
|
src/bin/e_client.h \
|
||||||
src/bin/e_client.x \
|
src/bin/e_client.x \
|
||||||
src/bin/e_color_class.h \
|
src/bin/e_color_class.h \
|
||||||
|
@ -222,7 +221,6 @@ src/bin/e_backlight.c \
|
||||||
src/bin/e_bg.c \
|
src/bin/e_bg.c \
|
||||||
src/bin/e_bindings.c \
|
src/bin/e_bindings.c \
|
||||||
src/bin/e_box.c \
|
src/bin/e_box.c \
|
||||||
src/bin/e_canvas.c \
|
|
||||||
src/bin/e_client.c \
|
src/bin/e_client.c \
|
||||||
src/bin/e_color.c \
|
src/bin/e_color.c \
|
||||||
src/bin/e_color_class.c \
|
src/bin/e_color_class.c \
|
||||||
|
|
|
@ -267,6 +267,11 @@ typedef struct _E_Rect E_Rect;
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define WEIGHT evas_object_size_hint_weight_set
|
||||||
|
#define ALIGN evas_object_size_hint_align_set
|
||||||
|
#define EXPAND(X) WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
|
||||||
|
#define FILL(X) ALIGN((X), EVAS_HINT_FILL, EVAS_HINT_FILL)
|
||||||
|
|
||||||
# define E_REMOTE_OPTIONS 1
|
# define E_REMOTE_OPTIONS 1
|
||||||
# define E_REMOTE_OUT 2
|
# define E_REMOTE_OUT 2
|
||||||
# define E_WM_IN 3
|
# define E_WM_IN 3
|
||||||
|
|
|
@ -327,12 +327,9 @@ _e_actions_cb_kill_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_kill_dialog_delete(E_Win *win)
|
_e_actions_cb_kill_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_kill_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_kill_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(window_kill, __UNUSED__)
|
ACT_FN_GO(window_kill, __UNUSED__)
|
||||||
|
@ -364,8 +361,8 @@ ACT_FN_GO(window_kill, __UNUSED__)
|
||||||
kill_dialog = e_dialog_new(NULL,
|
kill_dialog = e_dialog_new(NULL,
|
||||||
"E", "_kill_dialog");
|
"E", "_kill_dialog");
|
||||||
if (!kill_dialog) return;
|
if (!kill_dialog) return;
|
||||||
e_win_delete_callback_set(kill_dialog->win,
|
evas_object_event_callback_add(kill_dialog->win, EVAS_CALLBACK_DEL,
|
||||||
_e_actions_cb_kill_dialog_delete);
|
_e_actions_cb_kill_dialog_delete, kill_dialog);
|
||||||
e_dialog_title_set(kill_dialog,
|
e_dialog_title_set(kill_dialog,
|
||||||
_("Are you sure you want to kill this window?"));
|
_("Are you sure you want to kill this window?"));
|
||||||
e_dialog_text_set(kill_dialog, _(dialog_text));
|
e_dialog_text_set(kill_dialog, _(dialog_text));
|
||||||
|
@ -375,7 +372,7 @@ ACT_FN_GO(window_kill, __UNUSED__)
|
||||||
e_dialog_button_add(kill_dialog, _("No"), NULL,
|
e_dialog_button_add(kill_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_kill_dialog_cancel, NULL);
|
_e_actions_cb_kill_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(kill_dialog, 1);
|
e_dialog_button_focus_num(kill_dialog, 1);
|
||||||
e_win_centered_set(kill_dialog->win, 1);
|
elm_win_center(kill_dialog->win, 1, 1);
|
||||||
e_dialog_show(kill_dialog);
|
e_dialog_show(kill_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1364,8 +1361,8 @@ _e_actions_zone_get(E_Object *obj)
|
||||||
return ((E_Client *)obj)->zone;
|
return ((E_Client *)obj)->zone;
|
||||||
else if (obj->type == (int)E_SHELF_TYPE)
|
else if (obj->type == (int)E_SHELF_TYPE)
|
||||||
return ((E_Shelf *)obj)->zone;
|
return ((E_Shelf *)obj)->zone;
|
||||||
else if (obj->type == (int)E_WIN_TYPE)
|
else if (e_obj_is_win(obj))
|
||||||
return ((E_Win *)obj)->client->zone;
|
return e_win_client_get((void*)obj)->zone;
|
||||||
}
|
}
|
||||||
return e_util_zone_current_get(e_manager_current_get());
|
return e_util_zone_current_get(e_manager_current_get());
|
||||||
}
|
}
|
||||||
|
@ -2050,12 +2047,9 @@ _e_actions_cb_exit_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_exit_dialog_delete(E_Win *win)
|
_e_actions_cb_exit_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_exit_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_exit_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(exit, )
|
ACT_FN_GO(exit, )
|
||||||
|
@ -2075,7 +2069,7 @@ ACT_FN_GO(exit, )
|
||||||
|
|
||||||
exit_dialog = e_dialog_new(NULL, "E", "_exit_dialog");
|
exit_dialog = e_dialog_new(NULL, "E", "_exit_dialog");
|
||||||
if (!exit_dialog) return;
|
if (!exit_dialog) return;
|
||||||
e_win_delete_callback_set(exit_dialog->win, _e_actions_cb_exit_dialog_delete);
|
evas_object_event_callback_add(exit_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_exit_dialog_delete, exit_dialog);
|
||||||
e_dialog_title_set(exit_dialog, _("Exit"));
|
e_dialog_title_set(exit_dialog, _("Exit"));
|
||||||
e_dialog_text_set(exit_dialog, _("Are you sure you want to exit Enlightenment?"));
|
e_dialog_text_set(exit_dialog, _("Are you sure you want to exit Enlightenment?"));
|
||||||
e_dialog_icon_set(exit_dialog, "application-exit", 64);
|
e_dialog_icon_set(exit_dialog, "application-exit", 64);
|
||||||
|
@ -2084,7 +2078,7 @@ ACT_FN_GO(exit, )
|
||||||
e_dialog_button_add(exit_dialog, _("No"), NULL,
|
e_dialog_button_add(exit_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_exit_dialog_cancel, NULL);
|
_e_actions_cb_exit_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(exit_dialog, 1);
|
e_dialog_button_focus_num(exit_dialog, 1);
|
||||||
e_win_centered_set(exit_dialog->win, 1);
|
elm_win_center(exit_dialog->win, 1, 1);
|
||||||
e_dialog_show(exit_dialog);
|
e_dialog_show(exit_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2144,12 +2138,9 @@ _e_actions_cb_logout_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_logout_dialog_delete(E_Win *win)
|
_e_actions_cb_logout_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_logout_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_logout_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(logout, )
|
ACT_FN_GO(logout, )
|
||||||
|
@ -2169,7 +2160,7 @@ ACT_FN_GO(logout, )
|
||||||
|
|
||||||
logout_dialog = e_dialog_new(NULL, "E", "_logout_dialog");
|
logout_dialog = e_dialog_new(NULL, "E", "_logout_dialog");
|
||||||
if (!logout_dialog) return;
|
if (!logout_dialog) return;
|
||||||
e_win_delete_callback_set(logout_dialog->win, _e_actions_cb_logout_dialog_delete);
|
evas_object_event_callback_add(logout_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_logout_dialog_delete, logout_dialog);
|
||||||
e_dialog_title_set(logout_dialog, _("Logout"));
|
e_dialog_title_set(logout_dialog, _("Logout"));
|
||||||
e_dialog_text_set(logout_dialog, _("Are you sure you want to logout?"));
|
e_dialog_text_set(logout_dialog, _("Are you sure you want to logout?"));
|
||||||
e_dialog_icon_set(logout_dialog, "system-log-out", 64);
|
e_dialog_icon_set(logout_dialog, "system-log-out", 64);
|
||||||
|
@ -2178,7 +2169,7 @@ ACT_FN_GO(logout, )
|
||||||
e_dialog_button_add(logout_dialog, _("No"), NULL,
|
e_dialog_button_add(logout_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_logout_dialog_cancel, NULL);
|
_e_actions_cb_logout_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(logout_dialog, 1);
|
e_dialog_button_focus_num(logout_dialog, 1);
|
||||||
e_win_centered_set(logout_dialog->win, 1);
|
elm_win_center(logout_dialog->win, 1, 1);
|
||||||
e_dialog_show(logout_dialog);
|
e_dialog_show(logout_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2204,7 +2195,7 @@ _e_actions_cb_halt_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED__
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_halt_dialog_delete(E_Win *win __UNUSED__)
|
_e_actions_cb_halt_dialog_delete(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
if (!halt_dialog) return;
|
if (!halt_dialog) return;
|
||||||
e_object_del(E_OBJECT(halt_dialog));
|
e_object_del(E_OBJECT(halt_dialog));
|
||||||
|
@ -2228,7 +2219,7 @@ ACT_FN_GO(halt, )
|
||||||
|
|
||||||
halt_dialog = e_dialog_new(NULL, "E", "_halt_dialog");
|
halt_dialog = e_dialog_new(NULL, "E", "_halt_dialog");
|
||||||
if (!halt_dialog) return;
|
if (!halt_dialog) return;
|
||||||
e_win_delete_callback_set(halt_dialog->win, _e_actions_cb_halt_dialog_delete);
|
evas_object_event_callback_add(halt_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_halt_dialog_delete, halt_dialog);
|
||||||
e_dialog_title_set(halt_dialog, _("Power off"));
|
e_dialog_title_set(halt_dialog, _("Power off"));
|
||||||
e_dialog_text_set(halt_dialog,
|
e_dialog_text_set(halt_dialog,
|
||||||
_("Are you sure you want to power off your computer?"));
|
_("Are you sure you want to power off your computer?"));
|
||||||
|
@ -2238,7 +2229,7 @@ ACT_FN_GO(halt, )
|
||||||
e_dialog_button_add(halt_dialog, _("No"), NULL,
|
e_dialog_button_add(halt_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_halt_dialog_cancel, NULL);
|
_e_actions_cb_halt_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(halt_dialog, 1);
|
e_dialog_button_focus_num(halt_dialog, 1);
|
||||||
e_win_centered_set(halt_dialog->win, 1);
|
elm_win_center(halt_dialog->win, 1, 1);
|
||||||
e_dialog_show(halt_dialog);
|
e_dialog_show(halt_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2264,12 +2255,9 @@ _e_actions_cb_reboot_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSED
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_reboot_dialog_delete(E_Win *win)
|
_e_actions_cb_reboot_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_reboot_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_reboot_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(reboot, )
|
ACT_FN_GO(reboot, )
|
||||||
|
@ -2289,7 +2277,7 @@ ACT_FN_GO(reboot, )
|
||||||
|
|
||||||
reboot_dialog = e_dialog_new(NULL, "E", "_reboot_dialog");
|
reboot_dialog = e_dialog_new(NULL, "E", "_reboot_dialog");
|
||||||
if (!reboot_dialog) return;
|
if (!reboot_dialog) return;
|
||||||
e_win_delete_callback_set(reboot_dialog->win, _e_actions_cb_reboot_dialog_delete);
|
evas_object_event_callback_add(reboot_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_reboot_dialog_delete, reboot_dialog);
|
||||||
e_dialog_title_set(reboot_dialog, _("Reboot"));
|
e_dialog_title_set(reboot_dialog, _("Reboot"));
|
||||||
e_dialog_text_set(reboot_dialog, _("Are you sure you want to reboot your computer?"));
|
e_dialog_text_set(reboot_dialog, _("Are you sure you want to reboot your computer?"));
|
||||||
e_dialog_icon_set(reboot_dialog, "system-restart", 64);
|
e_dialog_icon_set(reboot_dialog, "system-restart", 64);
|
||||||
|
@ -2298,7 +2286,7 @@ ACT_FN_GO(reboot, )
|
||||||
e_dialog_button_add(reboot_dialog, _("No"), NULL,
|
e_dialog_button_add(reboot_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_reboot_dialog_cancel, NULL);
|
_e_actions_cb_reboot_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(reboot_dialog, 1);
|
e_dialog_button_focus_num(reboot_dialog, 1);
|
||||||
e_win_centered_set(reboot_dialog->win, 1);
|
elm_win_center(reboot_dialog->win, 1, 1);
|
||||||
e_dialog_show(reboot_dialog);
|
e_dialog_show(reboot_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2324,12 +2312,9 @@ _e_actions_cb_suspend_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNUSE
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_suspend_dialog_delete(E_Win *win)
|
_e_actions_cb_suspend_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_suspend_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_suspend_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(suspend_now, __UNUSED__)
|
ACT_FN_GO(suspend_now, __UNUSED__)
|
||||||
|
@ -2354,7 +2339,7 @@ ACT_FN_GO(suspend, )
|
||||||
|
|
||||||
suspend_dialog = e_dialog_new(NULL, "E", "_suspend_dialog");
|
suspend_dialog = e_dialog_new(NULL, "E", "_suspend_dialog");
|
||||||
if (!suspend_dialog) return;
|
if (!suspend_dialog) return;
|
||||||
e_win_delete_callback_set(suspend_dialog->win, _e_actions_cb_suspend_dialog_delete);
|
evas_object_event_callback_add(suspend_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_suspend_dialog_delete, suspend_dialog);
|
||||||
e_dialog_title_set(suspend_dialog, _("Suspend"));
|
e_dialog_title_set(suspend_dialog, _("Suspend"));
|
||||||
e_dialog_text_set(suspend_dialog, _("Are you sure you want to suspend your computer?"));
|
e_dialog_text_set(suspend_dialog, _("Are you sure you want to suspend your computer?"));
|
||||||
e_dialog_icon_set(suspend_dialog, "system-suspend", 64);
|
e_dialog_icon_set(suspend_dialog, "system-suspend", 64);
|
||||||
|
@ -2363,7 +2348,7 @@ ACT_FN_GO(suspend, )
|
||||||
e_dialog_button_add(suspend_dialog, _("No"), NULL,
|
e_dialog_button_add(suspend_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_suspend_dialog_cancel, NULL);
|
_e_actions_cb_suspend_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(suspend_dialog, 1);
|
e_dialog_button_focus_num(suspend_dialog, 1);
|
||||||
e_win_centered_set(suspend_dialog->win, 1);
|
elm_win_center(suspend_dialog->win, 1, 1);
|
||||||
e_dialog_show(suspend_dialog);
|
e_dialog_show(suspend_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2389,12 +2374,9 @@ _e_actions_cb_hibernate_dialog_cancel(void *data __UNUSED__, E_Dialog *dia __UNU
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_actions_cb_hibernate_dialog_delete(E_Win *win)
|
_e_actions_cb_hibernate_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
_e_actions_cb_hibernate_dialog_cancel(NULL, data);
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
_e_actions_cb_hibernate_dialog_cancel(NULL, dia);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ACT_FN_GO(hibernate_now, __UNUSED__)
|
ACT_FN_GO(hibernate_now, __UNUSED__)
|
||||||
|
@ -2419,7 +2401,7 @@ ACT_FN_GO(hibernate, )
|
||||||
|
|
||||||
hibernate_dialog = e_dialog_new(NULL, "E", "_hibernate_dialog");
|
hibernate_dialog = e_dialog_new(NULL, "E", "_hibernate_dialog");
|
||||||
if (!hibernate_dialog) return;
|
if (!hibernate_dialog) return;
|
||||||
e_win_delete_callback_set(hibernate_dialog->win, _e_actions_cb_hibernate_dialog_delete);
|
evas_object_event_callback_add(hibernate_dialog->win, EVAS_CALLBACK_DEL, _e_actions_cb_hibernate_dialog_delete, hibernate_dialog);
|
||||||
e_dialog_title_set(hibernate_dialog, _("Hibernate"));
|
e_dialog_title_set(hibernate_dialog, _("Hibernate"));
|
||||||
e_dialog_text_set(hibernate_dialog, _("Are you sure you want to hibernate your computer?"));
|
e_dialog_text_set(hibernate_dialog, _("Are you sure you want to hibernate your computer?"));
|
||||||
e_dialog_icon_set(hibernate_dialog, "system-suspend-hibernate", 64);
|
e_dialog_icon_set(hibernate_dialog, "system-suspend-hibernate", 64);
|
||||||
|
@ -2428,7 +2410,7 @@ ACT_FN_GO(hibernate, )
|
||||||
e_dialog_button_add(hibernate_dialog, _("No"), NULL,
|
e_dialog_button_add(hibernate_dialog, _("No"), NULL,
|
||||||
_e_actions_cb_hibernate_dialog_cancel, NULL);
|
_e_actions_cb_hibernate_dialog_cancel, NULL);
|
||||||
e_dialog_button_focus_num(hibernate_dialog, 1);
|
e_dialog_button_focus_num(hibernate_dialog, 1);
|
||||||
e_win_centered_set(hibernate_dialog->win, 1);
|
elm_win_center(hibernate_dialog->win, 1, 1);
|
||||||
e_dialog_show(hibernate_dialog);
|
e_dialog_show(hibernate_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,197 +0,0 @@
|
||||||
#include "e.h"
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
|
||||||
static Eina_Bool _e_canvas_cb_flush(void *data);
|
|
||||||
|
|
||||||
/* local subsystem globals */
|
|
||||||
static Eina_List *_e_canvases = NULL;
|
|
||||||
static Ecore_Poller *_e_canvas_cache_flush_poller = NULL;
|
|
||||||
|
|
||||||
/* externally accessible functions */
|
|
||||||
EAPI void
|
|
||||||
e_canvas_add(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
_e_canvases = eina_list_prepend(_e_canvases, ee);
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
evas_image_cache_set(e, e_config->image_cache * 1024);
|
|
||||||
evas_font_cache_set(e, e_config->font_cache * 1024);
|
|
||||||
e_path_evas_append(path_fonts, e);
|
|
||||||
if (e_config->font_hinting == 0)
|
|
||||||
{
|
|
||||||
if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_BYTECODE))
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE);
|
|
||||||
else if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO))
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO);
|
|
||||||
else
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
|
||||||
}
|
|
||||||
else if (e_config->font_hinting == 1)
|
|
||||||
{
|
|
||||||
if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO))
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO);
|
|
||||||
else
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
|
||||||
}
|
|
||||||
else if (e_config->font_hinting == 2)
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_del(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
_e_canvases = eina_list_remove(_e_canvases, ee);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_recache(void)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_canvases, l, ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
evas_image_cache_set(e, e_config->image_cache * 1024);
|
|
||||||
evas_font_cache_set(e, e_config->font_cache * 1024);
|
|
||||||
}
|
|
||||||
edje_file_cache_set(e_config->edje_cache);
|
|
||||||
edje_collection_cache_set(e_config->edje_collection_cache);
|
|
||||||
if (_e_canvas_cache_flush_poller)
|
|
||||||
{
|
|
||||||
ecore_poller_del(_e_canvas_cache_flush_poller);
|
|
||||||
_e_canvas_cache_flush_poller = NULL;
|
|
||||||
}
|
|
||||||
if (e_config->cache_flush_poll_interval > 0)
|
|
||||||
{
|
|
||||||
_e_canvas_cache_flush_poller =
|
|
||||||
ecore_poller_add(ECORE_POLLER_CORE,
|
|
||||||
e_config->cache_flush_poll_interval,
|
|
||||||
_e_canvas_cb_flush, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_cache_flush(void)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_canvases, l, ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
evas_image_cache_flush(e);
|
|
||||||
evas_font_cache_flush(e);
|
|
||||||
}
|
|
||||||
edje_file_cache_flush();
|
|
||||||
edje_collection_cache_flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_cache_reload(void)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_canvases, l, ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
evas_image_cache_reload(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_idle_flush(void)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_canvases, l, ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
evas_render_idle_flush(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_canvas_rehint(void)
|
|
||||||
{
|
|
||||||
Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_canvases, l, ee)
|
|
||||||
{
|
|
||||||
Evas *e;
|
|
||||||
|
|
||||||
e = ecore_evas_get(ee);
|
|
||||||
if (e_config->font_hinting == 0)
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE);
|
|
||||||
else if (e_config->font_hinting == 1)
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO);
|
|
||||||
else if (e_config->font_hinting == 2)
|
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI Ecore_Evas *
|
|
||||||
e_canvas_new(Ecore_Window win, int x, int y, int w, int h,
|
|
||||||
int direct_resize, int override, Ecore_Window *win_ret)
|
|
||||||
{
|
|
||||||
Ecore_Evas *ee = NULL;
|
|
||||||
|
|
||||||
switch (e_comp_get(NULL)->comp_type)
|
|
||||||
{
|
|
||||||
case E_PIXMAP_TYPE_X:
|
|
||||||
ee = ecore_evas_software_x11_new(NULL, win, x, y, w, h);
|
|
||||||
if (ee)
|
|
||||||
{
|
|
||||||
ecore_evas_override_set(ee, override);
|
|
||||||
if (direct_resize) ecore_evas_software_x11_direct_resize_set(ee, 1);
|
|
||||||
if (win_ret) *win_ret = ecore_evas_software_x11_window_get(ee);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
|
||||||
case E_PIXMAP_TYPE_WL:
|
|
||||||
/* FIXME: This should be based on if we are rendering with gl or not */
|
|
||||||
ee = ecore_evas_wayland_shm_new(NULL, win, x, y, w, h, 0);
|
|
||||||
if (ee)
|
|
||||||
{
|
|
||||||
ecore_evas_override_set(ee, override);
|
|
||||||
if (win_ret)
|
|
||||||
{
|
|
||||||
*win_ret =
|
|
||||||
ecore_wl_window_id_get(ecore_evas_wayland_window_get(ee));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
if (!ee)
|
|
||||||
EINA_LOG_ERR("Impossible to build any Ecore_Evas window !!");
|
|
||||||
return ee;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI const Eina_List *
|
|
||||||
e_canvas_list(void)
|
|
||||||
{
|
|
||||||
return _e_canvases;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
|
||||||
static Eina_Bool
|
|
||||||
_e_canvas_cb_flush(void *data __UNUSED__)
|
|
||||||
{
|
|
||||||
e_canvas_cache_flush();
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#ifdef E_TYPEDEFS
|
|
||||||
#else
|
|
||||||
#ifndef E_CANVAS_H
|
|
||||||
#define E_CANVAS_H
|
|
||||||
|
|
||||||
EAPI void e_canvas_add(Ecore_Evas *ee);
|
|
||||||
EAPI void e_canvas_del(Ecore_Evas *ee);
|
|
||||||
EAPI void e_canvas_recache(void);
|
|
||||||
EAPI void e_canvas_cache_flush(void);
|
|
||||||
EAPI void e_canvas_cache_reload(void);
|
|
||||||
EAPI void e_canvas_idle_flush(void);
|
|
||||||
EAPI void e_canvas_rehint(void);
|
|
||||||
EAPI Ecore_Evas *e_canvas_new(Ecore_Window win, int x, int y, int w, int h, int direct_resize, int override, Ecore_Window *win_ret);
|
|
||||||
|
|
||||||
EAPI const Eina_List *e_canvas_list(void);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
|
@ -483,11 +483,7 @@ _e_client_free(E_Client *ec)
|
||||||
EINA_LIST_FREE(ec->e.state.video_child, tmp)
|
EINA_LIST_FREE(ec->e.state.video_child, tmp)
|
||||||
tmp->e.state.video_parent_client = NULL;
|
tmp->e.state.video_parent_client = NULL;
|
||||||
}
|
}
|
||||||
if (ec->internal_ecore_evas)
|
E_FREE_FUNC(ec->internal_elm_win, evas_object_del);
|
||||||
{
|
|
||||||
e_canvas_del(ec->internal_ecore_evas);
|
|
||||||
E_FREE_FUNC(ec->internal_ecore_evas, ecore_evas_free);
|
|
||||||
}
|
|
||||||
E_FREE_FUNC(ec->desktop, efreet_desktop_free);
|
E_FREE_FUNC(ec->desktop, efreet_desktop_free);
|
||||||
E_FREE_FUNC(ec->post_job, ecore_idle_enterer_del);
|
E_FREE_FUNC(ec->post_job, ecore_idle_enterer_del);
|
||||||
|
|
||||||
|
@ -596,8 +592,8 @@ _e_client_del(E_Client *ec)
|
||||||
e_int_client_menu_del(ec);
|
e_int_client_menu_del(ec);
|
||||||
E_FREE_FUNC(ec->raise_timer, ecore_timer_del);
|
E_FREE_FUNC(ec->raise_timer, ecore_timer_del);
|
||||||
|
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
ecore_evas_hide(ec->internal_ecore_evas);
|
evas_object_hide(ec->internal_elm_win);
|
||||||
|
|
||||||
if (ec->focused)
|
if (ec->focused)
|
||||||
_e_client_revert_focus(ec);
|
_e_client_revert_focus(ec);
|
||||||
|
@ -1383,7 +1379,7 @@ _e_client_cb_evas_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN
|
||||||
Evas_Coord x, y;
|
Evas_Coord x, y;
|
||||||
|
|
||||||
ec->pre_res_change.valid = 0;
|
ec->pre_res_change.valid = 0;
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
{
|
{
|
||||||
EC_CHANGED(ec);
|
EC_CHANGED(ec);
|
||||||
ec->changes.pos = 1;
|
ec->changes.pos = 1;
|
||||||
|
@ -1418,7 +1414,7 @@ _e_client_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_
|
||||||
Evas_Coord x, y, w, h;
|
Evas_Coord x, y, w, h;
|
||||||
|
|
||||||
ec->pre_res_change.valid = 0;
|
ec->pre_res_change.valid = 0;
|
||||||
if (ec->internal_ecore_evas || (!ec->netwm.sync.request))
|
if (ec->internal_elm_win || (!ec->netwm.sync.request))
|
||||||
{
|
{
|
||||||
EC_CHANGED(ec);
|
EC_CHANGED(ec);
|
||||||
ec->changes.size = 1;
|
ec->changes.size = 1;
|
||||||
|
@ -1966,11 +1962,7 @@ _e_client_eval(E_Client *ec)
|
||||||
{
|
{
|
||||||
ec->changes.size = 0;
|
ec->changes.size = 0;
|
||||||
if ((!ec->shaded) && (!ec->shading))
|
if ((!ec->shaded) && (!ec->shading))
|
||||||
{
|
|
||||||
evas_object_resize(ec->frame, ec->w, ec->h);
|
evas_object_resize(ec->frame, ec->w, ec->h);
|
||||||
if (ec->internal_ecore_evas && (!ec->override))
|
|
||||||
ecore_evas_move_resize(ec->internal_ecore_evas, 0, 0, ec->client.w, ec->client.h);
|
|
||||||
}
|
|
||||||
|
|
||||||
rem_change = 1;
|
rem_change = 1;
|
||||||
prop |= E_CLIENT_PROPERTY_SIZE;
|
prop |= E_CLIENT_PROPERTY_SIZE;
|
||||||
|
|
|
@ -637,7 +637,7 @@ struct E_Client
|
||||||
unsigned int internal_no_reopen : 1;
|
unsigned int internal_no_reopen : 1;
|
||||||
Eina_Bool theme_shadow : 1;
|
Eina_Bool theme_shadow : 1;
|
||||||
|
|
||||||
Ecore_Evas *internal_ecore_evas;
|
Evas_Object *internal_elm_win;
|
||||||
|
|
||||||
double ping;
|
double ping;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ static void _e_color_dialog_cb_csel_change(void *data, Evas_Object *obj);
|
||||||
* @param alpha_enabled if set, uses alpha and let user edit it.
|
* @param alpha_enabled if set, uses alpha and let user edit it.
|
||||||
*/
|
*/
|
||||||
E_Color_Dialog *
|
E_Color_Dialog *
|
||||||
e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled)
|
e_color_dialog_new(E_Comp *c EINA_UNUSED, const E_Color *color, Eina_Bool alpha_enabled)
|
||||||
{
|
{
|
||||||
E_Color_Dialog *dia;
|
E_Color_Dialog *dia;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
@ -22,7 +22,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled)
|
||||||
|
|
||||||
dia = E_OBJECT_ALLOC(E_Color_Dialog, E_COLOR_DIALOG_TYPE, _e_color_dialog_free);
|
dia = E_OBJECT_ALLOC(E_Color_Dialog, E_COLOR_DIALOG_TYPE, _e_color_dialog_free);
|
||||||
if (!dia) return NULL;
|
if (!dia) return NULL;
|
||||||
dia->dia = e_dialog_new(c, "E", "_color_dialog");
|
dia->dia = e_dialog_new(NULL, "E", "_color_dialog");
|
||||||
e_dialog_title_set(dia->dia, _("Color Selector"));
|
e_dialog_title_set(dia->dia, _("Color Selector"));
|
||||||
|
|
||||||
dia->color = calloc(1, sizeof(E_Color));
|
dia->color = calloc(1, sizeof(E_Color));
|
||||||
|
@ -36,7 +36,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled)
|
||||||
|
|
||||||
e_color_copy(dia->color, dia->initial);
|
e_color_copy(dia->color, dia->initial);
|
||||||
|
|
||||||
o = e_widget_csel_add(dia->dia->win->evas, dia->color, alpha_enabled);
|
o = e_widget_csel_add(evas_object_evas_get(dia->dia->win), dia->color, alpha_enabled);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
e_widget_size_min_get(o, &mw, &mh);
|
e_widget_size_min_get(o, &mw, &mh);
|
||||||
e_dialog_content_set(dia->dia, o, mw, mh);
|
e_dialog_content_set(dia->dia, o, mw, mh);
|
||||||
|
@ -45,7 +45,7 @@ e_color_dialog_new(E_Comp *c, const E_Color *color, Eina_Bool alpha_enabled)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia->dia, _("Select"), NULL, _e_color_dialog_button1_click, dia);
|
e_dialog_button_add(dia->dia, _("Select"), NULL, _e_color_dialog_button1_click, dia);
|
||||||
e_dialog_button_add(dia->dia, _("Cancel"), NULL, _e_color_dialog_button2_click, dia);
|
e_dialog_button_add(dia->dia, _("Cancel"), NULL, _e_color_dialog_button2_click, dia);
|
||||||
e_win_centered_set(dia->dia->win, 1);
|
elm_win_center(dia->dia->win, 1, 1);
|
||||||
|
|
||||||
dia->dia->data = dia;
|
dia->dia->data = dia;
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia->dia), _e_color_dialog_dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia->dia), _e_color_dialog_dia_del);
|
||||||
|
|
|
@ -916,9 +916,6 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
|
||||||
|
|
||||||
switch (obj->type)
|
switch (obj->type)
|
||||||
{
|
{
|
||||||
case E_WIN_TYPE:
|
|
||||||
ec = ((E_Win*)obj)->client;
|
|
||||||
return ec ? ec->frame : NULL;
|
|
||||||
case E_CLIENT_TYPE:
|
case E_CLIENT_TYPE:
|
||||||
return ((E_Client*)obj)->frame;
|
return ((E_Client*)obj)->frame;
|
||||||
default:
|
default:
|
||||||
|
@ -928,6 +925,8 @@ _e_comp_act_opacity_obj_finder(E_Object *obj)
|
||||||
ec = e_client_focused_get();
|
ec = e_client_focused_get();
|
||||||
return ec ? ec->frame : NULL;
|
return ec ? ec->frame : NULL;
|
||||||
}
|
}
|
||||||
|
if (e_obj_is_win(obj))
|
||||||
|
return e_win_client_get((void*)obj)->frame;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1419,7 +1418,6 @@ e_comp_get(const void *o)
|
||||||
E_Gadcon *gc;
|
E_Gadcon *gc;
|
||||||
E_Gadcon_Client *gcc;
|
E_Gadcon_Client *gcc;
|
||||||
E_Drag *drag;
|
E_Drag *drag;
|
||||||
E_Win *ewin;
|
|
||||||
|
|
||||||
if (!o)
|
if (!o)
|
||||||
{
|
{
|
||||||
|
@ -1430,9 +1428,6 @@ e_comp_get(const void *o)
|
||||||
/* try to get to zone type first */
|
/* try to get to zone type first */
|
||||||
switch (obj->type)
|
switch (obj->type)
|
||||||
{
|
{
|
||||||
case E_WIN_TYPE:
|
|
||||||
ewin = (E_Win*)obj;
|
|
||||||
return ewin->comp;
|
|
||||||
case E_DESK_TYPE:
|
case E_DESK_TYPE:
|
||||||
desk = (E_Desk*)obj;
|
desk = (E_Desk*)obj;
|
||||||
obj = (void*)desk->zone;
|
obj = (void*)desk->zone;
|
||||||
|
@ -1486,6 +1481,11 @@ e_comp_get(const void *o)
|
||||||
if (!man) man = (E_Manager*)obj;
|
if (!man) man = (E_Manager*)obj;
|
||||||
return man->comp;
|
return man->comp;
|
||||||
}
|
}
|
||||||
|
if (e_obj_is_win(obj))
|
||||||
|
{
|
||||||
|
ec = e_win_client_get((void*)obj);
|
||||||
|
return e_comp_get(ec);
|
||||||
|
}
|
||||||
CRI("UNIMPLEMENTED TYPE PASSED! FIXME!");
|
CRI("UNIMPLEMENTED TYPE PASSED! FIXME!");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1649,6 +1649,7 @@ e_comp_e_object_layer_get(const E_Object *obj)
|
||||||
E_Gadcon *gc = NULL;
|
E_Gadcon *gc = NULL;
|
||||||
|
|
||||||
if (!obj) return 0;
|
if (!obj) return 0;
|
||||||
|
|
||||||
switch (obj->type)
|
switch (obj->type)
|
||||||
{
|
{
|
||||||
case E_GADCON_CLIENT_TYPE:
|
case E_GADCON_CLIENT_TYPE:
|
||||||
|
@ -1659,10 +1660,7 @@ e_comp_e_object_layer_get(const E_Object *obj)
|
||||||
if (!gc) gc = (E_Gadcon *)obj;
|
if (!gc) gc = (E_Gadcon *)obj;
|
||||||
if (gc->shelf) return gc->shelf->layer;
|
if (gc->shelf) return gc->shelf->layer;
|
||||||
if (!gc->toolbar) return E_LAYER_DESKTOP;
|
if (!gc->toolbar) return E_LAYER_DESKTOP;
|
||||||
return gc->toolbar->fwin->client->layer;
|
return e_win_client_get(gc->toolbar->fwin)->layer;
|
||||||
|
|
||||||
case E_WIN_TYPE:
|
|
||||||
return ((E_Win *)(obj))->client->layer;
|
|
||||||
|
|
||||||
case E_ZONE_TYPE:
|
case E_ZONE_TYPE:
|
||||||
return E_LAYER_DESKTOP;
|
return E_LAYER_DESKTOP;
|
||||||
|
@ -1674,6 +1672,8 @@ e_comp_e_object_layer_get(const E_Object *obj)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (e_obj_is_win(obj))
|
||||||
|
return e_win_client_get((void*)obj)->layer;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,8 +188,8 @@ EAPI void e_comp_client_redirect_toggle(E_Client *ec);
|
||||||
EAPI Eina_Bool e_comp_util_object_is_above_nocomp(Evas_Object *obj);
|
EAPI Eina_Bool e_comp_util_object_is_above_nocomp(Evas_Object *obj);
|
||||||
|
|
||||||
EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source);
|
EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source);
|
||||||
EAPI E_Config_Dialog *e_int_config_comp(E_Comp *comp, const char *params);
|
EAPI E_Config_Dialog *e_int_config_comp(Evas_Object *parent, const char *params);
|
||||||
EAPI E_Config_Dialog *e_int_config_comp_match(E_Comp *comp, const char *params);
|
EAPI E_Config_Dialog *e_int_config_comp_match(Evas_Object *parent, const char *params);
|
||||||
|
|
||||||
static inline E_Comp *
|
static inline E_Comp *
|
||||||
e_comp_util_evas_object_comp_get(Evas_Object *obj)
|
e_comp_util_evas_object_comp_get(Evas_Object *obj)
|
||||||
|
|
|
@ -1931,6 +1931,8 @@ _e_comp_smart_hide(Evas_Object *obj)
|
||||||
evas_object_hide(cw->clip);
|
evas_object_hide(cw->clip);
|
||||||
if (cw->input_obj) evas_object_hide(cw->input_obj);
|
if (cw->input_obj) evas_object_hide(cw->input_obj);
|
||||||
evas_object_hide(cw->effect_obj);
|
evas_object_hide(cw->effect_obj);
|
||||||
|
if (cw->ec->internal_elm_win)
|
||||||
|
evas_object_hide(cw->ec->internal_elm_win);
|
||||||
if (stopping) return;
|
if (stopping) return;
|
||||||
/* ensure focus-out */
|
/* ensure focus-out */
|
||||||
if (cw->ec->focused)
|
if (cw->ec->focused)
|
||||||
|
@ -1959,6 +1961,8 @@ _e_comp_smart_show(Evas_Object *obj)
|
||||||
evas_object_show(cw->clip);
|
evas_object_show(cw->clip);
|
||||||
if (cw->input_obj) evas_object_show(cw->input_obj);
|
if (cw->input_obj) evas_object_show(cw->input_obj);
|
||||||
evas_object_show(cw->effect_obj);
|
evas_object_show(cw->effect_obj);
|
||||||
|
if (cw->ec->internal_elm_win)
|
||||||
|
evas_object_show(cw->ec->internal_elm_win);
|
||||||
e_comp_render_queue(cw->comp);
|
e_comp_render_queue(cw->comp);
|
||||||
e_comp_shape_queue(cw->comp);
|
e_comp_shape_queue(cw->comp);
|
||||||
if (cw->ec->input_only) return;
|
if (cw->ec->input_only) return;
|
||||||
|
@ -2560,42 +2564,20 @@ e_comp_object_util_zone_get(Evas_Object *obj)
|
||||||
int x, y;
|
int x, y;
|
||||||
E_Comp *c;
|
E_Comp *c;
|
||||||
|
|
||||||
|
if (e_win_client_get(obj))
|
||||||
|
return e_win_client_get(obj)->zone;
|
||||||
c = e_comp_util_evas_object_comp_get(obj);
|
c = e_comp_util_evas_object_comp_get(obj);
|
||||||
if (c)
|
if (c)
|
||||||
{
|
{
|
||||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||||
zone = e_comp_zone_xy_get(c, x, y);
|
zone = e_comp_zone_xy_get(c, x, y);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
|
||||||
if (ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (win)
|
|
||||||
{
|
|
||||||
if (win->client)
|
|
||||||
zone = win->client->zone;
|
|
||||||
else
|
|
||||||
zone = e_comp_zone_xy_get(NULL, win->x, win->y);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
|
|
||||||
zone = e_comp_zone_xy_get(NULL, x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||||
zone = e_comp_zone_xy_get(NULL, x, y);
|
zone = e_comp_zone_xy_get(NULL, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return zone;
|
return zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2002,7 +2002,7 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
|
||||||
ec->comp_data->first_damage = ((ec->internal) || (ec->override));
|
ec->comp_data->first_damage = ((ec->internal) || (ec->override));
|
||||||
|
|
||||||
if ((!e_client_util_ignored_get(ec)) &&
|
if ((!e_client_util_ignored_get(ec)) &&
|
||||||
(!ec->internal) && (!ec->internal_ecore_evas))
|
(!ec->internal))
|
||||||
{
|
{
|
||||||
ec->comp_data->need_reparent = EINA_TRUE;
|
ec->comp_data->need_reparent = EINA_TRUE;
|
||||||
ec->take_focus = !starting;
|
ec->take_focus = !starting;
|
||||||
|
@ -2127,7 +2127,7 @@ _e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec)
|
||||||
|
|
||||||
if (ec->visible)
|
if (ec->visible)
|
||||||
{
|
{
|
||||||
if ((ec->comp_data->set_win_type) && (ec->internal_ecore_evas))
|
if ((ec->comp_data->set_win_type) && (ec->internal_elm_win))
|
||||||
{
|
{
|
||||||
int type = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
|
int type = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
|
||||||
|
|
||||||
|
@ -2155,7 +2155,7 @@ _e_comp_wl_client_cb_pre_frame(void *data EINA_UNUSED, E_Client *ec)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_evas_wayland_type_set(ec->internal_ecore_evas, type);
|
ecore_evas_wayland_type_set(e_win_ee_get(ec->internal_elm_win), type);
|
||||||
ec->comp_data->set_win_type = EINA_FALSE;
|
ec->comp_data->set_win_type = EINA_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ _e_comp_x_client_new_helper(E_Client *ec)
|
||||||
e_object_del(E_OBJECT(ec));
|
e_object_del(E_OBJECT(ec));
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_ecore_evas))
|
if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_elm_win))
|
||||||
{
|
{
|
||||||
ec->comp_data->need_reparent = 1;
|
ec->comp_data->need_reparent = 1;
|
||||||
EC_CHANGED(ec);
|
EC_CHANGED(ec);
|
||||||
|
@ -459,8 +459,8 @@ _e_comp_x_client_find_by_alarm(Ecore_X_Sync_Alarm al)
|
||||||
static void
|
static void
|
||||||
_e_comp_x_client_move_resize_send(E_Client *ec)
|
_e_comp_x_client_move_resize_send(E_Client *ec)
|
||||||
{
|
{
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
ecore_evas_managed_move(ec->internal_ecore_evas, ec->client.x - ec->x, ec->client.y - ec->y);
|
ecore_evas_managed_move(e_win_ee_get(ec->internal_elm_win), ec->client.x - ec->x, ec->client.y - ec->y);
|
||||||
|
|
||||||
ecore_x_icccm_move_resize_send(e_client_util_win_get(ec), ec->client.x, ec->client.y, ec->client.w, ec->client.h);
|
ecore_x_icccm_move_resize_send(e_client_util_win_get(ec), ec->client.x, ec->client.y, ec->client.w, ec->client.h);
|
||||||
}
|
}
|
||||||
|
@ -1166,7 +1166,7 @@ _e_comp_x_show_helper(E_Client *ec)
|
||||||
/* this is most likely an internal window */
|
/* this is most likely an internal window */
|
||||||
ec->comp_data->need_reparent = 1;
|
ec->comp_data->need_reparent = 1;
|
||||||
ec->visible = 1;
|
ec->visible = 1;
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
ec->take_focus = 1;
|
ec->take_focus = 1;
|
||||||
EC_CHANGED(ec);
|
EC_CHANGED(ec);
|
||||||
}
|
}
|
||||||
|
@ -1191,7 +1191,7 @@ _e_comp_x_show_helper(E_Client *ec)
|
||||||
else
|
else
|
||||||
evas_object_show(ec->frame);
|
evas_object_show(ec->frame);
|
||||||
ec->comp_data->first_map = 1;
|
ec->comp_data->first_map = 1;
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
{
|
{
|
||||||
_e_comp_x_post_client_idler_add(ec);
|
_e_comp_x_post_client_idler_add(ec);
|
||||||
ec->post_move = 1;
|
ec->post_move = 1;
|
||||||
|
@ -2252,8 +2252,8 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event
|
||||||
if (resize)
|
if (resize)
|
||||||
{
|
{
|
||||||
evas_object_resize(ec->frame, ec->w, ec->h);
|
evas_object_resize(ec->frame, ec->w, ec->h);
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
ecore_evas_move_resize(ec->internal_ecore_evas, 0, 0, ec->client.w, ec->client.h);
|
evas_object_resize(ec->internal_elm_win, ec->client.w, ec->client.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_x_pointer_xy_get(ec->comp->man->root,
|
ecore_x_pointer_xy_get(ec->comp->man->root,
|
||||||
|
@ -2637,29 +2637,19 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec)
|
||||||
{
|
{
|
||||||
Ecore_X_Atom state[1];
|
Ecore_X_Atom state[1];
|
||||||
int num = 0;
|
int num = 0;
|
||||||
E_Win *win = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win");
|
|
||||||
|
|
||||||
if (win->state.centered)
|
if (e_win_centered_get(ec->internal_elm_win))
|
||||||
state[num++] = E_ATOM_WINDOW_STATE_CENTERED;
|
state[num++] = E_ATOM_WINDOW_STATE_CENTERED;
|
||||||
|
|
||||||
if (num)
|
if (num)
|
||||||
ecore_x_window_prop_card32_set(win->evas_win, E_ATOM_WINDOW_STATE, state, num);
|
ecore_x_window_prop_card32_set(elm_win_window_id_get(ec->internal_elm_win), E_ATOM_WINDOW_STATE, state, num);
|
||||||
else
|
else
|
||||||
ecore_x_window_prop_property_del(win->evas_win, E_ATOM_WINDOW_STATE);
|
ecore_x_window_prop_property_del(elm_win_window_id_get(ec->internal_elm_win), E_ATOM_WINDOW_STATE);
|
||||||
ec->changes.internal_state = 0;
|
ec->changes.internal_state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ec->changes.internal_props)
|
if (ec->changes.internal_props)
|
||||||
{
|
{
|
||||||
E_Win *win = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win");
|
|
||||||
|
|
||||||
ecore_x_icccm_size_pos_hints_set(win->evas_win,
|
|
||||||
win->placed, ECORE_X_GRAVITY_NW,
|
|
||||||
win->min_w, win->min_h,
|
|
||||||
win->max_w, win->max_h,
|
|
||||||
win->base_w, win->base_h,
|
|
||||||
win->step_x, win->step_y,
|
|
||||||
win->min_aspect, win->max_aspect);
|
|
||||||
ec->changes.internal_props = 0;
|
ec->changes.internal_props = 0;
|
||||||
ec->comp_data->internal_props_set++;
|
ec->comp_data->internal_props_set++;
|
||||||
}
|
}
|
||||||
|
@ -2739,7 +2729,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
|
||||||
ecore_x_window_shape_input_rectangles_set(pwin, (Ecore_X_Rectangle*)ec->shape_input_rects, ec->shape_input_rects_num);
|
ecore_x_window_shape_input_rectangles_set(pwin, (Ecore_X_Rectangle*)ec->shape_input_rects, ec->shape_input_rects_num);
|
||||||
ec->changes.shape = 1;
|
ec->changes.shape = 1;
|
||||||
ec->changes.shape_input = 1;
|
ec->changes.shape_input = 1;
|
||||||
if (ec->internal_ecore_evas)
|
if (ec->internal_elm_win)
|
||||||
{
|
{
|
||||||
ecore_x_window_gravity_set(win, ECORE_X_GRAVITY_NW);
|
ecore_x_window_gravity_set(win, ECORE_X_GRAVITY_NW);
|
||||||
ec->changes.reset_gravity = 1;
|
ec->changes.reset_gravity = 1;
|
||||||
|
@ -2750,17 +2740,12 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec)
|
||||||
|
|
||||||
if (ec->visible)
|
if (ec->visible)
|
||||||
{
|
{
|
||||||
if (ec->comp_data->set_win_type && ec->internal_ecore_evas)
|
if (ec->comp_data->set_win_type && ec->internal_elm_win)
|
||||||
{
|
|
||||||
E_Win *ewin = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win");
|
|
||||||
|
|
||||||
if (ewin)
|
|
||||||
{
|
{
|
||||||
if (ec->dialog)
|
if (ec->dialog)
|
||||||
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_DIALOG);
|
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_DIALOG);
|
||||||
else
|
else
|
||||||
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL);
|
ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL);
|
||||||
}
|
|
||||||
ec->comp_data->set_win_type = 0;
|
ec->comp_data->set_win_type = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1764,7 +1764,7 @@ _e_config_mv_error(const char *from, const char *to)
|
||||||
e_dialog_text_set(dia, buf);
|
e_dialog_text_set(dia, buf);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia),
|
e_object_del_attach_func_set(E_OBJECT(dia),
|
||||||
_e_config_error_dialog_cb_delete);
|
_e_config_error_dialog_cb_delete);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
@ -2408,7 +2408,7 @@ _e_config_eet_close_handle(Eet_File *ef, char *file)
|
||||||
e_dialog_text_set(dia, buf);
|
e_dialog_text_set(dia, buf);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia),
|
e_object_del_attach_func_set(E_OBJECT(dia),
|
||||||
_e_config_error_dialog_cb_delete);
|
_e_config_error_dialog_cb_delete);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
|
@ -21,7 +21,7 @@ static Eina_List *_e_config_dialog_list = NULL;
|
||||||
/**
|
/**
|
||||||
* Creates a new dialog
|
* Creates a new dialog
|
||||||
*
|
*
|
||||||
* @param c the compositor the dialog will be added to
|
* @param parent the parent dialog
|
||||||
* @param title to display for the dialog
|
* @param title to display for the dialog
|
||||||
* @param name the name used to register the window in e
|
* @param name the name used to register the window in e
|
||||||
* @param class the call used to register the window in e
|
* @param class the call used to register the window in e
|
||||||
|
@ -32,14 +32,14 @@ static Eina_List *_e_config_dialog_list = NULL;
|
||||||
* @return returns the created dialog. Null on failure
|
* @return returns the created dialog. Null on failure
|
||||||
*/
|
*/
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
e_config_dialog_new(E_Comp *c, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data)
|
e_config_dialog_new(Evas_Object *parent, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
|
||||||
cfd = E_OBJECT_ALLOC(E_Config_Dialog, E_CONFIG_DIALOG_TYPE,
|
cfd = E_OBJECT_ALLOC(E_Config_Dialog, E_CONFIG_DIALOG_TYPE,
|
||||||
_e_config_dialog_free);
|
_e_config_dialog_free);
|
||||||
cfd->view = view;
|
cfd->view = view;
|
||||||
cfd->comp = c;
|
cfd->parent = parent;
|
||||||
cfd->title = eina_stringshare_add(title);
|
cfd->title = eina_stringshare_add(title);
|
||||||
cfd->name = eina_stringshare_add(name);
|
cfd->name = eina_stringshare_add(name);
|
||||||
cfd->class = eina_stringshare_add(class);
|
cfd->class = eina_stringshare_add(class);
|
||||||
|
@ -104,23 +104,25 @@ e_config_dialog_find(const char *name, const char *class)
|
||||||
(!e_util_strcmp(class, cfd->class)))
|
(!e_util_strcmp(class, cfd->class)))
|
||||||
{
|
{
|
||||||
E_Zone *z;
|
E_Zone *z;
|
||||||
|
E_Client *ec;
|
||||||
|
|
||||||
z = e_util_zone_current_get(e_manager_current_get());
|
z = e_util_zone_current_get(e_manager_current_get());
|
||||||
e_client_uniconify(cfd->dia->win->client);
|
ec = e_win_client_get(cfd->dia->win);
|
||||||
e_win_raise(cfd->dia->win);
|
e_client_uniconify(ec);
|
||||||
if (z->comp == cfd->dia->win->client->zone->comp)
|
elm_win_raise(cfd->dia->win);
|
||||||
e_client_desk_set(cfd->dia->win->client, e_desk_current_get(z));
|
if (z->comp == ec->zone->comp)
|
||||||
|
e_client_desk_set(ec, e_desk_current_get(z));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!cfd->dia->win->client->sticky)
|
if (!ec->sticky)
|
||||||
e_desk_show(cfd->dia->win->client->desk);
|
e_desk_show(ec->desk);
|
||||||
e_util_pointer_center(cfd->dia->win->client);
|
e_util_pointer_center(ec);
|
||||||
}
|
}
|
||||||
if (cfd->dia->win->client->shaded || cfd->dia->win->client->shading)
|
if (ec->shaded || ec->shading)
|
||||||
e_client_unshade(cfd->dia->win->client, cfd->dia->win->client->shade_dir);
|
e_client_unshade(ec, ec->shade_dir);
|
||||||
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))
|
||||||
evas_object_focus_set(cfd->dia->win->client->frame, 1);
|
evas_object_focus_set(ec->frame, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,9 +193,9 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
||||||
if (!pdia) /* creating window for the first time */
|
if (!pdia) /* creating window for the first time */
|
||||||
{
|
{
|
||||||
if ((cfd->view->normal_win) || (e_config->cfgdlg_normal_wins))
|
if ((cfd->view->normal_win) || (e_config->cfgdlg_normal_wins))
|
||||||
cfd->dia = e_dialog_normal_win_new(cfd->comp, cfd->name, buf);
|
cfd->dia = e_dialog_normal_win_new(cfd->parent, cfd->name, buf);
|
||||||
else
|
else
|
||||||
cfd->dia = e_dialog_new(cfd->comp, cfd->name, buf);
|
cfd->dia = e_dialog_new(cfd->parent, cfd->name, buf);
|
||||||
e_object_del_attach_func_set(E_OBJECT(cfd->dia),
|
e_object_del_attach_func_set(E_OBJECT(cfd->dia),
|
||||||
_e_config_dialog_cb_dialog_del);
|
_e_config_dialog_cb_dialog_del);
|
||||||
} /* window was created before - deleting content only */
|
} /* window was created before - deleting content only */
|
||||||
|
@ -207,7 +209,7 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
||||||
if (cfd->view->create_cfdata && (!cfd->cfdata))
|
if (cfd->view->create_cfdata && (!cfd->cfdata))
|
||||||
cfd->cfdata = cfd->view->create_cfdata(cfd);
|
cfd->cfdata = cfd->view->create_cfdata(cfd);
|
||||||
|
|
||||||
evas = e_win_evas_get(cfd->dia->win);
|
evas = evas_object_evas_get(cfd->dia->win);
|
||||||
if (type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
if (type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
|
||||||
{
|
{
|
||||||
if (cfd->view->advanced.create_widgets)
|
if (cfd->view->advanced.create_widgets)
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct _E_Config_Dialog
|
||||||
E_Config_Dialog_CFData_Type view_type;
|
E_Config_Dialog_CFData_Type view_type;
|
||||||
E_Config_Dialog_View *view;
|
E_Config_Dialog_View *view;
|
||||||
E_Config_Dialog_Data *cfdata;
|
E_Config_Dialog_Data *cfdata;
|
||||||
E_Comp *comp;
|
Evas_Object *parent;
|
||||||
const char *title;
|
const char *title;
|
||||||
const char *icon;
|
const char *icon;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -55,7 +55,7 @@ struct _E_Config_Dialog
|
||||||
unsigned char cfg_changed_auto : 1;
|
unsigned char cfg_changed_auto : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Config_Dialog *e_config_dialog_new(E_Comp *c, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data);
|
EAPI E_Config_Dialog *e_config_dialog_new(Evas_Object *parent, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data);
|
||||||
EAPI int e_config_dialog_find(const char *name, const char *class);
|
EAPI int e_config_dialog_find(const char *name, const char *class);
|
||||||
EAPI E_Config_Dialog *e_config_dialog_get(const char *name, const char *class);
|
EAPI E_Config_Dialog *e_config_dialog_get(const char *name, const char *class);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ static void _e_configure_menu_add(void *data, E_Menu *m);
|
||||||
static void _e_configure_efreet_desktop_cleanup(void);
|
static void _e_configure_efreet_desktop_cleanup(void);
|
||||||
static void _e_configure_efreet_desktop_update(void);
|
static void _e_configure_efreet_desktop_update(void);
|
||||||
static Eina_Bool _e_configure_cb_efreet_desktop_cache_update(void *data, int type, void *event);
|
static Eina_Bool _e_configure_cb_efreet_desktop_cache_update(void *data, int type, void *event);
|
||||||
static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), void (*generic_func)(E_Comp *c, const char *params), Efreet_Desktop *desktop, const char *params);
|
static void _e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), void (*generic_func)(Evas_Object *parent, const char *params), Efreet_Desktop *desktop, const char *params);
|
||||||
static void _e_configure_registry_item_free(E_Configure_It *eci);
|
static void _e_configure_registry_item_free(E_Configure_It *eci);
|
||||||
|
|
||||||
static void _configure_job(void *data);
|
static void _configure_job(void *data);
|
||||||
|
@ -47,7 +47,7 @@ e_configure_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_configure_registry_call(const char *path, E_Comp *c, const char *params)
|
e_configure_registry_call(const char *path, Evas_Object *parent, const char *params)
|
||||||
{
|
{
|
||||||
E_Configure_Cat *ecat;
|
E_Configure_Cat *ecat;
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
@ -58,7 +58,6 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params)
|
||||||
cat = ecore_file_dir_get(path);
|
cat = ecore_file_dir_get(path);
|
||||||
if (!cat) return;
|
if (!cat) return;
|
||||||
item = ecore_file_file_get(path);
|
item = ecore_file_file_get(path);
|
||||||
if (!c) c = e_comp_get(NULL);
|
|
||||||
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
|
EINA_LIST_FOREACH(e_configure_registry, l, ecat)
|
||||||
if (!strcmp(cat, ecat->cat))
|
if (!strcmp(cat, ecat->cat))
|
||||||
{
|
{
|
||||||
|
@ -70,16 +69,16 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params)
|
||||||
{
|
{
|
||||||
if (!params) params = eci->params;
|
if (!params) params = eci->params;
|
||||||
|
|
||||||
if (eci->func) eci->func(c, params);
|
if (eci->func) eci->func(parent, params);
|
||||||
else if (eci->generic_func)
|
else if (eci->generic_func)
|
||||||
eci->generic_func(c, params);
|
eci->generic_func(parent, params);
|
||||||
else if (eci->desktop)
|
else if (eci->desktop)
|
||||||
{
|
{
|
||||||
if (custom_desktop_exec.func)
|
if (custom_desktop_exec.func)
|
||||||
custom_desktop_exec.func(custom_desktop_exec.data,
|
custom_desktop_exec.func(custom_desktop_exec.data,
|
||||||
c, params, eci->desktop);
|
e_comp_get(NULL), params, eci->desktop);
|
||||||
else
|
else
|
||||||
e_exec(e_util_zone_current_get(c->man),
|
e_exec(e_zone_current_get(e_comp_get(NULL)),
|
||||||
eci->desktop, NULL, NULL, "config");
|
eci->desktop, NULL, NULL, "config");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -90,19 +89,19 @@ e_configure_registry_call(const char *path, E_Comp *c, const char *params)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params))
|
e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params))
|
||||||
{
|
{
|
||||||
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, NULL);
|
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func)(E_Comp *c, const char *params))
|
e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func)(Evas_Object *parent, const char *params))
|
||||||
{
|
{
|
||||||
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, NULL, generic_func, NULL, NULL);
|
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, NULL, generic_func, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), const char *params)
|
e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), const char *params)
|
||||||
{
|
{
|
||||||
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, params);
|
_e_configure_registry_item_full_add(path, pri, label, icon_file, icon, func, NULL, NULL, params);
|
||||||
}
|
}
|
||||||
|
@ -272,9 +271,9 @@ e_configure_registry_exists(const char *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_menu_module_item_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_e_configure_menu_module_item_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
e_int_config_modules(m->zone->comp, NULL);
|
e_int_config_modules(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -467,7 +466,7 @@ _e_configure_compare_pri_cb(E_Configure_It *eci, E_Configure_It *eci2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(E_Comp *c, const char *params), void (*generic_func)(E_Comp *c, const char *params), Efreet_Desktop *desktop, const char *params)
|
_e_configure_registry_item_full_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func)(Evas_Object *parent, const char *params), void (*generic_func)(Evas_Object *parent, const char *params), Efreet_Desktop *desktop, const char *params)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
char *cat;
|
char *cat;
|
||||||
|
|
|
@ -25,18 +25,18 @@ struct _E_Configure_It
|
||||||
const char *icon_file;
|
const char *icon_file;
|
||||||
const char *icon;
|
const char *icon;
|
||||||
const char *params;
|
const char *params;
|
||||||
E_Config_Dialog *(*func) (E_Comp *c, const char *params);
|
E_Config_Dialog *(*func) (Evas_Object *parent, const char *params);
|
||||||
void (*generic_func) (E_Comp *c, const char *params);
|
void (*generic_func) (Evas_Object *parent, const char *params);
|
||||||
Efreet_Desktop *desktop;
|
Efreet_Desktop *desktop;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI void e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params));
|
EAPI void e_configure_registry_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (Evas_Object *parent, const char *params));
|
||||||
EAPI void e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (E_Comp *c, const char *params), const char *params);
|
EAPI void e_configure_registry_item_params_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, E_Config_Dialog *(*func) (Evas_Object *parent, const char *params), const char *params);
|
||||||
EAPI void e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (E_Comp *c, const char *params));
|
EAPI void e_configure_registry_generic_item_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon, void (*generic_func) (Evas_Object *parent, const char *params));
|
||||||
EAPI void e_configure_registry_item_del(const char *path);
|
EAPI void e_configure_registry_item_del(const char *path);
|
||||||
EAPI void e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon);
|
EAPI void e_configure_registry_category_add(const char *path, int pri, const char *label, const char *icon_file, const char *icon);
|
||||||
EAPI void e_configure_registry_category_del(const char *path);
|
EAPI void e_configure_registry_category_del(const char *path);
|
||||||
EAPI void e_configure_registry_call(const char *path, E_Comp *c, const char *params);
|
EAPI void e_configure_registry_call(const char *path, Evas_Object *parent, const char *params);
|
||||||
EAPI int e_configure_registry_exists(const char *path);
|
EAPI int e_configure_registry_exists(const char *path);
|
||||||
EAPI void e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *data, E_Comp *c, const char *params, Efreet_Desktop *desktop), const void *data);
|
EAPI void e_configure_registry_custom_desktop_exec_callback_set(void (*func) (const void *data, E_Comp *c, const char *params, Efreet_Desktop *desktop), const void *data);
|
||||||
EINTERN void e_configure_init(void);
|
EINTERN void e_configure_init(void);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
/******** private function definitions **********/
|
/******** private function definitions **********/
|
||||||
static void _e_confirm_dialog_free(E_Confirm_Dialog *cd);
|
static void _e_confirm_dialog_free(E_Confirm_Dialog *cd);
|
||||||
static void _e_confirm_dialog_delete(E_Win *win);
|
static void _e_confirm_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||||
static void _e_confirm_dialog_yes(void *data, E_Dialog *dia);
|
static void _e_confirm_dialog_yes(void *data, E_Dialog *dia);
|
||||||
static void _e_confirm_dialog_no(void *data, E_Dialog *dia);
|
static void _e_confirm_dialog_no(void *data, E_Dialog *dia);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ e_confirm_dialog_show(const char *title, const char *icon, const char *text,
|
||||||
dia->data = cd;
|
dia->data = cd;
|
||||||
cd->dia = dia;
|
cd->dia = dia;
|
||||||
|
|
||||||
e_win_delete_callback_set(dia->win, _e_confirm_dialog_delete);
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_confirm_dialog_delete, dia);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _dia_del);
|
||||||
|
|
||||||
if (title) e_dialog_title_set(dia, title);
|
if (title) e_dialog_title_set(dia, title);
|
||||||
|
@ -53,7 +53,7 @@ e_confirm_dialog_show(const char *title, const char *icon, const char *text,
|
||||||
e_dialog_button_add(dia, !button2_text ? _("No") : button2_text, NULL, _e_confirm_dialog_no, cd);
|
e_dialog_button_add(dia, !button2_text ? _("No") : button2_text, NULL, _e_confirm_dialog_no, cd);
|
||||||
|
|
||||||
e_dialog_button_focus_num(dia, 1);
|
e_dialog_button_focus_num(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
return cd;
|
return cd;
|
||||||
|
@ -103,11 +103,8 @@ _e_confirm_dialog_no(void *data, E_Dialog *dia __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_confirm_dialog_delete(E_Win *win)
|
_e_confirm_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
e_object_del(dia->data);
|
e_object_del(dia->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ e_desklock_show(Eina_Bool suspend)
|
||||||
|
|
||||||
zone = e_util_zone_current_get(e_manager_current_get());
|
zone = e_util_zone_current_get(e_manager_current_get());
|
||||||
if (zone)
|
if (zone)
|
||||||
e_configure_registry_call("screen/screen_lock", zone->comp, NULL);
|
e_configure_registry_call("screen/screen_lock", NULL, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@ _e_desklock_ask_presentation_mode(void)
|
||||||
|
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_widget_list_homogeneous_set(dia->box_object, 0);
|
e_widget_list_homogeneous_set(dia->box_object, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
|
evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
|
||||||
|
|
|
@ -245,7 +245,7 @@ e_desktop_edit(E_Comp *c, Efreet_Desktop *desktop)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c)
|
_e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ _e_desktop_edit_view_create(E_Desktop_Edit *editor, E_Comp *c)
|
||||||
v->basic.check_changed = _e_desktop_edit_basic_check_changed;
|
v->basic.check_changed = _e_desktop_edit_basic_check_changed;
|
||||||
|
|
||||||
editor->cfd =
|
editor->cfd =
|
||||||
e_config_dialog_new(c, _("Desktop Entry Editor"), "E",
|
e_config_dialog_new(NULL, _("Desktop Entry Editor"), "E",
|
||||||
"applications/new_application",
|
"applications/new_application",
|
||||||
"preferences-applications", 0, v, editor);
|
"preferences-applications", 0, v, editor);
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd)
|
||||||
|
|
||||||
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
||||||
if (!cfdata) return NULL;
|
if (!cfdata) return NULL;
|
||||||
cfd->dia->win->state.no_reopen = EINA_TRUE;
|
e_win_no_reopen_set(cfd->dia->win, 1);
|
||||||
cfdata->editor = cfd->data;
|
cfdata->editor = cfd->data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -822,7 +822,7 @@ _e_desktop_edit_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas
|
||||||
e_widget_toolbook_page_show(otb, 0);
|
e_widget_toolbook_page_show(otb, 0);
|
||||||
|
|
||||||
e_util_win_auto_resize_fill(cfd->dia->win);
|
e_util_win_auto_resize_fill(cfd->dia->win);
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
|
|
||||||
return otb;
|
return otb;
|
||||||
}
|
}
|
||||||
|
@ -844,7 +844,7 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2)
|
||||||
|
|
||||||
if (editor->icon_fsel_dia) return;
|
if (editor->icon_fsel_dia) return;
|
||||||
|
|
||||||
dia = e_dialog_new(cfdata->editor->cfd->comp, "E", "_eap_icon_select_dialog");
|
dia = e_dialog_new(NULL, "E", "_eap_icon_select_dialog");
|
||||||
if (!dia) return;
|
if (!dia) return;
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia),
|
e_object_del_attach_func_set(E_OBJECT(dia),
|
||||||
_e_desktop_edit_cb_icon_select_destroy);
|
_e_desktop_edit_cb_icon_select_destroy);
|
||||||
|
@ -868,14 +868,14 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2)
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
o = e_widget_fsel_add(dia->win->evas, "/", path, NULL, NULL,
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", path, NULL, NULL,
|
||||||
_e_desktop_edit_select_cb, cfdata,
|
_e_desktop_edit_select_cb, cfdata,
|
||||||
NULL, cfdata, 1);
|
NULL, cfdata, 1);
|
||||||
free(path);
|
free(path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL,
|
||||||
_e_desktop_edit_select_cb, cfdata,
|
_e_desktop_edit_select_cb, cfdata,
|
||||||
NULL, cfdata, 1);
|
NULL, cfdata, 1);
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ _e_desktop_editor_cb_icon_select(void *data1, void *data2)
|
||||||
_e_desktop_edit_cb_icon_select_ok, cfdata);
|
_e_desktop_edit_cb_icon_select_ok, cfdata);
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL,
|
e_dialog_button_add(dia, _("Cancel"), NULL,
|
||||||
_e_desktop_edit_cb_icon_select_cancel, cfdata);
|
_e_desktop_edit_cb_icon_select_cancel, cfdata);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
editor->icon_fsel_dia = dia;
|
editor->icon_fsel_dia = dia;
|
||||||
}
|
}
|
||||||
|
@ -910,7 +910,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2)
|
||||||
|
|
||||||
if (editor->exec_fsel_dia) return;
|
if (editor->exec_fsel_dia) return;
|
||||||
|
|
||||||
dia = e_dialog_new(cfdata->editor->cfd->comp, "E", "_eap_exec_select_dialog");
|
dia = e_dialog_new(NULL, "E", "_eap_exec_select_dialog");
|
||||||
if (!dia) return;
|
if (!dia) return;
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia),
|
e_object_del_attach_func_set(E_OBJECT(dia),
|
||||||
_e_desktop_edit_cb_exec_select_destroy);
|
_e_desktop_edit_cb_exec_select_destroy);
|
||||||
|
@ -930,7 +930,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2)
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
o = e_widget_fsel_add(dia->win->evas, "/", path, NULL, NULL,
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", path, NULL, NULL,
|
||||||
_e_desktop_edit_select_cb, cfdata,
|
_e_desktop_edit_select_cb, cfdata,
|
||||||
NULL, cfdata, 1);
|
NULL, cfdata, 1);
|
||||||
free(path);
|
free(path);
|
||||||
|
@ -938,7 +938,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL,
|
||||||
_e_desktop_edit_select_cb, cfdata,
|
_e_desktop_edit_select_cb, cfdata,
|
||||||
NULL, cfdata, 1);
|
NULL, cfdata, 1);
|
||||||
}
|
}
|
||||||
|
@ -953,7 +953,7 @@ _e_desktop_editor_cb_exec_select(void *data1, void *data2)
|
||||||
_e_desktop_edit_cb_exec_select_ok, cfdata);
|
_e_desktop_edit_cb_exec_select_ok, cfdata);
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL,
|
e_dialog_button_add(dia, _("Cancel"), NULL,
|
||||||
_e_desktop_edit_cb_exec_select_cancel, cfdata);
|
_e_desktop_edit_cb_exec_select_cancel, cfdata);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
editor->exec_fsel_dia = dia;
|
editor->exec_fsel_dia = dia;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void _e_dialog_free(E_Dialog *dia);
|
static void _e_dialog_free(E_Dialog *dia);
|
||||||
static void _e_dialog_del_func_cb(void *data, E_Dialog *dia);
|
static void _e_dialog_del_func_cb(void *data, E_Dialog *dia);
|
||||||
static void _e_dialog_cb_delete(E_Win *win);
|
static void _e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||||
static void _e_dialog_cb_resize(E_Win *win);
|
|
||||||
static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event);
|
static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event);
|
||||||
static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj);
|
static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj);
|
||||||
|
|
||||||
|
@ -13,47 +12,50 @@ static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj);
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
|
|
||||||
static E_Dialog *
|
static E_Dialog *
|
||||||
_e_dialog_internal_new(E_Comp *c, const char *name, const char *class, int dialog)
|
_e_dialog_internal_new(Evas_Object *parent, const char *name, const char *class, int dialog)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Evas_Modifier_Mask mask;
|
Evas_Modifier_Mask mask;
|
||||||
Eina_Bool kg;
|
Eina_Bool kg;
|
||||||
|
Evas *e;
|
||||||
|
|
||||||
if (!c) c = e_util_comp_current_get();
|
|
||||||
dia = E_OBJECT_ALLOC(E_Dialog, E_DIALOG_TYPE, _e_dialog_free);
|
dia = E_OBJECT_ALLOC(E_Dialog, E_DIALOG_TYPE, _e_dialog_free);
|
||||||
if (!dia) return NULL;
|
if (!dia) return NULL;
|
||||||
dia->win = e_win_new(c);
|
if (dialog)
|
||||||
|
dia->win = elm_win_add(parent, name, ELM_WIN_DIALOG_BASIC);
|
||||||
|
else
|
||||||
|
dia->win = elm_win_add(parent, name, ELM_WIN_BASIC);
|
||||||
if (!dia->win)
|
if (!dia->win)
|
||||||
{
|
{
|
||||||
free(dia);
|
free(dia);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
e_win_delete_callback_set(dia->win, _e_dialog_cb_delete);
|
elm_win_modal_set(dia->win, !!parent);
|
||||||
e_win_resize_callback_set(dia->win, _e_dialog_cb_resize);
|
e = evas_object_evas_get(dia->win);
|
||||||
dia->win->data = dia;
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_dialog_cb_delete, dia);
|
||||||
if (dialog) e_win_dialog_set(dia->win, 1);
|
ecore_evas_name_class_set(ecore_evas_ecore_evas_get(e), name, class);
|
||||||
e_win_name_class_set(dia->win, name, class);
|
dia->bg_object = o = edje_object_add(evas_object_evas_get(dia->win));
|
||||||
o = edje_object_add(e_win_evas_get(dia->win));
|
EXPAND(o);
|
||||||
dia->bg_object = o;
|
FILL(o);
|
||||||
|
elm_win_resize_object_add(dia->win, o);
|
||||||
e_theme_edje_object_set(o, "base/theme/dialog",
|
e_theme_edje_object_set(o, "base/theme/dialog",
|
||||||
"e/widgets/dialog/main");
|
"e/widgets/dialog/main");
|
||||||
evas_object_move(o, 0, 0);
|
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
o = e_widget_list_add(e_win_evas_get(dia->win), 1, 1);
|
o = e_widget_list_add(evas_object_evas_get(dia->win), 1, 1);
|
||||||
e_widget_on_focus_hook_set(o, _e_dialog_cb_wid_on_focus, dia);
|
e_widget_on_focus_hook_set(o, _e_dialog_cb_wid_on_focus, dia);
|
||||||
dia->box_object = o;
|
dia->box_object = o;
|
||||||
edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o);
|
edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
|
|
||||||
o = evas_object_rectangle_add(e_win_evas_get(dia->win));
|
o = evas_object_rectangle_add(e);
|
||||||
dia->event_object = o;
|
dia->event_object = o;
|
||||||
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(dia->win), "Shift");
|
mask = evas_key_modifier_mask_get(evas_object_evas_get(dia->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);
|
||||||
|
@ -76,15 +78,15 @@ _e_dialog_internal_new(E_Comp *c, const char *name, const char *class, int dialo
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Dialog *
|
EAPI E_Dialog *
|
||||||
e_dialog_new(E_Comp *c, const char *name, const char *class)
|
e_dialog_new(Evas_Object *parent, const char *name, const char *class)
|
||||||
{
|
{
|
||||||
return _e_dialog_internal_new(c, name, class, 1);
|
return _e_dialog_internal_new(parent, name, class, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Dialog *
|
EAPI E_Dialog *
|
||||||
e_dialog_normal_win_new(E_Comp *c, const char *name, const char *class)
|
e_dialog_normal_win_new(Evas_Object *parent, const char *name, const char *class)
|
||||||
{
|
{
|
||||||
return _e_dialog_internal_new(c, name, class, 0);
|
return _e_dialog_internal_new(parent, name, class, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -93,7 +95,7 @@ e_dialog_button_add(E_Dialog *dia, const char *label, const char *icon, E_Dialog
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
if (!func) func = _e_dialog_del_func_cb;
|
if (!func) func = _e_dialog_del_func_cb;
|
||||||
o = e_widget_button_add(e_win_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia);
|
o = e_widget_button_add(evas_object_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia);
|
||||||
e_widget_list_object_append(dia->box_object, o, 1, 0, 0.5);
|
e_widget_list_object_append(dia->box_object, o, 1, 0, 0.5);
|
||||||
dia->buttons = eina_list_append(dia->buttons, o);
|
dia->buttons = eina_list_append(dia->buttons, o);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +134,7 @@ e_dialog_button_disable_num_get(E_Dialog *dia, int button)
|
||||||
EAPI void
|
EAPI void
|
||||||
e_dialog_title_set(E_Dialog *dia, const char *title)
|
e_dialog_title_set(E_Dialog *dia, const char *title)
|
||||||
{
|
{
|
||||||
e_win_title_set(dia->win, title);
|
elm_win_title_set(dia->win, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -142,7 +144,7 @@ e_dialog_text_set(E_Dialog *dia, const char *text)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
o = edje_object_add(e_win_evas_get(dia->win));
|
o = edje_object_add(evas_object_evas_get(dia->win));
|
||||||
dia->text_object = o;
|
dia->text_object = o;
|
||||||
e_theme_edje_object_set(o, "base/theme/dialog",
|
e_theme_edje_object_set(o, "base/theme/dialog",
|
||||||
"e/widgets/dialog/text");
|
"e/widgets/dialog/text");
|
||||||
|
@ -170,7 +172,7 @@ e_dialog_icon_set(E_Dialog *dia, const char *icon, Evas_Coord size)
|
||||||
{
|
{
|
||||||
if (!dia->icon_object)
|
if (!dia->icon_object)
|
||||||
{
|
{
|
||||||
dia->icon_object = e_icon_add(e_win_evas_get(dia->win));
|
dia->icon_object = e_icon_add(evas_object_evas_get(dia->win));
|
||||||
edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object);
|
edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object);
|
||||||
evas_object_show(dia->icon_object);
|
evas_object_show(dia->icon_object);
|
||||||
}
|
}
|
||||||
|
@ -188,7 +190,7 @@ e_dialog_border_icon_set(E_Dialog *dia, const char *icon)
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
|
|
||||||
ec = dia->win->client;
|
ec = e_win_client_get(dia->win);
|
||||||
if (ec)
|
if (ec)
|
||||||
eina_stringshare_replace(&ec->internal_icon, icon);
|
eina_stringshare_replace(&ec->internal_icon, icon);
|
||||||
}
|
}
|
||||||
|
@ -202,8 +204,8 @@ e_dialog_content_set(E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coor
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
edje_object_part_swallow(dia->bg_object, "e.swallow.content", obj);
|
edje_object_part_swallow(dia->bg_object, "e.swallow.content", obj);
|
||||||
edje_object_size_min_calc(dia->bg_object, &mw, &mh);
|
edje_object_size_min_calc(dia->bg_object, &mw, &mh);
|
||||||
e_win_resize(dia->win, mw, mh);
|
evas_object_resize(dia->win, mw, mh);
|
||||||
e_win_size_min_set(dia->win, mw, mh);
|
evas_object_size_hint_min_set(dia->bg_object, mw, mh);
|
||||||
dia->min_w = mw;
|
dia->min_w = mw;
|
||||||
dia->min_h = mh;
|
dia->min_h = mh;
|
||||||
evas_object_show(obj);
|
evas_object_show(obj);
|
||||||
|
@ -217,32 +219,21 @@ e_dialog_resizable_set(E_Dialog *dia, int resizable)
|
||||||
{
|
{
|
||||||
if (resizable)
|
if (resizable)
|
||||||
{
|
{
|
||||||
e_win_size_max_set(dia->win, 99999, 99999);
|
evas_object_size_hint_max_set(dia->bg_object, 99999, 99999);
|
||||||
|
evas_object_size_hint_weight_set(dia->bg_object, 1, 1);
|
||||||
e_util_win_auto_resize_fill(dia->win);
|
e_util_win_auto_resize_fill(dia->win);
|
||||||
edje_object_signal_emit(dia->bg_object, "e,state,resizable", "e");
|
edje_object_signal_emit(dia->bg_object, "e,state,resizable", "e");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e_win_resize(dia->win, dia->min_w, dia->min_h);
|
evas_object_resize(dia->win, dia->min_w, dia->min_h);
|
||||||
e_win_size_max_set(dia->win, dia->min_w, dia->min_h);
|
evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
|
||||||
|
evas_object_size_hint_max_set(dia->bg_object, dia->min_w, dia->min_h);
|
||||||
edje_object_signal_emit(dia->bg_object, "e,state,no_resizable", "e");
|
edje_object_signal_emit(dia->bg_object, "e,state,no_resizable", "e");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_dialog_parent_set(E_Dialog *dia, E_Win *win)
|
|
||||||
{
|
|
||||||
if (!dia) return;
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
|
||||||
if (win)
|
|
||||||
ecore_x_icccm_transient_for_set(dia->win->evas_win, win->evas_win);
|
|
||||||
else
|
|
||||||
ecore_x_icccm_transient_for_unset(dia->win->evas_win);
|
|
||||||
#endif
|
|
||||||
ecore_evas_modal_set(dia->win->ecore_evas, !!win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_dialog_show(E_Dialog *dia)
|
e_dialog_show(E_Dialog *dia)
|
||||||
{
|
{
|
||||||
|
@ -263,17 +254,21 @@ e_dialog_show(E_Dialog *dia)
|
||||||
edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o);
|
edje_object_part_swallow(dia->bg_object, "e.swallow.buttons", o);
|
||||||
|
|
||||||
edje_object_size_min_calc(dia->bg_object, &mw, &mh);
|
edje_object_size_min_calc(dia->bg_object, &mw, &mh);
|
||||||
e_win_resize(dia->win, mw, mh);
|
evas_object_size_hint_min_set(dia->bg_object, mw, mh);
|
||||||
e_win_size_min_set(dia->win, mw, mh);
|
evas_object_resize(dia->win, mw, mh);
|
||||||
dia->min_w = mw;
|
dia->min_w = mw;
|
||||||
dia->min_h = mh;
|
dia->min_h = mh;
|
||||||
if (!dia->resizable) e_win_size_max_set(dia->win, mw, mh);
|
if (!dia->resizable)
|
||||||
|
{
|
||||||
|
evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
|
||||||
|
evas_object_size_hint_max_set(dia->bg_object, mw, mh);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e_win_size_max_set(dia->win, 99999, 99999);
|
evas_object_size_hint_max_set(dia->win, 99999, 99999);
|
||||||
e_util_win_auto_resize_fill(dia->win);
|
e_util_win_auto_resize_fill(dia->win);
|
||||||
}
|
}
|
||||||
e_win_show(dia->win);
|
evas_object_show(dia->win);
|
||||||
|
|
||||||
if (!e_widget_focus_get(dia->box_object))
|
if (!e_widget_focus_get(dia->box_object))
|
||||||
e_widget_focus_set(dia->box_object, 1);
|
e_widget_focus_set(dia->box_object, 1);
|
||||||
|
@ -290,7 +285,7 @@ _e_dialog_free(E_Dialog *dia)
|
||||||
if (dia->bg_object) evas_object_del(dia->bg_object);
|
if (dia->bg_object) evas_object_del(dia->bg_object);
|
||||||
if (dia->content_object) evas_object_del(dia->content_object);
|
if (dia->content_object) evas_object_del(dia->content_object);
|
||||||
if (dia->event_object) evas_object_del(dia->event_object);
|
if (dia->event_object) evas_object_del(dia->event_object);
|
||||||
e_object_del(E_OBJECT(dia->win));
|
evas_object_del(dia->win);
|
||||||
free(dia);
|
free(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +305,7 @@ _e_dialog_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
|
||||||
dia = data;
|
dia = data;
|
||||||
if (!strcmp(ev->key, "Tab"))
|
if (!strcmp(ev->key, "Tab"))
|
||||||
{
|
{
|
||||||
if (evas_key_modifier_is_set(evas_key_modifier_get(e_win_evas_get(dia->win)), "Shift"))
|
if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(dia->win)), "Shift"))
|
||||||
{
|
{
|
||||||
if (e_widget_focus_get(dia->box_object))
|
if (e_widget_focus_get(dia->box_object))
|
||||||
{
|
{
|
||||||
|
@ -371,21 +366,9 @@ _e_dialog_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_dialog_cb_delete(E_Win *win)
|
_e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
e_object_del(E_OBJECT(data));
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
e_object_del(E_OBJECT(dia));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_dialog_cb_resize(E_Win *win)
|
|
||||||
{
|
|
||||||
E_Dialog *dia;
|
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
evas_object_resize(dia->bg_object, dia->win->w, dia->win->h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -13,7 +13,7 @@ struct _E_Dialog
|
||||||
{
|
{
|
||||||
E_Object e_obj_inherit;
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
Evas_Object *bg_object;
|
Evas_Object *bg_object;
|
||||||
Evas_Object *box_object;
|
Evas_Object *box_object;
|
||||||
Evas_Object *text_object;
|
Evas_Object *text_object;
|
||||||
|
@ -28,9 +28,8 @@ struct _E_Dialog
|
||||||
|
|
||||||
typedef void (*E_Dialog_Cb)(void *data, E_Dialog *dia);
|
typedef void (*E_Dialog_Cb)(void *data, E_Dialog *dia);
|
||||||
|
|
||||||
EAPI E_Dialog *e_dialog_new (E_Comp *c, const char *name, const char *class);
|
EAPI E_Dialog *e_dialog_new (Evas_Object *parent, const char *name, const char *class);
|
||||||
EAPI E_Dialog *e_dialog_normal_win_new (E_Comp *c, const char *name, const char *class);
|
EAPI E_Dialog *e_dialog_normal_win_new (Evas_Object *parent, const char *name, const char *class);
|
||||||
EAPI void e_dialog_parent_set(E_Dialog *dia, E_Win *win);
|
|
||||||
EAPI void e_dialog_button_add (E_Dialog *dia, const char *label, const char *icon, E_Dialog_Cb func, void *data);
|
EAPI void e_dialog_button_add (E_Dialog *dia, const char *label, const char *icon, E_Dialog_Cb func, void *data);
|
||||||
EAPI int e_dialog_button_focus_num (E_Dialog *dia, int button);
|
EAPI int e_dialog_button_focus_num (E_Dialog *dia, int button);
|
||||||
EAPI int e_dialog_button_disable_num_set (E_Dialog *dia, int button, int disabled);
|
EAPI int e_dialog_button_disable_num_set (E_Dialog *dia, int button, int disabled);
|
||||||
|
|
|
@ -673,7 +673,15 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy)
|
||||||
|
|
||||||
*dx = 0;
|
*dx = 0;
|
||||||
*dy = 0;
|
*dy = 0;
|
||||||
if (h->obj)
|
if (e_obj_is_win(h->obj))
|
||||||
|
{
|
||||||
|
E_Client *ec;
|
||||||
|
|
||||||
|
ec = e_win_client_get((void*)h->obj);
|
||||||
|
px = ec->x;
|
||||||
|
py = ec->y;
|
||||||
|
}
|
||||||
|
else if (h->obj)
|
||||||
{
|
{
|
||||||
switch (h->obj->type)
|
switch (h->obj->type)
|
||||||
{
|
{
|
||||||
|
@ -682,21 +690,19 @@ _e_drag_coords_update(const E_Drop_Handler *h, int *dx, int *dy)
|
||||||
case E_GADCON_TYPE:
|
case E_GADCON_TYPE:
|
||||||
gc = (E_Gadcon *)h->obj;
|
gc = (E_Gadcon *)h->obj;
|
||||||
if (!gc->toolbar) return;
|
if (!gc->toolbar) return;
|
||||||
px = gc->toolbar->fwin->x;
|
evas_object_geometry_get(gc->toolbar->fwin, &px, &py, NULL, NULL);
|
||||||
py = gc->toolbar->fwin->y;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_GADCON_CLIENT_TYPE:
|
case E_GADCON_CLIENT_TYPE:
|
||||||
gc = ((E_Gadcon_Client *)(h->obj))->gadcon;
|
gc = ((E_Gadcon_Client *)(h->obj))->gadcon;
|
||||||
e_gadcon_canvas_zone_geometry_get(gc, &px, &py, NULL, NULL);
|
e_gadcon_canvas_zone_geometry_get(gc, &px, &py, NULL, NULL);
|
||||||
if (!gc->toolbar) break;
|
if (!gc->toolbar) break;
|
||||||
px += gc->toolbar->fwin->x;
|
{
|
||||||
py += gc->toolbar->fwin->y;
|
int x, y;
|
||||||
break;
|
|
||||||
|
|
||||||
case E_WIN_TYPE:
|
evas_object_geometry_get(gc->toolbar->fwin, &x, &y, NULL, NULL);
|
||||||
px = ((E_Win *)(h->obj))->client->x;
|
px += x, py += y;
|
||||||
py = ((E_Win *)(h->obj))->client->y;
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_ZONE_TYPE:
|
case E_ZONE_TYPE:
|
||||||
|
@ -725,6 +731,8 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
|
||||||
{
|
{
|
||||||
Ecore_X_Window hwin = 0;
|
Ecore_X_Window hwin = 0;
|
||||||
|
|
||||||
|
if (e_obj_is_win(h->obj))
|
||||||
|
return elm_win_window_id_get((Evas_Object*)h->obj);
|
||||||
if (h->obj)
|
if (h->obj)
|
||||||
{
|
{
|
||||||
E_Gadcon *gc = NULL;
|
E_Gadcon *gc = NULL;
|
||||||
|
@ -738,7 +746,7 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
|
||||||
case E_GADCON_TYPE:
|
case E_GADCON_TYPE:
|
||||||
if (!gc) gc = (E_Gadcon *)h->obj;
|
if (!gc) gc = (E_Gadcon *)h->obj;
|
||||||
|
|
||||||
if (gc->toolbar) hwin = e_client_util_pwin_get(gc->toolbar->fwin->client); //double check for xdnd...
|
if (gc->toolbar) hwin = e_client_util_pwin_get(e_win_client_get(gc->toolbar->fwin)); //double check for xdnd...
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (xdnd) hwin = e_gadcon_xdnd_window_get(gc);
|
if (xdnd) hwin = e_gadcon_xdnd_window_get(gc);
|
||||||
|
@ -746,10 +754,6 @@ _e_drag_win_get(const E_Drop_Handler *h, int xdnd)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case E_WIN_TYPE:
|
|
||||||
hwin = ((E_Win *)(h->obj))->evas_win;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case E_CLIENT_TYPE:
|
case E_CLIENT_TYPE:
|
||||||
case E_ZONE_TYPE:
|
case E_ZONE_TYPE:
|
||||||
hwin = e_comp_get(h->obj)->ee_win;
|
hwin = e_comp_get(h->obj)->ee_win;
|
||||||
|
@ -780,6 +784,7 @@ _e_drag_win_show(E_Drop_Handler *h)
|
||||||
|
|
||||||
if (h->obj)
|
if (h->obj)
|
||||||
{
|
{
|
||||||
|
if (e_obj_is_win(h->obj)) return;
|
||||||
switch (h->obj->type)
|
switch (h->obj->type)
|
||||||
{
|
{
|
||||||
case E_GADCON_TYPE:
|
case E_GADCON_TYPE:
|
||||||
|
@ -806,6 +811,7 @@ _e_drag_win_hide(E_Drop_Handler *h)
|
||||||
|
|
||||||
if (h->obj)
|
if (h->obj)
|
||||||
{
|
{
|
||||||
|
if (e_obj_is_win(h->obj)) return;
|
||||||
switch (h->obj->type)
|
switch (h->obj->type)
|
||||||
{
|
{
|
||||||
case E_GADCON_TYPE:
|
case E_GADCON_TYPE:
|
||||||
|
@ -833,6 +839,8 @@ _e_dnd_object_layer_get(E_Drop_Handler *h)
|
||||||
|
|
||||||
if (h->base) return evas_object_layer_get(h->base);
|
if (h->base) return evas_object_layer_get(h->base);
|
||||||
if (!obj) return 0;
|
if (!obj) return 0;
|
||||||
|
if (e_obj_is_win(obj))
|
||||||
|
obj = (E_Object*)e_win_client_get((Evas_Object*)obj);
|
||||||
switch (obj->type)
|
switch (obj->type)
|
||||||
{
|
{
|
||||||
case E_GADCON_CLIENT_TYPE:
|
case E_GADCON_CLIENT_TYPE:
|
||||||
|
|
|
@ -576,7 +576,7 @@ _e_entry_x_selection_update(Evas_Object *entry)
|
||||||
{
|
{
|
||||||
E_Entry_Smart_Data *sd;
|
E_Entry_Smart_Data *sd;
|
||||||
Ecore_Window xwin;
|
Ecore_Window xwin;
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
E_Comp *c;
|
E_Comp *c;
|
||||||
|
|
||||||
if ((!entry) || (!(sd = evas_object_smart_data_get(entry))))
|
if ((!entry) || (!(sd = evas_object_smart_data_get(entry))))
|
||||||
|
@ -592,7 +592,7 @@ _e_entry_x_selection_update(Evas_Object *entry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xwin = win->evas_win;
|
xwin = elm_win_window_id_get(win);
|
||||||
|
|
||||||
if (sd->password_mode)
|
if (sd->password_mode)
|
||||||
return;
|
return;
|
||||||
|
@ -613,7 +613,7 @@ _entry_paste_request_signal_cb(void *data,
|
||||||
const char *source EINA_UNUSED)
|
const char *source EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Ecore_Window xwin;
|
Ecore_Window xwin;
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
E_Comp *c;
|
E_Comp *c;
|
||||||
|
|
||||||
if (!(win = e_win_evas_object_win_get(data)))
|
if (!(win = e_win_evas_object_win_get(data)))
|
||||||
|
@ -627,7 +627,7 @@ _entry_paste_request_signal_cb(void *data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
xwin = win->evas_win;
|
xwin = elm_win_window_id_get(win);
|
||||||
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
if (emission[sizeof("ntry,paste,request,")] == '1')
|
if (emission[sizeof("ntry,paste,request,")] == '1')
|
||||||
|
@ -967,15 +967,15 @@ _e_entry_cb_copy(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Entry_Smart_Data *sd = data;
|
E_Entry_Smart_Data *sd = data;
|
||||||
const char *range;
|
const char *range;
|
||||||
Ecore_X_Window xwin;
|
Ecore_Window xwin;
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
|
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
range = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME);
|
range = edje_object_part_text_selection_get(sd->entry_object, ENTRY_PART_NAME);
|
||||||
if (range)
|
if (range)
|
||||||
{
|
{
|
||||||
win = e_win_evas_object_win_get(sd->entry_object);
|
win = e_win_evas_object_win_get(sd->entry_object);
|
||||||
if (win) xwin = win->evas_win;
|
if (win) xwin = elm_win_window_id_get(win);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xwin = e_grabinput_key_win_get();
|
xwin = e_grabinput_key_win_get();
|
||||||
|
@ -998,15 +998,15 @@ static void
|
||||||
_e_entry_cb_paste(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
_e_entry_cb_paste(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Entry_Smart_Data *sd;
|
E_Entry_Smart_Data *sd;
|
||||||
Ecore_X_Window xwin;
|
Ecore_Window xwin;
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
|
|
||||||
sd = data;
|
sd = data;
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
if ((!sd->enabled) || (sd->noedit)) return;
|
if ((!sd->enabled) || (sd->noedit)) return;
|
||||||
|
|
||||||
win = e_win_evas_object_win_get(sd->entry_object);
|
win = e_win_evas_object_win_get(sd->entry_object);
|
||||||
if (win) xwin = win->evas_win;
|
if (win) xwin = elm_win_window_id_get(win);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xwin = e_grabinput_key_win_get();
|
xwin = e_grabinput_key_win_get();
|
||||||
|
|
|
@ -5,7 +5,7 @@ static void _e_entry_dia_del(void *data);
|
||||||
static void _e_entry_dialog_free(E_Entry_Dialog *dia);
|
static void _e_entry_dialog_free(E_Entry_Dialog *dia);
|
||||||
static void _e_entry_dialog_ok(void *data, E_Dialog *dia);
|
static void _e_entry_dialog_ok(void *data, E_Dialog *dia);
|
||||||
static void _e_entry_dialog_cancel(void *data, E_Dialog *dia);
|
static void _e_entry_dialog_cancel(void *data, E_Dialog *dia);
|
||||||
static void _e_entry_dialog_delete(E_Win *win);
|
static void _e_entry_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||||
static void _e_entry_cb_key_down(void *data, Evas_Object *obj, void *event_info);
|
static void _e_entry_cb_key_down(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
|
||||||
/* Externally accesible functions */
|
/* Externally accesible functions */
|
||||||
|
@ -21,6 +21,7 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text,
|
||||||
Evas_Object *o, *ob;
|
Evas_Object *o, *ob;
|
||||||
Evas_Modifier_Mask mask;
|
Evas_Modifier_Mask mask;
|
||||||
int w, h;
|
int w, h;
|
||||||
|
Evas *e;
|
||||||
|
|
||||||
ed = E_OBJECT_ALLOC(E_Entry_Dialog, E_ENTRY_DIALOG_TYPE, _e_entry_dialog_free);
|
ed = E_OBJECT_ALLOC(E_Entry_Dialog, E_ENTRY_DIALOG_TYPE, _e_entry_dialog_free);
|
||||||
ed->ok.func = ok_func;
|
ed->ok.func = ok_func;
|
||||||
|
@ -42,19 +43,20 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text,
|
||||||
mask = 0;
|
mask = 0;
|
||||||
evas_object_key_ungrab(dia->event_object, "space", mask, ~mask);
|
evas_object_key_ungrab(dia->event_object, "space", mask, ~mask);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _e_entry_dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _e_entry_dia_del);
|
||||||
e_win_delete_callback_set(dia->win, _e_entry_dialog_delete);
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_entry_dialog_delete, dia);
|
||||||
|
|
||||||
if (title) e_dialog_title_set(dia, title);
|
if (title) e_dialog_title_set(dia, title);
|
||||||
if (icon) e_dialog_icon_set(dia, icon, 64);
|
if (icon) e_dialog_icon_set(dia, icon, 64);
|
||||||
|
|
||||||
o = e_widget_list_add(dia->win->evas, 0, 0);
|
e = evas_object_evas_get(dia->win);
|
||||||
|
o = e_widget_list_add(e, 0, 0);
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
ob = e_widget_label_add(dia->win->evas, text);
|
ob = e_widget_label_add(e, text);
|
||||||
e_widget_list_object_append(o, ob, 1, 0, 0.5);
|
e_widget_list_object_append(o, ob, 1, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
ed->entry = e_widget_entry_add(dia->win->evas, &(ed->text), NULL, NULL, NULL);
|
ed->entry = e_widget_entry_add(e, &(ed->text), NULL, NULL, NULL);
|
||||||
evas_object_smart_callback_add(ed->entry, "key_down", _e_entry_cb_key_down, ed);
|
evas_object_smart_callback_add(ed->entry, "key_down", _e_entry_cb_key_down, ed);
|
||||||
e_widget_list_object_append(o, ed->entry, 1, 1, 0.5);
|
e_widget_list_object_append(o, ed->entry, 1, 1, 0.5);
|
||||||
e_widget_size_min_get(o, &w, &h);
|
e_widget_size_min_get(o, &w, &h);
|
||||||
|
@ -63,7 +65,7 @@ e_entry_dialog_show(const char *title, const char *icon, const char *text,
|
||||||
e_dialog_button_add(dia, !button_text ? _("OK") : button_text, NULL, _e_entry_dialog_ok, ed);
|
e_dialog_button_add(dia, !button_text ? _("OK") : button_text, NULL, _e_entry_dialog_ok, ed);
|
||||||
e_dialog_button_add(dia, !button2_text ? _("Cancel") : button2_text, NULL, _e_entry_dialog_cancel, ed);
|
e_dialog_button_add(dia, !button2_text ? _("Cancel") : button2_text, NULL, _e_entry_dialog_cancel, ed);
|
||||||
|
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_widget_focus_set(ed->entry, 1);
|
e_widget_focus_set(ed->entry, 1);
|
||||||
e_widget_entry_select_all(ed->entry);
|
e_widget_entry_select_all(ed->entry);
|
||||||
|
@ -76,7 +78,7 @@ _e_entry_dia_del(void *data)
|
||||||
{
|
{
|
||||||
E_Dialog *dia = data;
|
E_Dialog *dia = data;
|
||||||
|
|
||||||
e_win_delete_callback_set(dia->win, _e_entry_dialog_delete);
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_entry_dialog_delete, dia);
|
||||||
e_object_del(dia->data);
|
e_object_del(dia->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,14 +115,9 @@ _e_entry_dialog_cancel(void *data, E_Dialog *dia __UNUSED__)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_entry_dialog_delete(E_Win *win)
|
_e_entry_dialog_delete(E_Dialog *dia, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
e_object_del(E_OBJECT(dia->data));
|
||||||
E_Entry_Dialog *ed;
|
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
ed = dia->data;
|
|
||||||
e_object_del(E_OBJECT(ed));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -766,7 +766,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||||
e_dialog_text_set(dia, buf);
|
e_dialog_text_set(dia, buf);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 1);
|
e_dialog_button_focus_num(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1077,7 +1077,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
|
||||||
snprintf(text, sizeof(text), _("%s doesn't exist."), real_path);
|
snprintf(text, sizeof(text), _("%s doesn't exist."), real_path);
|
||||||
|
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -10085,7 +10085,7 @@ _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title,
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_dialog_title_set(dia, title);
|
e_dialog_title_set(dia, title);
|
||||||
|
|
||||||
o = e_widget_fsel_add(dia->win->evas, "/", sd->realpath, NULL, NULL, NULL, sd, NULL, sd, 1);
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "/", sd->realpath, NULL, NULL, NULL, sd, NULL, sd, 1);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
e_widget_size_min_get(o, &w, &h);
|
e_widget_size_min_get(o, &w, &h);
|
||||||
e_dialog_content_set(dia, o, w, h);
|
e_dialog_content_set(dia, o, w, h);
|
||||||
|
@ -10093,7 +10093,7 @@ _e_fm2_view_image_sel(E_Fm2_Smart_Data *sd, const char *title,
|
||||||
|
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, ok_cb, sd);
|
e_dialog_button_add(dia, _("OK"), NULL, ok_cb, sd);
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL, _e_fm2_view_image_sel_close, sd);
|
e_dialog_button_add(dia, _("Cancel"), NULL, _e_fm2_view_image_sel_close, sd);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_object_data_set(E_OBJECT(dia), sd);
|
e_object_data_set(E_OBJECT(dia), sd);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _image_sel_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _image_sel_del);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
@ -10530,7 +10530,7 @@ _e_fm_retry_abort_dialog(int pid, const char *str)
|
||||||
str);
|
str);
|
||||||
|
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
@ -10592,7 +10592,7 @@ _e_fm_overwrite_dialog(int pid, const char *str)
|
||||||
_("File already exists, overwrite?<br><hilight>%s</hilight>"), str);
|
_("File already exists, overwrite?<br><hilight>%s</hilight>"), str);
|
||||||
|
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
@ -10760,7 +10760,7 @@ _e_fm_error_dialog(int pid, const char *str)
|
||||||
str);
|
str);
|
||||||
|
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
@ -10864,7 +10864,7 @@ _e_fm_device_error_dialog(const char *title, const char *msg, const char *pstr)
|
||||||
snprintf(text, sizeof(text), "%s<br>%s<br>%s<br>%s<br>%s", msg, u, d, n, m);
|
snprintf(text, sizeof(text), "%s<br>%s<br>%s<br>%s<br>%s", msg, u, d, n, m);
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
|
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_button_focus_num(dialog, 0);
|
e_dialog_button_focus_num(dialog, 0);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
}
|
}
|
||||||
|
@ -10969,7 +10969,7 @@ _e_fm2_file_delete(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
if (sel) eina_list_free(sel);
|
if (sel) eina_list_free(sel);
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ struct _E_Config_Dialog_Data
|
||||||
|
|
||||||
/* a nice easy setup function that does the dirty work */
|
/* a nice easy setup function that does the dirty work */
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
e_fm_prop_file(E_Comp *c, E_Fm2_Icon *ic)
|
e_fm_prop_file(E_Comp *c EINA_UNUSED, E_Fm2_Icon *ic)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -111,7 +111,7 @@ e_fm_prop_file(E_Comp *c, E_Fm2_Icon *ic)
|
||||||
v->advanced.create_widgets = _advanced_create_widgets;
|
v->advanced.create_widgets = _advanced_create_widgets;
|
||||||
#endif
|
#endif
|
||||||
/* create config dialog for NULL object/data */
|
/* create config dialog for NULL object/data */
|
||||||
cfd = e_config_dialog_new(c,
|
cfd = e_config_dialog_new(NULL,
|
||||||
_("File Properties"),
|
_("File Properties"),
|
||||||
"E", "_fm_prop",
|
"E", "_fm_prop",
|
||||||
"enlightenment/file_properties", 0, v, ic);
|
"enlightenment/file_properties", 0, v, ic);
|
||||||
|
@ -605,7 +605,7 @@ _cb_icon_sel(void *data, void *data2)
|
||||||
cfd = data2;
|
cfd = data2;
|
||||||
if (!cfd) return;
|
if (!cfd) return;
|
||||||
|
|
||||||
dia = e_dialog_new(cfd->comp, "E", "_fm2_file_properties_icon_select_dialog");
|
dia = e_dialog_new(NULL, "E", "_fm2_file_properties_icon_select_dialog");
|
||||||
if (!dia) return;
|
if (!dia) return;
|
||||||
// if (cfdata->type == EDJ)
|
// if (cfdata->type == EDJ)
|
||||||
// e_dialog_title_set(dia, _("Select an Edj File"));
|
// e_dialog_title_set(dia, _("Select an Edj File"));
|
||||||
|
@ -613,7 +613,7 @@ _cb_icon_sel(void *data, void *data2)
|
||||||
e_dialog_title_set(dia, _("Select an Image"));
|
e_dialog_title_set(dia, _("Select an Image"));
|
||||||
|
|
||||||
dia->data = cfdata;
|
dia->data = cfdata;
|
||||||
o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
|
o = e_widget_fsel_add(evas_object_evas_get(dia->win), "~/", "/", NULL, NULL,
|
||||||
_cb_fsel_sel, cfdata, NULL, cfdata, 1);
|
_cb_fsel_sel, cfdata, NULL, cfdata, 1);
|
||||||
|
|
||||||
cfdata->gui.fsel_wid = o;
|
cfdata->gui.fsel_wid = o;
|
||||||
|
@ -624,7 +624,7 @@ _cb_icon_sel(void *data, void *data2)
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, _cb_fsel_ok, cfdata);
|
e_dialog_button_add(dia, _("OK"), NULL, _cb_fsel_ok, cfdata);
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL, _cb_fsel_cancel, cfdata);
|
e_dialog_button_add(dia, _("Cancel"), NULL, _cb_fsel_cancel, cfdata);
|
||||||
e_util_win_auto_resize_fill(dia->win);
|
e_util_win_auto_resize_fill(dia->win);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _dia_del);
|
||||||
|
|
||||||
|
|
|
@ -763,7 +763,7 @@ e_gadcon_zone_get(E_Gadcon *gc)
|
||||||
E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL);
|
E_OBJECT_TYPE_CHECK_RETURN(gc, E_GADCON_TYPE, NULL);
|
||||||
if (gc->zone) return gc->zone;
|
if (gc->zone) return gc->zone;
|
||||||
if (!gc->toolbar) return NULL;
|
if (!gc->toolbar) return NULL;
|
||||||
return gc->toolbar->fwin->client->zone;
|
return e_win_client_get(gc->toolbar->fwin)->zone;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -5786,10 +5786,10 @@ e_gadcon_client_visible_get(const E_Gadcon_Client *gcc, const E_Desk *desk)
|
||||||
break;
|
break;
|
||||||
case E_GADCON_SITE_TOOLBAR:
|
case E_GADCON_SITE_TOOLBAR:
|
||||||
case E_GADCON_SITE_EFM_TOOLBAR:
|
case E_GADCON_SITE_EFM_TOOLBAR:
|
||||||
if (desk) return (gcc->gadcon->toolbar->fwin->client->desk == desk);
|
if (desk) return (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == desk);
|
||||||
EINA_LIST_FOREACH(e_comp_list(), l, c)
|
EINA_LIST_FOREACH(e_comp_list(), l, c)
|
||||||
EINA_LIST_FOREACH(c->zones, ll, zone)
|
EINA_LIST_FOREACH(c->zones, ll, zone)
|
||||||
if (gcc->gadcon->toolbar->fwin->client->desk == e_desk_current_get(zone)) return EINA_TRUE;
|
if (e_win_client_get(gcc->gadcon->toolbar->fwin)->desk == e_desk_current_get(zone)) return EINA_TRUE;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,14 +83,9 @@ _e_grab_dialog_free(E_Grab_Dialog *eg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_grab_dialog_delete(E_Win *win)
|
_e_grab_dialog_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
e_object_del(data);
|
||||||
E_Grab_Dialog *eg;
|
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
eg = dia->data;
|
|
||||||
e_object_del(E_OBJECT(eg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -102,45 +97,40 @@ _e_grab_dialog_dia_del(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Grab_Dialog *
|
EAPI E_Grab_Dialog *
|
||||||
e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data)
|
e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data)
|
||||||
{
|
{
|
||||||
E_Comp *c = NULL;
|
|
||||||
E_Grab_Dialog *eg;
|
E_Grab_Dialog *eg;
|
||||||
Ecore_Event_Handler *eh;
|
Ecore_Event_Handler *eh;
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
{
|
evas_object_focus_set(e_win_client_get(parent)->frame, 0);
|
||||||
c = parent->comp;
|
|
||||||
evas_object_focus_set(parent->client->frame, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
c = e_comp_get(NULL);
|
|
||||||
|
|
||||||
eg = E_OBJECT_ALLOC(E_Grab_Dialog, E_GRAB_DIALOG_TYPE, _e_grab_dialog_free);
|
eg = E_OBJECT_ALLOC(E_Grab_Dialog, E_GRAB_DIALOG_TYPE, _e_grab_dialog_free);
|
||||||
if (!eg) return NULL;
|
if (!eg) return NULL;
|
||||||
|
|
||||||
if (is_mouse)
|
if (is_mouse)
|
||||||
{
|
{
|
||||||
eg->dia = e_dialog_new(c, "E", "_mousebind_getmouse_dialog");
|
eg->dia = e_dialog_new(parent, "E", "_mousebind_getmouse_dialog");
|
||||||
e_dialog_title_set(eg->dia, _("Mouse Binding Combination"));
|
e_dialog_title_set(eg->dia, _("Mouse Binding Combination"));
|
||||||
e_dialog_icon_set(eg->dia, "preferences-desktop-mouse", 48);
|
e_dialog_icon_set(eg->dia, "preferences-desktop-mouse", 48);
|
||||||
e_dialog_text_set(eg->dia, TEXT_PRESS_MOUSE_BINIDING_SEQUENCE);
|
e_dialog_text_set(eg->dia, TEXT_PRESS_MOUSE_BINIDING_SEQUENCE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eg->dia = e_dialog_new(c, "E", "_keybind_getkey_dialog");
|
eg->dia = e_dialog_new(parent, "E", "_keybind_getkey_dialog");
|
||||||
e_dialog_title_set(eg->dia, _("Key Binding Combination"));
|
e_dialog_title_set(eg->dia, _("Key Binding Combination"));
|
||||||
e_dialog_icon_set(eg->dia, "preferences-desktop-keyboard-shortcuts", 48);
|
e_dialog_icon_set(eg->dia, "preferences-desktop-keyboard-shortcuts", 48);
|
||||||
e_dialog_text_set(eg->dia, TEXT_PRESS_KEY_SEQUENCE);
|
e_dialog_text_set(eg->dia, TEXT_PRESS_KEY_SEQUENCE);
|
||||||
}
|
}
|
||||||
eg->dia->data = eg;
|
eg->dia->data = eg;
|
||||||
e_win_centered_set(eg->dia->win, 1);
|
elm_win_center(eg->dia->win, 1, 1);
|
||||||
e_win_borderless_set(eg->dia->win, 1);
|
elm_win_borderless_set(eg->dia->win, 1);
|
||||||
|
e_dialog_resizable_set(eg->dia, 0);
|
||||||
e_object_del_attach_func_set(E_OBJECT(eg->dia), _e_grab_dialog_dia_del);
|
e_object_del_attach_func_set(E_OBJECT(eg->dia), _e_grab_dialog_dia_del);
|
||||||
e_win_delete_callback_set(eg->dia->win, _e_grab_dialog_delete);
|
evas_object_event_callback_add(eg->dia->win, EVAS_CALLBACK_DEL, _e_grab_dialog_delete, eg);
|
||||||
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
eg->grab_win = ecore_x_window_input_new(c->man->root, 0, 0, 1, 1);
|
eg->grab_win = ecore_x_window_input_new(e_comp_get(NULL)->man->root, 0, 0, 1, 1);
|
||||||
ecore_x_window_show(eg->grab_win);
|
ecore_x_window_show(eg->grab_win);
|
||||||
e_grabinput_get(eg->grab_win, 0, eg->grab_win);
|
e_grabinput_get(eg->grab_win, 0, eg->grab_win);
|
||||||
#endif
|
#endif
|
||||||
|
@ -160,9 +150,7 @@ e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key
|
||||||
eg->handlers = eina_list_append(eg->handlers, eh);
|
eg->handlers = eina_list_append(eg->handlers, eh);
|
||||||
}
|
}
|
||||||
e_dialog_show(eg->dia);
|
e_dialog_show(eg->dia);
|
||||||
evas_object_layer_set(eg->dia->win->client->frame, E_LAYER_CLIENT_ABOVE);
|
evas_object_layer_set(e_win_client_get(eg->dia->win)->frame, E_LAYER_CLIENT_PRIO);
|
||||||
if (parent)
|
|
||||||
e_dialog_parent_set(eg->dia, parent);
|
|
||||||
return eg;
|
return eg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct _E_Grab_Dialog
|
||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Grab_Dialog *e_grab_dialog_show(E_Win *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data);
|
EAPI E_Grab_Dialog *e_grab_dialog_show(Evas_Object *parent, Eina_Bool is_mouse, Ecore_Event_Handler_Cb key, Ecore_Event_Handler_Cb mouse, Ecore_Event_Handler_Cb wheel, const void *data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -26,7 +26,7 @@ _import_edj_gen(E_Import_Config_Dialog *import)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
size_t len, off;
|
size_t len, off;
|
||||||
|
|
||||||
evas = e_win_evas_get(import->dia->win);
|
evas = evas_object_evas_get(import->dia->win);
|
||||||
file = ecore_file_file_get(import->file);
|
file = ecore_file_file_get(import->file);
|
||||||
fstrip = ecore_file_strip_ext(file);
|
fstrip = ecore_file_strip_ext(file);
|
||||||
if (!fstrip) return;
|
if (!fstrip) return;
|
||||||
|
@ -332,7 +332,7 @@ _import_cb_ok(void *data, E_Dialog *dia __UNUSED__)
|
||||||
if (!eina_str_has_extension(file, "edj"))
|
if (!eina_str_has_extension(file, "edj"))
|
||||||
{
|
{
|
||||||
_import_edj_gen(import);
|
_import_edj_gen(import);
|
||||||
e_win_hide(import->dia->win);
|
evas_object_hide(import->dia->win);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s", file);
|
e_user_dir_snprintf(buf, sizeof(buf), "backgrounds/%s", file);
|
||||||
|
@ -418,12 +418,11 @@ _e_import_config_dialog_del(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_import_config_dialog_win_del(E_Win *win)
|
_e_import_config_dialog_win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia = data;
|
||||||
E_Import_Config_Dialog *import;
|
E_Import_Config_Dialog *import;
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
import = dia->data;
|
import = dia->data;
|
||||||
if (!import) return;
|
if (!import) return;
|
||||||
e_object_ref(E_OBJECT(import));
|
e_object_ref(E_OBJECT(import));
|
||||||
|
@ -435,7 +434,7 @@ _e_import_config_dialog_win_del(E_Win *win)
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
EAPI E_Import_Config_Dialog *
|
EAPI E_Import_Config_Dialog *
|
||||||
e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel)
|
e_import_config_dialog_show(Evas_Object *parent, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel)
|
||||||
{
|
{
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
|
@ -449,7 +448,7 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_
|
||||||
import = E_OBJECT_ALLOC(E_Import_Config_Dialog, E_IMPORT_CONFIG_DIALOG_TYPE, _e_import_config_dialog_del);
|
import = E_OBJECT_ALLOC(E_Import_Config_Dialog, E_IMPORT_CONFIG_DIALOG_TYPE, _e_import_config_dialog_del);
|
||||||
if (!import) return NULL;
|
if (!import) return NULL;
|
||||||
|
|
||||||
dia = e_dialog_new(c, "E", "_import_config_dialog");
|
dia = e_dialog_new(parent, "E", "_import_config_dialog");
|
||||||
if (!dia)
|
if (!dia)
|
||||||
{
|
{
|
||||||
e_object_del(E_OBJECT(import));
|
e_object_del(E_OBJECT(import));
|
||||||
|
@ -463,14 +462,14 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_
|
||||||
import->ok = ok, import->cancel = cancel;
|
import->ok = ok, import->cancel = cancel;
|
||||||
import->path = eina_stringshare_add(path);
|
import->path = eina_stringshare_add(path);
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _e_import_config_dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _e_import_config_dia_del);
|
||||||
e_win_delete_callback_set(dia->win, _e_import_config_dialog_win_del);
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_import_config_dialog_win_del, dia);
|
||||||
|
|
||||||
import->method = IMPORT_SCALE_ASPECT_OUT;
|
import->method = IMPORT_SCALE_ASPECT_OUT;
|
||||||
import->external = 0;
|
import->external = 0;
|
||||||
import->quality = 90;
|
import->quality = 90;
|
||||||
import->file = eina_stringshare_add(path);
|
import->file = eina_stringshare_add(path);
|
||||||
|
|
||||||
evas = e_win_evas_get(dia->win);
|
evas = evas_object_evas_get(dia->win);
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 0);
|
o = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
|
@ -540,7 +539,7 @@ e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_
|
||||||
e_dialog_content_set(dia, o, w, h);
|
e_dialog_content_set(dia, o, w, h);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, _import_cb_ok, import);
|
e_dialog_button_add(dia, _("OK"), NULL, _import_cb_ok, import);
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL, _import_cb_close, import);
|
e_dialog_button_add(dia, _("Cancel"), NULL, _import_cb_close, import);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_border_icon_set(dia, "folder-image");
|
e_dialog_border_icon_set(dia, "folder-image");
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct _E_Import_Config_Dialog
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Import_Config_Dialog *e_import_config_dialog_show(E_Comp *c, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel);
|
EAPI E_Import_Config_Dialog *e_import_config_dialog_show(Evas_Object *parent, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,8 +54,7 @@ _fsel_cb_ok(void *data, E_Dialog *dia __UNUSED__)
|
||||||
if ((p) && (strcasecmp(p, ".edj")))
|
if ((p) && (strcasecmp(p, ".edj")))
|
||||||
{
|
{
|
||||||
E_Import_Config_Dialog *import;
|
E_Import_Config_Dialog *import;
|
||||||
import = e_import_config_dialog_show(id->dia->win->comp, path, _import_ok, NULL);
|
import = e_import_config_dialog_show(id->dia->win, path, _import_ok, NULL);
|
||||||
e_dialog_parent_set(import->dia, id->dia->win);
|
|
||||||
e_object_data_set(E_OBJECT(import), id);
|
e_object_data_set(E_OBJECT(import), id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -121,12 +120,11 @@ _e_import_dialog_del(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_import_dialog_win_del(E_Win *win)
|
_e_import_dialog_win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia = data;
|
||||||
E_Import_Dialog *id;
|
E_Import_Dialog *id;
|
||||||
|
|
||||||
dia = win->data;
|
|
||||||
id = dia->data;
|
id = dia->data;
|
||||||
if (id)
|
if (id)
|
||||||
e_object_del(E_OBJECT(id));
|
e_object_del(E_OBJECT(id));
|
||||||
|
@ -135,7 +133,7 @@ _e_import_dialog_win_del(E_Win *win)
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
EAPI E_Import_Dialog *
|
EAPI E_Import_Dialog *
|
||||||
e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel)
|
e_import_dialog_show(Evas_Object *parent EINA_UNUSED, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel)
|
||||||
{
|
{
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
E_Import_Dialog *id;
|
E_Import_Dialog *id;
|
||||||
|
@ -148,7 +146,7 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb
|
||||||
id = E_OBJECT_ALLOC(E_Import_Dialog, E_IMPORT_DIALOG_TYPE, _e_import_dialog_del);
|
id = E_OBJECT_ALLOC(E_Import_Dialog, E_IMPORT_DIALOG_TYPE, _e_import_dialog_del);
|
||||||
if (!id) return NULL;
|
if (!id) return NULL;
|
||||||
|
|
||||||
dia = e_dialog_new(c, "E", "_import_fsel_dialog");
|
dia = e_dialog_new(NULL, "E", "_import_fsel_dialog");
|
||||||
if (!dia)
|
if (!dia)
|
||||||
{
|
{
|
||||||
e_object_del(E_OBJECT(id));
|
e_object_del(E_OBJECT(id));
|
||||||
|
@ -160,9 +158,9 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb
|
||||||
id->dia = dia;
|
id->dia = dia;
|
||||||
id->ok = ok, id->cancel = cancel;
|
id->ok = ok, id->cancel = cancel;
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _e_import_dia_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _e_import_dia_del);
|
||||||
e_win_delete_callback_set(dia->win, _e_import_dialog_win_del);
|
evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_import_dialog_win_del, dia);
|
||||||
|
|
||||||
evas = e_win_evas_get(dia->win);
|
evas = evas_object_evas_get(dia->win);
|
||||||
e_dialog_title_set(dia, _("Select a Picture..."));
|
e_dialog_title_set(dia, _("Select a Picture..."));
|
||||||
|
|
||||||
fdev = dev ? : e_config->wallpaper_import_last_dev;
|
fdev = dev ? : e_config->wallpaper_import_last_dev;
|
||||||
|
@ -199,7 +197,7 @@ e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb
|
||||||
e_dialog_button_add(dia, _("Cancel"), NULL, _fsel_cb_close, id);
|
e_dialog_button_add(dia, _("Cancel"), NULL, _fsel_cb_close, id);
|
||||||
e_dialog_border_icon_set(dia, "enlightenment/background");
|
e_dialog_border_icon_set(dia, "enlightenment/background");
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_widget_focus_set(ofm, 1);
|
e_widget_focus_set(ofm, 1);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
|
|
@ -15,7 +15,7 @@ struct _E_Import_Dialog
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Import_Dialog *e_import_dialog_show(E_Comp *c, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel);
|
EAPI E_Import_Dialog *e_import_dialog_show(Evas_Object *parent, const char *dev, const char *path, Ecore_End_Cb ok, Ecore_Cb cancel);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "e_init.h"
|
#include "e_init.h"
|
||||||
#include "e_int_menus.h"
|
#include "e_int_menus.h"
|
||||||
#include "e_module.h"
|
#include "e_module.h"
|
||||||
#include "e_canvas.h"
|
|
||||||
#include "e_focus.h"
|
#include "e_focus.h"
|
||||||
#include "e_place.h"
|
#include "e_place.h"
|
||||||
#include "e_resist.h"
|
#include "e_resist.h"
|
||||||
|
|
|
@ -62,7 +62,7 @@ e_int_client_locks(E_Client *ec)
|
||||||
v->advanced.create_widgets = _advanced_create_widgets;
|
v->advanced.create_widgets = _advanced_create_widgets;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
/* create config diaolg for bd object/data */
|
/* create config diaolg for bd object/data */
|
||||||
cfd = e_config_dialog_new(ec->comp,
|
cfd = e_config_dialog_new(NULL,
|
||||||
_("Window Locks"),
|
_("Window Locks"),
|
||||||
"E", "_border_locks_dialog",
|
"E", "_border_locks_dialog",
|
||||||
NULL, 0, v, ec);
|
NULL, 0, v, ec);
|
||||||
|
|
|
@ -291,12 +291,8 @@ _e_client_menu_cb_locks(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUS
|
||||||
|
|
||||||
ec = data;
|
ec = data;
|
||||||
if (ec->border_locks_dialog)
|
if (ec->border_locks_dialog)
|
||||||
{
|
e_client_activate(e_win_client_get(ec->border_locks_dialog->dia->win), 1);
|
||||||
e_client_desk_set(ec->border_locks_dialog->dia->win->client, ec->desk);
|
else
|
||||||
e_win_raise(ec->border_locks_dialog->dia->win);
|
|
||||||
evas_object_focus_set(ec->border_locks_dialog->dia->win->client->frame, 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e_int_client_locks(ec);
|
e_int_client_locks(ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,12 +303,8 @@ _e_client_menu_cb_remember(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __U
|
||||||
|
|
||||||
ec = data;
|
ec = data;
|
||||||
if (ec->border_remember_dialog)
|
if (ec->border_remember_dialog)
|
||||||
{
|
e_client_activate(e_win_client_get(ec->border_remember_dialog->dia->win), 1);
|
||||||
e_client_desk_set(ec->border_remember_dialog->dia->win->client, ec->desk);
|
else
|
||||||
e_win_raise(ec->border_remember_dialog->dia->win);
|
|
||||||
evas_object_focus_set(ec->border_remember_dialog->dia->win->client->frame, 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e_int_client_remember(ec);
|
e_int_client_remember(ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,14 +316,12 @@ _e_client_menu_cb_border(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNU
|
||||||
|
|
||||||
ec = data;
|
ec = data;
|
||||||
if (ec->border_border_dialog)
|
if (ec->border_border_dialog)
|
||||||
|
e_client_activate(e_win_client_get(ec->border_border_dialog->dia->win), 1);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
e_client_desk_set(ec->border_border_dialog->dia->win->client, ec->desk);
|
|
||||||
e_win_raise(ec->border_border_dialog->dia->win);
|
|
||||||
evas_object_focus_set(ec->border_border_dialog->dia->win->client->frame, 1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
snprintf(buf, sizeof(buf), "%p", ec);
|
snprintf(buf, sizeof(buf), "%p", ec);
|
||||||
e_configure_registry_call("internal/borders_border", ec->zone->comp, buf);
|
e_configure_registry_call("internal/borders_border", NULL, buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1628,7 +1618,7 @@ _e_client_menu_cb_kbdshrtct_add(void *data, E_Menu *m __UNUSED__, E_Menu_Item *m
|
||||||
zone = e_util_zone_current_get(e_manager_current_get());
|
zone = e_util_zone_current_get(e_manager_current_get());
|
||||||
if (!zone) return;
|
if (!zone) return;
|
||||||
e_configure_registry_call("keyboard_and_mouse/key_bindings",
|
e_configure_registry_call("keyboard_and_mouse/key_bindings",
|
||||||
zone->comp, ec->desktop->exec);
|
NULL, ec->desktop->exec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -71,7 +71,7 @@ e_int_client_prop(E_Client *ec)
|
||||||
|
|
||||||
if (ec->border_prop_dialog) return;
|
if (ec->border_prop_dialog) return;
|
||||||
|
|
||||||
dia = e_dialog_new(ec->zone->comp, "E", "_window_props");
|
dia = e_dialog_new(NULL, "E", "_window_props");
|
||||||
e_object_del_attach_func_set(E_OBJECT(dia), _ec_cb_dialog_del);
|
e_object_del_attach_func_set(E_OBJECT(dia), _ec_cb_dialog_del);
|
||||||
|
|
||||||
_create_data(dia, ec);
|
_create_data(dia, ec);
|
||||||
|
@ -79,7 +79,7 @@ e_int_client_prop(E_Client *ec)
|
||||||
_ec_go(dia, (void *)0);
|
_ec_go(dia, (void *)0);
|
||||||
|
|
||||||
e_dialog_button_add(dia, _("Close"), NULL, _ec_cb_dialog_close, dia);
|
e_dialog_button_add(dia, _("Close"), NULL, _ec_cb_dialog_close, dia);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_dialog_border_icon_set(dia, "preferences-system-windows");
|
e_dialog_border_icon_set(dia, "preferences-system-windows");
|
||||||
}
|
}
|
||||||
|
@ -381,14 +381,14 @@ _ec_go(void *data, void *data2)
|
||||||
if (dia->content_object)
|
if (dia->content_object)
|
||||||
evas_object_del(dia->content_object);
|
evas_object_del(dia->content_object);
|
||||||
|
|
||||||
c = e_widget_list_add(e_win_evas_get(dia->win), 0, 0);
|
c = e_widget_list_add(evas_object_evas_get(dia->win), 0, 0);
|
||||||
|
|
||||||
if (!data2)
|
if (!data2)
|
||||||
{
|
{
|
||||||
o = _ec_icccm_create(dia, NULL);
|
o = _ec_icccm_create(dia, NULL);
|
||||||
e_dialog_title_set(dia, _("ICCCM Properties"));
|
e_dialog_title_set(dia, _("ICCCM Properties"));
|
||||||
e_widget_list_object_append(c, o, 1, 1, 0.0);
|
e_widget_list_object_append(c, o, 1, 1, 0.0);
|
||||||
ob = e_widget_button_add(e_win_evas_get(dia->win), _("NetWM"), "go-next",
|
ob = e_widget_button_add(evas_object_evas_get(dia->win), _("NetWM"), "go-next",
|
||||||
_ec_go, dia, (void *)1);
|
_ec_go, dia, (void *)1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -396,7 +396,7 @@ _ec_go(void *data, void *data2)
|
||||||
o = _ec_netwm_create(dia, NULL);
|
o = _ec_netwm_create(dia, NULL);
|
||||||
e_dialog_title_set(dia, _("NetWM Properties"));
|
e_dialog_title_set(dia, _("NetWM Properties"));
|
||||||
e_widget_list_object_append(c, o, 1, 1, 0.0);
|
e_widget_list_object_append(c, o, 1, 1, 0.0);
|
||||||
ob = e_widget_button_add(e_win_evas_get(dia->win), _("ICCCM"), "go-next",
|
ob = e_widget_button_add(evas_object_evas_get(dia->win), _("ICCCM"), "go-next",
|
||||||
_ec_go, dia, (void *)0);
|
_ec_go, dia, (void *)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ _ec_icccm_create(E_Dialog *dia, void *data __UNUSED__)
|
||||||
if (dia->content_object)
|
if (dia->content_object)
|
||||||
evas_object_del(dia->content_object);
|
evas_object_del(dia->content_object);
|
||||||
|
|
||||||
evas = e_win_evas_get(dia->win);
|
evas = evas_object_evas_get(dia->win);
|
||||||
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
|
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
|
||||||
|
|
||||||
o = e_widget_table_add(evas, 0);
|
o = e_widget_table_add(evas, 0);
|
||||||
|
@ -497,7 +497,7 @@ _ec_netwm_create(E_Dialog *dia, void *data __UNUSED__)
|
||||||
if (dia->content_object)
|
if (dia->content_object)
|
||||||
evas_object_del(dia->content_object);
|
evas_object_del(dia->content_object);
|
||||||
|
|
||||||
evas = e_win_evas_get(dia->win);
|
evas = evas_object_evas_get(dia->win);
|
||||||
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
|
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
|
||||||
o = e_widget_table_add(evas, 0);
|
o = e_widget_table_add(evas, 0);
|
||||||
STR_ENTRY(_("Name"), 0, 1, netwm.name);
|
STR_ENTRY(_("Name"), 0, 1, netwm.name);
|
||||||
|
|
|
@ -106,7 +106,7 @@ e_int_client_remember(E_Client *ec)
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
/* create config dialog for ec object/data */
|
/* create config dialog for ec object/data */
|
||||||
cfd = e_config_dialog_new(ec->zone->comp,
|
cfd = e_config_dialog_new(NULL,
|
||||||
_("Window Remember"),
|
_("Window Remember"),
|
||||||
"E", "_border_remember_dialog",
|
"E", "_border_remember_dialog",
|
||||||
NULL, 0, v, ec);
|
NULL, 0, v, ec);
|
||||||
|
@ -328,11 +328,11 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_warning_dialog_show(E_Comp *c)
|
_warning_dialog_show(void)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
|
|
||||||
dia = e_dialog_new(c, "E", "_border_remember_error_multi_dialog");
|
dia = e_dialog_new(NULL, "E", "_border_remember_error_multi_dialog");
|
||||||
e_dialog_title_set(dia, _("Window properties are not a unique match"));
|
e_dialog_title_set(dia, _("Window properties are not a unique match"));
|
||||||
e_dialog_text_set
|
e_dialog_text_set
|
||||||
(dia,
|
(dia,
|
||||||
|
@ -351,7 +351,7 @@ _warning_dialog_show(E_Comp *c)
|
||||||
"are not sure and nothing will be affected.")
|
"are not sure and nothing will be affected.")
|
||||||
);
|
);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ _check_matches(E_Remember *rem, int update)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
_basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
/* Actually take our cfdata settings and apply them in real life */
|
/* Actually take our cfdata settings and apply them in real life */
|
||||||
E_Client *ec = cfdata->client;
|
E_Client *ec = cfdata->client;
|
||||||
|
@ -443,7 +443,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
if ((!cfdata->warned) && (_check_matches(rem, 0) > 1))
|
if ((!cfdata->warned) && (_check_matches(rem, 0) > 1))
|
||||||
{
|
{
|
||||||
_warning_dialog_show(cfd->comp);
|
_warning_dialog_show();
|
||||||
cfdata->warned = 1;
|
cfdata->warned = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -459,7 +459,7 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
_advanced_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
E_Client *ec = cfdata->client;
|
E_Client *ec = cfdata->client;
|
||||||
E_Remember *rem;
|
E_Remember *rem;
|
||||||
|
@ -537,7 +537,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
E_Dialog *dia;
|
E_Dialog *dia;
|
||||||
|
|
||||||
dia = e_dialog_new(cfd->comp, "E", "_border_remember_error_noprop_dialog");
|
dia = e_dialog_new(NULL, "E", "_border_remember_error_noprop_dialog");
|
||||||
e_dialog_title_set(dia, _("No match properties set"));
|
e_dialog_title_set(dia, _("No match properties set"));
|
||||||
e_dialog_text_set
|
e_dialog_text_set
|
||||||
(dia,
|
(dia,
|
||||||
|
@ -548,7 +548,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
"You must specify at least 1 way of remembering this window.")
|
"You must specify at least 1 way of remembering this window.")
|
||||||
);
|
);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
if (ec)
|
if (ec)
|
||||||
cfdata->client->remember = rem;
|
cfdata->client->remember = rem;
|
||||||
|
@ -563,7 +563,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
if ((!cfdata->remember.apply_first_only) &&
|
if ((!cfdata->remember.apply_first_only) &&
|
||||||
(_check_matches(rem, 0) > 1))
|
(_check_matches(rem, 0) > 1))
|
||||||
{
|
{
|
||||||
_warning_dialog_show(cfd->comp);
|
_warning_dialog_show();
|
||||||
cfdata->warned = 1;
|
cfdata->warned = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ static int _advanced_apply_data(E_Config_Dialog *cfd,
|
||||||
E_Config_Dialog_Data *cfdata);
|
E_Config_Dialog_Data *cfdata);
|
||||||
|
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
e_int_config_comp(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_comp(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -83,7 +83,7 @@ e_int_config_comp(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->advanced.apply_cfdata = _advanced_apply_data;
|
v->advanced.apply_cfdata = _advanced_apply_data;
|
||||||
v->advanced.create_widgets = _advanced_create_widgets;
|
v->advanced.create_widgets = _advanced_create_widgets;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Composite Settings"),
|
cfd = e_config_dialog_new(NULL, _("Composite Settings"),
|
||||||
"E", "appearance/comp", "preferences-composite", 0, v, NULL);
|
"E", "appearance/comp", "preferences-composite", 0, v, NULL);
|
||||||
e_dialog_resizable_set(cfd->dia, 1);
|
e_dialog_resizable_set(cfd->dia, 1);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -173,10 +173,9 @@ _advanced_comp_style_toggle(void *oi, Evas_Object *o)
|
||||||
static void
|
static void
|
||||||
_advanced_matches_edit(void *data, void *d EINA_UNUSED)
|
_advanced_matches_edit(void *data, void *d EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *md, *cfd = data;
|
E_Config_Dialog *cfd = data;
|
||||||
|
|
||||||
md = e_int_config_comp_match(NULL, NULL);
|
e_int_config_comp_match(cfd->dia->win, NULL);
|
||||||
e_dialog_parent_set(md->dia, cfd->dia->win);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
static Evas_Object *
|
||||||
|
|
|
@ -537,7 +537,12 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
|
||||||
e_widget_frametable_object_append(of, bt, 0, 1, 1, 1, 0, 0, 0, 0);
|
e_widget_frametable_object_append(of, bt, 0, 1, 1, 1, 0, 0, 0, 0);
|
||||||
|
|
||||||
e_widget_size_min_get(of, &mw, &mh);
|
e_widget_size_min_get(of, &mw, &mh);
|
||||||
e_win_resize(cfd->dia->win, MAX(mw, cfd->dia->win->w), MAX(mh, cfd->dia->win->h));
|
{
|
||||||
|
int ww, wh;
|
||||||
|
|
||||||
|
evas_object_geometry_get(cfd->dia->win, NULL, NULL, &ww, &wh);
|
||||||
|
evas_object_resize(cfd->dia->win, MAX(mw, ww), MAX(mh, wh));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -863,7 +868,7 @@ _create_data(E_Config_Dialog *cfd)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_comp_match(Evas_Object *parent, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -876,7 +881,7 @@ e_int_config_comp_match(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.apply_cfdata = _basic_apply_data;
|
v->basic.apply_cfdata = _basic_apply_data;
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Composite Match Settings"),
|
cfd = e_config_dialog_new(parent, _("Composite Match Settings"),
|
||||||
"E", "_comp_matches", "preferences-composite", 0, v, NULL);
|
"E", "_comp_matches", "preferences-composite", 0, v, NULL);
|
||||||
e_dialog_resizable_set(cfd->dia, 1);
|
e_dialog_resizable_set(cfd->dia, 1);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
|
|
@ -83,7 +83,7 @@ static void _btn_cb_unload(void *data, void *data2);
|
||||||
static void _btn_cb_load(void *data, void *data2);
|
static void _btn_cb_load(void *data, void *data2);
|
||||||
|
|
||||||
EAPI E_Config_Dialog *
|
EAPI E_Config_Dialog *
|
||||||
e_int_config_modules(E_Comp *c, const char *params __UNUSED__)
|
e_int_config_modules(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd = NULL;
|
E_Config_Dialog *cfd = NULL;
|
||||||
E_Config_Dialog_View *v = NULL;
|
E_Config_Dialog_View *v = NULL;
|
||||||
|
@ -95,7 +95,7 @@ e_int_config_modules(E_Comp *c, const char *params __UNUSED__)
|
||||||
v->free_cfdata = _free_data;
|
v->free_cfdata = _free_data;
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(c, _("Module Settings"),
|
cfd = e_config_dialog_new(NULL, _("Module Settings"),
|
||||||
"E", "extensions/modules",
|
"E", "extensions/modules",
|
||||||
"preferences-plugin", 0, v, NULL);
|
"preferences-plugin", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -175,7 +175,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
e_dialog_resizable_set(cfd->dia, 1);
|
e_dialog_resizable_set(cfd->dia, 1);
|
||||||
|
|
||||||
cfdata->evas = e_win_evas_get(cfd->dia->win);
|
cfdata->evas = evas_object_evas_get(cfd->dia->win);
|
||||||
|
|
||||||
of = e_widget_table_add(evas, 0);
|
of = e_widget_table_add(evas, 0);
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
e_dialog_resizable_set(cfd->dia, 1);
|
e_dialog_resizable_set(cfd->dia, 1);
|
||||||
e_util_win_auto_resize_fill(cfd->dia->win);
|
e_util_win_auto_resize_fill(cfd->dia->win);
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
|
|
||||||
e_widget_focus_set(cfdata->o_toolbar, 1);
|
e_widget_focus_set(cfdata->o_toolbar, 1);
|
||||||
e_widget_toolbar_item_select(cfdata->o_toolbar, 0);
|
e_widget_toolbar_item_select(cfdata->o_toolbar, 0);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef E_INT_CONFIG_MODULES_H
|
#ifndef E_INT_CONFIG_MODULES_H
|
||||||
#define E_INT_CONFIG_MODULES_H
|
#define E_INT_CONFIG_MODULES_H
|
||||||
|
|
||||||
EAPI E_Config_Dialog *e_int_config_modules(E_Comp *c, const char *params);
|
EAPI E_Config_Dialog *e_int_config_modules(Evas_Object *parent, const char *params);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,8 +54,7 @@ _create_dialog(E_Gadcon *gc, const char *title, E_Gadcon_Site site)
|
||||||
|
|
||||||
if (gc->config_dialog)
|
if (gc->config_dialog)
|
||||||
{
|
{
|
||||||
e_win_raise(gc->config_dialog->dia->win);
|
e_client_activate(e_win_client_get(gc->config_dialog->dia->win), 1);
|
||||||
evas_object_focus_set(gc->config_dialog->dia->win->client->frame, 1);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(v = E_NEW(E_Config_Dialog_View, 1))) return;
|
if (!(v = E_NEW(E_Config_Dialog_View, 1))) return;
|
||||||
|
@ -69,7 +68,7 @@ _create_dialog(E_Gadcon *gc, const char *title, E_Gadcon_Site site)
|
||||||
e_config_dialog_new(NULL, title, "E", "_gadcon_config_dialog",
|
e_config_dialog_new(NULL, title, "E", "_gadcon_config_dialog",
|
||||||
"preferences-desktop-shelf", 0, v, gc);
|
"preferences-desktop-shelf", 0, v, gc);
|
||||||
if (site) gc->config_dialog->cfdata->site = site;
|
if (site) gc->config_dialog->cfdata->site = site;
|
||||||
e_win_centered_set(gc->config_dialog->dia->win, EINA_TRUE);
|
elm_win_center(gc->config_dialog->dia->win, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
@ -725,7 +724,7 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer);
|
if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer);
|
||||||
cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata);
|
cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata);
|
||||||
|
|
||||||
e_win_centered_set(cfd->dia->win, EINA_TRUE);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
|
|
||||||
return otb;
|
return otb;
|
||||||
}
|
}
|
||||||
|
@ -759,7 +758,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer);
|
if (cfdata->load_timer) ecore_timer_del(cfdata->load_timer);
|
||||||
cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata);
|
cfdata->load_timer = ecore_timer_add(0.01, _cb_load_timer, cfdata);
|
||||||
|
|
||||||
e_win_centered_set(cfd->dia->win, EINA_TRUE);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
|
|
||||||
return ot;
|
return ot;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ _TEST(void *d __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
||||||
Evas *e;
|
Evas *e;
|
||||||
|
|
||||||
dia = e_dialog_normal_win_new(m->zone->comp, "E", "_widget_playground_dialog");
|
dia = e_dialog_normal_win_new(m->zone->comp, "E", "_widget_playground_dialog");
|
||||||
e = e_win_evas_get(dia->win);
|
e = evas_object_evas_get(dia->win);
|
||||||
o_list = e_widget_ilist_add(e, 32, 32, NULL);
|
o_list = e_widget_ilist_add(e, 32, 32, NULL);
|
||||||
e_dialog_button_add(dia, "Add", NULL, _TEST_ADD, o_list);
|
e_dialog_button_add(dia, "Add", NULL, _TEST_ADD, o_list);
|
||||||
e_dialog_button_add(dia, "Del", NULL, _TEST_DEL, o_list);
|
e_dialog_button_add(dia, "Del", NULL, _TEST_DEL, o_list);
|
||||||
|
@ -1074,9 +1074,9 @@ _e_int_menus_desktops_free_hook(void *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_int_menus_desk_item_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_e_int_menus_desk_item_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
e_configure_registry_call("screen/virtual_desktops", m->zone->comp, NULL);
|
e_configure_registry_call("screen/virtual_desktops", NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1112,9 +1112,9 @@ _e_int_menus_virtuals_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_e_int_menus_conf_comp_cb(void *data EINA_UNUSED, E_Menu *m, E_Menu_Item *mi EINA_UNUSED)
|
_e_e_int_menus_conf_comp_cb(void *data EINA_UNUSED, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
|
||||||
{
|
{
|
||||||
e_int_config_comp(e_comp_get(m), NULL);
|
e_int_config_comp(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1840,9 +1840,9 @@ _e_int_menus_shelves_add_cb(void *data __UNUSED__, E_Menu *m __UNUSED__, E_Menu_
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_int_menus_shelves_del_cb(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_e_int_menus_shelves_del_cb(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
e_configure_registry_call("extensions/shelves", m->zone->comp, NULL);
|
e_configure_registry_call("extensions/shelves", NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -43,10 +43,10 @@ e_int_shelf_config(E_Shelf *es)
|
||||||
v->basic.check_changed = _basic_check_changed;
|
v->basic.check_changed = _basic_check_changed;
|
||||||
|
|
||||||
es->config_dialog =
|
es->config_dialog =
|
||||||
e_config_dialog_new(es->zone->comp, _("Shelf Settings"),
|
e_config_dialog_new(NULL, _("Shelf Settings"),
|
||||||
"E", "_shelf_config_dialog",
|
"E", "_shelf_config_dialog",
|
||||||
"preferences-desktop-shelf", 0, v, es);
|
"preferences-desktop-shelf", 0, v, es);
|
||||||
e_win_centered_set(es->config_dialog->dia->win, EINA_TRUE);
|
elm_win_center(es->config_dialog->dia->win, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local functions */
|
/* local functions */
|
||||||
|
|
|
@ -64,8 +64,6 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
tbar = cfdata->tbar;
|
tbar = cfdata->tbar;
|
||||||
if (!tbar) return 0;
|
if (!tbar) return 0;
|
||||||
e_toolbar_orient(tbar, cfdata->orient);
|
e_toolbar_orient(tbar, cfdata->orient);
|
||||||
if ((tbar->fwin) && (tbar->fwin->cb_resize))
|
|
||||||
tbar->fwin->cb_resize(tbar->fwin);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,14 +141,12 @@ _e_smart_add(Evas_Object *obj)
|
||||||
evas_object_smart_member_add(sd->evas_obj, obj);
|
evas_object_smart_member_add(sd->evas_obj, obj);
|
||||||
evas_object_image_size_set(sd->evas_obj, sd->vw, sd->vh);
|
evas_object_image_size_set(sd->evas_obj, sd->vw, sd->vh);
|
||||||
sd->evas = ecore_evas_get(sd->ee);
|
sd->evas = ecore_evas_get(sd->ee);
|
||||||
e_canvas_add(sd->ee);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_smart_del(Evas_Object *obj)
|
_e_smart_del(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
INTERNAL_ENTRY;
|
INTERNAL_ENTRY;
|
||||||
e_canvas_del(sd->ee);
|
|
||||||
evas_object_del(sd->evas_obj);
|
evas_object_del(sd->evas_obj);
|
||||||
free(sd);
|
free(sd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,10 +562,6 @@ main(int argc, char **argv)
|
||||||
e_font_apply();
|
e_font_apply();
|
||||||
TS("E_Font Apply Done");
|
TS("E_Font Apply Done");
|
||||||
|
|
||||||
TS("E_Canvas Recache");
|
|
||||||
e_canvas_recache();
|
|
||||||
TS("E_Canvas Recache Done");
|
|
||||||
|
|
||||||
TS("E_Theme Init");
|
TS("E_Theme Init");
|
||||||
if (!e_theme_init())
|
if (!e_theme_init())
|
||||||
{
|
{
|
||||||
|
@ -1022,7 +1018,7 @@ main(int argc, char **argv)
|
||||||
inloop = EINA_FALSE;
|
inloop = EINA_FALSE;
|
||||||
stopping = EINA_TRUE;
|
stopping = EINA_TRUE;
|
||||||
|
|
||||||
if (!x_fatal) e_canvas_idle_flush();
|
//if (!x_fatal) e_canvas_idle_flush();
|
||||||
|
|
||||||
e_config_save_flush();
|
e_config_save_flush();
|
||||||
_e_main_desk_save();
|
_e_main_desk_save();
|
||||||
|
@ -1469,7 +1465,6 @@ _e_main_test_formats(void)
|
||||||
"Evas has Software Buffer engine support.\n"));
|
"Evas has Software Buffer engine support.\n"));
|
||||||
_e_main_shutdown(-1);
|
_e_main_shutdown(-1);
|
||||||
}
|
}
|
||||||
e_canvas_add(ee);
|
|
||||||
evas = ecore_evas_get(ee);
|
evas = ecore_evas_get(ee);
|
||||||
im = evas_object_image_add(evas);
|
im = evas_object_image_add(evas);
|
||||||
|
|
||||||
|
@ -1526,7 +1521,6 @@ _e_main_test_formats(void)
|
||||||
_e_main_shutdown(-1);
|
_e_main_shutdown(-1);
|
||||||
}
|
}
|
||||||
evas_object_del(txt);
|
evas_object_del(txt);
|
||||||
e_canvas_del(ee);
|
|
||||||
ecore_evas_free(ee);
|
ecore_evas_free(ee);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -603,10 +603,10 @@ e_module_dialog_show(E_Module *m, const char *title, const char *body)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s.edj",
|
snprintf(buf, sizeof(buf), "%s/%s.edj",
|
||||||
e_module_dir_get(m), desktop->icon);
|
e_module_dir_get(m), desktop->icon);
|
||||||
dia->icon_object = e_util_icon_add(buf, e_win_evas_get(dia->win));
|
dia->icon_object = e_util_icon_add(buf, evas_object_evas_get(dia->win));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dia->icon_object = e_util_icon_add(icon, e_win_evas_get(dia->win));
|
dia->icon_object = e_util_icon_add(icon, evas_object_evas_get(dia->win));
|
||||||
evas_object_size_hint_min_set(dia->icon_object, 64, 64);
|
evas_object_size_hint_min_set(dia->icon_object, 64, 64);
|
||||||
edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object);
|
edje_object_part_swallow(dia->bg_object, "e.swallow.icon", dia->icon_object);
|
||||||
evas_object_show(dia->icon_object);
|
evas_object_show(dia->icon_object);
|
||||||
|
@ -619,11 +619,10 @@ e_module_dialog_show(E_Module *m, const char *title, const char *body)
|
||||||
e_dialog_text_set(dia, body);
|
e_dialog_text_set(dia, body);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
if (!m) return;
|
if (!m) return;
|
||||||
if (dia->win->client)
|
e_win_client_icon_set(dia->win, icon);
|
||||||
dia->win->client->internal_icon = eina_stringshare_add(icon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -758,8 +757,8 @@ _e_module_dialog_disable_show(const char *title, const char *body, E_Module *m)
|
||||||
e_dialog_text_set(dia, buf);
|
e_dialog_text_set(dia, buf);
|
||||||
e_dialog_button_add(dia, _("Unload"), NULL, _e_module_cb_dialog_disable, m);
|
e_dialog_button_add(dia, _("Unload"), NULL, _e_module_cb_dialog_disable, m);
|
||||||
e_dialog_button_add(dia, _("Keep"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("Keep"), NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
dia->win->state.no_remember = 1;
|
e_win_no_remember_set(dia->win, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1032,7 +1031,7 @@ _e_module_whitelist_check(void)
|
||||||
e_dialog_text_set(dia, eina_strbuf_string_get(sbuf));
|
e_dialog_text_set(dia, eina_strbuf_string_get(sbuf));
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, _cleanup_cb, badl);
|
e_dialog_button_add(dia, _("OK"), NULL, _cleanup_cb, badl);
|
||||||
e_dialog_button_add(dia, _("I know"), NULL, _ignore_cb, badl);
|
e_dialog_button_add(dia, _("I know"), NULL, _ignore_cb, badl);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
eina_strbuf_free(sbuf);
|
eina_strbuf_free(sbuf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void _e_obj_dialog_free(E_Obj_Dialog *od);
|
static void _e_obj_dialog_free(E_Obj_Dialog *od);
|
||||||
static void _e_obj_dialog_cb_delete(E_Win *win);
|
static void _e_obj_dialog_cb_delete(E_Obj_Dialog *od, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||||
static void _e_obj_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source);
|
static void _e_obj_dialog_cb_close(void *data, Evas_Object *obj, const char *emission, const char *source);
|
||||||
static void _e_obj_dialog_cb_resize(E_Win *win);
|
|
||||||
|
|
||||||
/* local subsystem globals */
|
/* local subsystem globals */
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ _key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *
|
||||||
Evas_Event_Key_Down *ev = event;
|
Evas_Event_Key_Down *ev = event;
|
||||||
|
|
||||||
if (!strcmp(ev->key, "Escape") && data)
|
if (!strcmp(ev->key, "Escape") && data)
|
||||||
_e_obj_dialog_cb_delete(data);
|
_e_obj_dialog_cb_delete(data, NULL, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Obj_Dialog *
|
EAPI E_Obj_Dialog *
|
||||||
|
@ -30,23 +29,21 @@ e_obj_dialog_new(E_Comp *c, char *title, char *class_name, char *class_class)
|
||||||
if (!c) c = e_util_comp_current_get();
|
if (!c) c = e_util_comp_current_get();
|
||||||
od = E_OBJECT_ALLOC(E_Obj_Dialog, E_OBJ_DIALOG_TYPE, _e_obj_dialog_free);
|
od = E_OBJECT_ALLOC(E_Obj_Dialog, E_OBJ_DIALOG_TYPE, _e_obj_dialog_free);
|
||||||
if (!od) return NULL;
|
if (!od) return NULL;
|
||||||
od->win = e_win_new(c);
|
od->win = elm_win_add(NULL, NULL, ELM_WIN_DIALOG_BASIC);
|
||||||
if (!od->win)
|
if (!od->win)
|
||||||
{
|
{
|
||||||
free(od);
|
free(od);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
e_win_delete_callback_set(od->win, _e_obj_dialog_cb_delete);
|
evas_object_event_callback_add(od->win, EVAS_CALLBACK_DEL, (Evas_Object_Event_Cb)_e_obj_dialog_cb_delete, od);
|
||||||
e_win_resize_callback_set(od->win, _e_obj_dialog_cb_resize);
|
ecore_evas_name_class_set(e_win_ee_get(od->win), class_name, class_class);
|
||||||
od->win->data = od;
|
elm_win_title_set(od->win, title);
|
||||||
e_win_dialog_set(od->win, 1);
|
|
||||||
e_win_name_class_set(od->win, class_name, class_class);
|
|
||||||
e_win_title_set(od->win, title);
|
|
||||||
|
|
||||||
o = edje_object_add(e_win_evas_get(od->win));
|
o = edje_object_add(evas_object_evas_get(od->win));
|
||||||
|
elm_win_resize_object_add(od->win, o);
|
||||||
od->bg_object = o;
|
od->bg_object = o;
|
||||||
|
|
||||||
e_win_centered_set(od->win, 1);
|
elm_win_center(od->win, 1, 1);
|
||||||
od->cb_delete = NULL;
|
od->cb_delete = NULL;
|
||||||
|
|
||||||
mask = 0;
|
mask = 0;
|
||||||
|
@ -70,7 +67,7 @@ e_obj_dialog_icon_set(E_Obj_Dialog *od, char *icon)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(od);
|
E_OBJECT_CHECK(od);
|
||||||
E_OBJECT_TYPE_CHECK(od, E_OBJ_DIALOG_TYPE);
|
E_OBJECT_TYPE_CHECK(od, E_OBJ_DIALOG_TYPE);
|
||||||
eina_stringshare_replace(&od->win->client->internal_icon, icon);
|
e_win_client_icon_set(od->win, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -85,22 +82,19 @@ e_obj_dialog_show(E_Obj_Dialog *od)
|
||||||
edje_object_size_min_get(od->bg_object, &mw, &mh);
|
edje_object_size_min_get(od->bg_object, &mw, &mh);
|
||||||
edje_object_size_min_restricted_calc(od->bg_object, &mw, &mh, mw, mh);
|
edje_object_size_min_restricted_calc(od->bg_object, &mw, &mh, mw, mh);
|
||||||
evas_object_resize(od->bg_object, mw, mh);
|
evas_object_resize(od->bg_object, mw, mh);
|
||||||
e_win_resize(od->win, mw, mh);
|
evas_object_resize(od->win, mw, mh);
|
||||||
e_win_size_min_set(od->win, mw, mh);
|
evas_object_size_hint_min_set(od->win, mw, mh);
|
||||||
edje_object_size_max_get(od->bg_object, &w, &h);
|
edje_object_size_max_get(od->bg_object, &w, &h);
|
||||||
if ((w > 0) && (h > 0))
|
if ((w > 0) && (h > 0))
|
||||||
{
|
{
|
||||||
if (w < mw) w = mw;
|
if (w < mw) w = mw;
|
||||||
if (h < mh) h = mh;
|
if (h < mh) h = mh;
|
||||||
e_win_size_max_set(od->win, w, h);
|
evas_object_size_hint_max_set(od->win, w, h);
|
||||||
}
|
}
|
||||||
s = edje_object_data_get(od->bg_object, "borderless");
|
s = edje_object_data_get(od->bg_object, "borderless");
|
||||||
if (s && (!strcmp(s, "1")))
|
if (s && (!strcmp(s, "1")))
|
||||||
e_win_borderless_set(od->win, 1);
|
elm_win_borderless_set(od->win, 1);
|
||||||
s = edje_object_data_get(od->bg_object, "shaped");
|
evas_object_show(od->win);
|
||||||
if (s && (!strcmp(s, "1")))
|
|
||||||
e_win_shaped_set(od->win, 1);
|
|
||||||
e_win_show(od->win);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -129,16 +123,13 @@ static void
|
||||||
_e_obj_dialog_free(E_Obj_Dialog *od)
|
_e_obj_dialog_free(E_Obj_Dialog *od)
|
||||||
{
|
{
|
||||||
if (od->bg_object) evas_object_del(od->bg_object);
|
if (od->bg_object) evas_object_del(od->bg_object);
|
||||||
e_object_del(E_OBJECT(od->win));
|
evas_object_del(od->win);
|
||||||
free(od);
|
free(od);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_obj_dialog_cb_delete(E_Win *win)
|
_e_obj_dialog_cb_delete(E_Obj_Dialog *od, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Obj_Dialog *od;
|
|
||||||
|
|
||||||
od = win->data;
|
|
||||||
if (od->cb_delete)
|
if (od->cb_delete)
|
||||||
od->cb_delete(od);
|
od->cb_delete(od);
|
||||||
e_object_del(E_OBJECT(od));
|
e_object_del(E_OBJECT(od));
|
||||||
|
@ -154,13 +145,3 @@ _e_obj_dialog_cb_close(void *data, Evas_Object *obj __UNUSED__, const char *emis
|
||||||
od->cb_delete(od);
|
od->cb_delete(od);
|
||||||
e_util_defer_object_del(E_OBJECT(od));
|
e_util_defer_object_del(E_OBJECT(od));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_e_obj_dialog_cb_resize(E_Win *win)
|
|
||||||
{
|
|
||||||
E_Obj_Dialog *od;
|
|
||||||
|
|
||||||
od = win->data;
|
|
||||||
evas_object_resize(od->bg_object, od->win->w, od->win->h);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ struct _E_Obj_Dialog
|
||||||
{
|
{
|
||||||
E_Object e_obj_inherit;
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
Evas_Object *bg_object;
|
Evas_Object *bg_object;
|
||||||
void *data;
|
void *data;
|
||||||
void (*cb_delete)(E_Obj_Dialog *od);
|
void (*cb_delete)(E_Obj_Dialog *od);
|
||||||
|
|
|
@ -202,7 +202,7 @@ _e_screensaver_ask_presentation_mode(void)
|
||||||
|
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_widget_list_homogeneous_set(dia->box_object, 0);
|
e_widget_list_homogeneous_set(dia->box_object, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
|
evas_object_event_callback_add(dia->bg_object, EVAS_CALLBACK_KEY_DOWN,
|
||||||
|
|
|
@ -86,8 +86,8 @@ _e_startup_error_dialog(const char *msg)
|
||||||
e_dialog_icon_set(dia, "enlightenment", 64);
|
e_dialog_icon_set(dia, "enlightenment", 64);
|
||||||
e_dialog_text_set(dia, msg);
|
e_dialog_text_set(dia, msg);
|
||||||
e_dialog_button_add(dia, _("Close"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("Close"), NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
dia->win->state.no_remember = 1;
|
e_win_no_remember_set(dia->win, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -724,7 +724,7 @@ _e_sys_cb_logout_timer(void *data __UNUSED__)
|
||||||
_e_sys_cb_logout_abort, NULL);
|
_e_sys_cb_logout_abort, NULL);
|
||||||
e_dialog_button_focus_num(dia, 1);
|
e_dialog_button_focus_num(dia, 1);
|
||||||
_e_sys_logout_confirm_dialog_update(E_LOGOUT_AUTO_TIME);
|
_e_sys_logout_confirm_dialog_update(E_LOGOUT_AUTO_TIME);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
_e_sys_logout_begin_time = now;
|
_e_sys_logout_begin_time = now;
|
||||||
}
|
}
|
||||||
|
@ -852,7 +852,7 @@ _e_sys_current_action(void)
|
||||||
}
|
}
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -893,7 +893,7 @@ _e_sys_action_failed(void)
|
||||||
}
|
}
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,16 +98,16 @@ _e_test_internal(E_Comp *c)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
|
|
||||||
win = e_win_new(c);
|
win = e_win_new(c);
|
||||||
e_win_resize_callback_set(win, _e_test_resize);
|
evas_object_resize_callback_set(win, _e_test_resize);
|
||||||
e_win_delete_callback_set(win, _e_test_delete);
|
e_win_delete_callback_set(win, _e_test_delete);
|
||||||
e_win_placed_set(win, 0);
|
e_win_placed_set(win, 0);
|
||||||
e_win_move_resize(win, 10, 80, 400, 200);
|
evas_object_geometry_set(win, 10, 80, 400, 200);
|
||||||
e_win_name_class_set(win, "E", "_test_window");
|
e_win_name_class_set(win, "E", "_test_window");
|
||||||
e_win_title_set(win, "A test window");
|
e_win_title_set(win, "A test window");
|
||||||
e_win_raise(win);
|
elm_win_raise(win);
|
||||||
e_win_show(win);
|
evas_object_show(win);
|
||||||
|
|
||||||
o = evas_object_rectangle_add(e_win_evas_get(win));
|
o = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||||
evas_object_color_set(o, 255, 200, 100, 255);
|
evas_object_color_set(o, 255, 200, 100, 255);
|
||||||
evas_object_resize(o, 400, 200);
|
evas_object_resize(o, 400, 200);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
@ -169,7 +169,7 @@ _e_test_internal(E_Comp *c)
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL);
|
e_dialog_button_add(dia, "Apply", "system-restart", NULL, NULL);
|
||||||
e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL);
|
e_dialog_button_add(dia, "Cancel", "application-exit", NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ _e_test_internal(E_Comp *c)
|
||||||
|
|
||||||
e_dialog_content_set(dia, o2, 500, 300);
|
e_dialog_content_set(dia, o2, 500, 300);
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
evas_object_focus_set(o, 1);
|
evas_object_focus_set(o, 1);
|
||||||
|
@ -363,7 +363,7 @@ _e_test_internal(E_Comp *c)
|
||||||
e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
|
e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
|
||||||
e_dialog_content_set(dia, o2, 200, 150);
|
e_dialog_content_set(dia, o2, 200, 150);
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ _e_test_internal(E_Comp *c)
|
||||||
e_dialog_content_set(dia, o, 240 + mw, mh);
|
e_dialog_content_set(dia, o, 240 + mw, mh);
|
||||||
|
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
evas_object_focus_set(o, 1);
|
evas_object_focus_set(o, 1);
|
||||||
|
@ -449,7 +449,7 @@ _e_test_internal(E_Comp *c)
|
||||||
e_dialog_content_set(dia, o, 160, 160);
|
e_dialog_content_set(dia, o, 160, 160);
|
||||||
|
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
|
|
||||||
evas_object_focus_set(o, 1);
|
evas_object_focus_set(o, 1);
|
||||||
|
@ -621,9 +621,9 @@ _e_test_internal(E_Comp *c)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_resize(dia->win, 400, 300);
|
evas_object_resize(dia->win, 400, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif 0
|
#elif 0
|
||||||
|
@ -660,9 +660,9 @@ _e_test_internal(E_Comp *c)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_resize(dia->win, 400, 300);
|
evas_object_resize(dia->win, 400, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif 0
|
#elif 0
|
||||||
|
@ -748,9 +748,9 @@ _e_test_internal(E_Comp *c)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_resize(dia->win, 400, 400);
|
evas_object_resize(dia->win, 400, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -813,9 +813,9 @@ _e_test_timer(void *data)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_resize(dia->win, 400, 200);
|
evas_object_resize(dia->win, 400, 200);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -880,9 +880,9 @@ _e_test_timer(void *data)
|
||||||
/* buttons at the bottom */
|
/* buttons at the bottom */
|
||||||
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
|
||||||
e_dialog_resizable_set(dia, 1);
|
e_dialog_resizable_set(dia, 1);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
e_win_resize(dia->win, 400, 200);
|
evas_object_resize(dia->win, 400, 200);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,9 @@
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_cb_settings_theme(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
_cb_settings_theme(void *data EINA_UNUSED, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Obj_Dialog *od = data;
|
e_configure_registry_call("appearance/theme", NULL, NULL);
|
||||||
|
|
||||||
e_configure_registry_call("appearance/theme", od->win->comp, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local subsystem globals */
|
/* local subsystem globals */
|
||||||
|
|
|
@ -150,7 +150,7 @@ e_toolbar_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Toolbar *
|
EAPI E_Toolbar *
|
||||||
e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2)
|
e_toolbar_new(Evas *evas, const char *name, Evas_Object *fwin, Evas_Object *fm2)
|
||||||
{
|
{
|
||||||
E_Toolbar *tbar = NULL;
|
E_Toolbar *tbar = NULL;
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2)
|
||||||
|
|
||||||
e_gadcon_toolbar_set(tbar->gadcon, tbar);
|
e_gadcon_toolbar_set(tbar->gadcon, tbar);
|
||||||
tbar->gadcon->location = tb_location;
|
tbar->gadcon->location = tb_location;
|
||||||
e_gadcon_ecore_evas_set(tbar->gadcon, tbar->fwin->ecore_evas);
|
e_gadcon_ecore_evas_set(tbar->gadcon, ecore_evas_ecore_evas_get(evas_object_evas_get(tbar->fwin)));
|
||||||
e_gadcon_util_menu_attach_func_set(tbar->gadcon,
|
e_gadcon_util_menu_attach_func_set(tbar->gadcon,
|
||||||
_e_toolbar_menu_items_append, tbar);
|
_e_toolbar_menu_items_append, tbar);
|
||||||
e_gadcon_populate(tbar->gadcon);
|
e_gadcon_populate(tbar->gadcon);
|
||||||
|
@ -212,14 +212,14 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_toolbar_fwin_set(E_Toolbar *tbar, E_Win *fwin)
|
e_toolbar_fwin_set(E_Toolbar *tbar, Evas_Object *fwin)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(tbar);
|
E_OBJECT_CHECK(tbar);
|
||||||
E_OBJECT_TYPE_CHECK(tbar, E_TOOLBAR_TYPE);
|
E_OBJECT_TYPE_CHECK(tbar, E_TOOLBAR_TYPE);
|
||||||
tbar->fwin = fwin;
|
tbar->fwin = fwin;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI E_Win *
|
EAPI Evas_Object *
|
||||||
e_toolbar_fwin_get(E_Toolbar *tbar)
|
e_toolbar_fwin_get(E_Toolbar *tbar)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK_RETURN(tbar, NULL);
|
E_OBJECT_CHECK_RETURN(tbar, NULL);
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct _E_Toolbar
|
||||||
E_Gadcon *gadcon;
|
E_Gadcon *gadcon;
|
||||||
E_Menu *menu;
|
E_Menu *menu;
|
||||||
|
|
||||||
E_Win *fwin;
|
Evas_Object *fwin;
|
||||||
Evas_Object *fm2;
|
Evas_Object *fm2;
|
||||||
|
|
||||||
E_Config_Dialog *cfg_dlg;
|
E_Config_Dialog *cfg_dlg;
|
||||||
|
@ -28,9 +28,9 @@ struct _E_Toolbar
|
||||||
|
|
||||||
EINTERN int e_toolbar_init(void);
|
EINTERN int e_toolbar_init(void);
|
||||||
EINTERN int e_toolbar_shutdown(void);
|
EINTERN int e_toolbar_shutdown(void);
|
||||||
EAPI E_Toolbar *e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2);
|
EAPI E_Toolbar *e_toolbar_new(Evas *evas, const char *name, Evas_Object *fwin, Evas_Object *fm2);
|
||||||
EAPI void e_toolbar_fwin_set(E_Toolbar *tbar, E_Win *fwin);
|
EAPI void e_toolbar_fwin_set(E_Toolbar *tbar, Evas_Object *fwin);
|
||||||
EAPI E_Win *e_toolbar_fwin_get(E_Toolbar *tbar);
|
EAPI Evas_Object *e_toolbar_fwin_get(E_Toolbar *tbar);
|
||||||
EAPI void e_toolbar_fm2_set(E_Toolbar *tbar, Evas_Object *fm2);
|
EAPI void e_toolbar_fm2_set(E_Toolbar *tbar, Evas_Object *fm2);
|
||||||
EAPI Evas_Object *e_toolbar_fm2_get(E_Toolbar *tbar);
|
EAPI Evas_Object *e_toolbar_fm2_get(E_Toolbar *tbar);
|
||||||
EAPI void e_toolbar_orient(E_Toolbar *tbar, E_Gadcon_Orient orient);
|
EAPI void e_toolbar_orient(E_Toolbar *tbar, E_Gadcon_Orient orient);
|
||||||
|
|
|
@ -88,7 +88,7 @@ _new_version(const char *ver)
|
||||||
"or update your system packages<br>"
|
"or update your system packages<br>"
|
||||||
"to get a new version."), ver);
|
"to get a new version."), ver);
|
||||||
e_dialog_text_set(dialog, text);
|
e_dialog_text_set(dialog, text);
|
||||||
e_win_centered_set(dialog->win, 1);
|
elm_win_center(dialog->win, 1, 1);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,7 @@ e_util_dialog_internal(const char *title, const char *txt)
|
||||||
e_dialog_icon_set(dia, "dialog-error", 64);
|
e_dialog_icon_set(dia, "dialog-error", 64);
|
||||||
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
e_dialog_button_add(dia, _("OK"), NULL, NULL, NULL);
|
||||||
e_dialog_button_focus_num(dia, 0);
|
e_dialog_button_focus_num(dia, 0);
|
||||||
e_win_centered_set(dia->win, 1);
|
elm_win_center(dia->win, 1, 1);
|
||||||
e_dialog_show(dia);
|
e_dialog_show(dia);
|
||||||
return dia;
|
return dia;
|
||||||
}
|
}
|
||||||
|
@ -834,24 +834,27 @@ _win_auto_size_calc(int max, int min)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_util_win_auto_resize_fill(E_Win *win)
|
e_util_win_auto_resize_fill(Evas_Object *win)
|
||||||
{
|
{
|
||||||
E_Zone *zone = NULL;
|
E_Zone *zone = NULL;
|
||||||
|
E_Client *ec;
|
||||||
|
|
||||||
if (win->client)
|
ec = e_win_client_get(win);
|
||||||
zone = win->client->zone;
|
if (ec)
|
||||||
if ((!zone) && (win->comp))
|
zone = ec->zone;
|
||||||
zone = e_zone_current_get(win->comp);
|
if (!zone)
|
||||||
|
zone = e_zone_current_get(e_comp_get(NULL));
|
||||||
|
|
||||||
if (zone)
|
if (zone)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h, mw, mh;
|
||||||
|
|
||||||
e_zone_useful_geometry_get(zone, NULL, NULL, &w, &h);
|
e_zone_useful_geometry_get(zone, NULL, NULL, &w, &h);
|
||||||
|
|
||||||
w = _win_auto_size_calc(w, win->min_w);
|
evas_object_size_hint_min_get(win, &mw, &mh);
|
||||||
h = _win_auto_size_calc(h, win->min_h);
|
w = _win_auto_size_calc(w, mw);
|
||||||
e_win_resize(win, w, h);
|
h = _win_auto_size_calc(h, mh);
|
||||||
|
evas_object_resize(win, w, h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ EAPI void e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop, uns
|
||||||
EAPI int e_util_dir_check(const char *dir);
|
EAPI int e_util_dir_check(const char *dir);
|
||||||
EAPI void e_util_defer_object_del(E_Object *obj);
|
EAPI void e_util_defer_object_del(E_Object *obj);
|
||||||
EAPI const char *e_util_winid_str_get(Ecore_X_Window win);
|
EAPI const char *e_util_winid_str_get(Ecore_X_Window win);
|
||||||
EAPI void e_util_win_auto_resize_fill(E_Win *win);
|
EAPI void e_util_win_auto_resize_fill(Evas_Object *win);
|
||||||
/* check if loaded config version matches the current version, show a
|
/* check if loaded config version matches the current version, show a
|
||||||
dialog warning if loaded version is older or newer than current */
|
dialog warning if loaded version is older or newer than current */
|
||||||
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current);
|
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current);
|
||||||
|
|
|
@ -481,11 +481,11 @@ e_widget_disabled_get(Evas_Object *obj)
|
||||||
EAPI E_Pointer *
|
EAPI E_Pointer *
|
||||||
e_widget_pointer_get(Evas_Object *obj)
|
e_widget_pointer_get(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
E_Win *win = NULL;
|
Evas_Object *win = NULL;
|
||||||
|
|
||||||
API_ENTRY return NULL;
|
API_ENTRY return NULL;
|
||||||
win = e_win_evas_object_win_get(obj);
|
win = e_win_evas_object_win_get(obj);
|
||||||
if (win) return win->pointer;
|
if (win) return e_win_pointer_get(win);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ _e_wid_desk_cb_config(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUS
|
||||||
|
|
||||||
snprintf(buff, sizeof(buff), "%i %i %i %i",
|
snprintf(buff, sizeof(buff), "%i %i %i %i",
|
||||||
dd->manager, dd->zone, dd->x, dd->y);
|
dd->manager, dd->zone, dd->x, dd->y);
|
||||||
e_configure_registry_call("internal/desk", e_util_comp_current_get(), buff);
|
e_configure_registry_call("internal/desk", NULL, buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
765
src/bin/e_win.c
765
src/bin/e_win.c
|
@ -1,21 +1,4 @@
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
|
||||||
# include "e_comp_wl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
|
||||||
static void _e_win_free(E_Win *win);
|
|
||||||
static void _e_win_prop_update(E_Win *win);
|
|
||||||
static void _e_win_state_update(E_Win *win);
|
|
||||||
static void _e_win_cb_move(Ecore_Evas *ee);
|
|
||||||
static void _e_win_cb_resize(Ecore_Evas *ee);
|
|
||||||
static void _e_win_cb_delete(Ecore_Evas *ee);
|
|
||||||
static void _e_win_cb_destroy(Ecore_Evas *ee);
|
|
||||||
static void _e_win_cb_state(Ecore_Evas *ee);
|
|
||||||
|
|
||||||
/* local subsystem globals */
|
|
||||||
static Eina_List *wins = NULL;
|
|
||||||
|
|
||||||
/* intercept elm_win operations so we talk directly to e_client */
|
/* intercept elm_win operations so we talk directly to e_client */
|
||||||
|
|
||||||
|
@ -24,23 +7,21 @@ static Eina_List *wins = NULL;
|
||||||
typedef struct _Elm_Win_Trap_Ctx
|
typedef struct _Elm_Win_Trap_Ctx
|
||||||
{
|
{
|
||||||
E_Client *client;
|
E_Client *client;
|
||||||
Ecore_Window xwin;
|
E_Pointer *pointer;
|
||||||
Eina_Bool centered : 1;
|
Eina_Bool centered : 1;
|
||||||
Eina_Bool placed : 1;
|
Eina_Bool placed : 1;
|
||||||
|
Eina_Bool internal_no_remember : 1;
|
||||||
|
Eina_Bool internal_no_reopen : 1;
|
||||||
|
Eina_Bool visible : 1;
|
||||||
} Elm_Win_Trap_Ctx;
|
} Elm_Win_Trap_Ctx;
|
||||||
|
|
||||||
static void
|
|
||||||
_elm_win_prop_update(Elm_Win_Trap_Ctx *ctx)
|
|
||||||
{
|
|
||||||
EC_CHANGED(ctx->client);
|
|
||||||
ctx->client->changes.internal_props = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
_elm_win_trap_add(Evas_Object *o __UNUSED__)
|
_elm_win_trap_add(Evas_Object *o)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = calloc(1, sizeof(Elm_Win_Trap_Ctx));
|
Elm_Win_Trap_Ctx *ctx = calloc(1, sizeof(Elm_Win_Trap_Ctx));
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL);
|
||||||
|
evas_object_name_set(o, "E_Win");
|
||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,17 +35,22 @@ _elm_win_trap_del(void *data, Evas_Object *o)
|
||||||
evas_object_hide(ctx->client->frame);
|
evas_object_hide(ctx->client->frame);
|
||||||
e_object_del(E_OBJECT(ctx->client));
|
e_object_del(E_OBJECT(ctx->client));
|
||||||
evas_object_data_set(o, "E_Client", NULL);
|
evas_object_data_set(o, "E_Client", NULL);
|
||||||
ctx->client->internal_ecore_evas = NULL;
|
ctx->client->internal_elm_win = NULL;
|
||||||
}
|
}
|
||||||
free(ctx);
|
free(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_elm_win_trap_hide(void *data, Evas_Object *o __UNUSED__)
|
_elm_win_trap_hide(void *data, Evas_Object *o)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
|
if (!ctx->visible) return EINA_FALSE;
|
||||||
|
if (strncmp(ecore_evas_engine_name_get(e_win_ee_get(o)), "wayland", 7))
|
||||||
|
E_FREE_FUNC(ctx->pointer, e_object_del);
|
||||||
|
|
||||||
if (!ctx->client) return EINA_TRUE;
|
if (!ctx->client) return EINA_TRUE;
|
||||||
|
ctx->visible = 0;
|
||||||
evas_object_hide(ctx->client->frame);
|
evas_object_hide(ctx->client->frame);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -73,25 +59,29 @@ static Eina_Bool
|
||||||
_elm_win_trap_show(void *data, Evas_Object *o)
|
_elm_win_trap_show(void *data, Evas_Object *o)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
|
Evas *e = evas_object_evas_get(o);
|
||||||
|
Ecore_Evas *ee = ecore_evas_ecore_evas_get(e);
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
if (!ctx->client)
|
if (!ctx->client)
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
Ecore_Window win;
|
Ecore_Window win;
|
||||||
|
E_Pixmap_Type type;
|
||||||
|
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
|
||||||
win = elm_win_window_id_get(o);
|
win = elm_win_window_id_get(o);
|
||||||
ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, win);
|
if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7))
|
||||||
#else
|
{
|
||||||
win = elm_win_xwindow_get(o);
|
type = E_PIXMAP_TYPE_WL;
|
||||||
ec = e_pixmap_find_client(E_PIXMAP_TYPE_X, win);
|
ctx->pointer = e_comp_get(NULL)->pointer;
|
||||||
#endif
|
}
|
||||||
|
else
|
||||||
Evas *e = evas_object_evas_get(o);
|
{
|
||||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(e);
|
type = E_PIXMAP_TYPE_X;
|
||||||
|
ctx->pointer = e_pointer_window_new(win, EINA_TRUE);
|
||||||
ctx->xwin = win;
|
}
|
||||||
|
|
||||||
|
ec = e_pixmap_find_client(type, win);
|
||||||
if (ec)
|
if (ec)
|
||||||
ctx->client = ec;
|
ctx->client = ec;
|
||||||
else
|
else
|
||||||
|
@ -99,11 +89,9 @@ _elm_win_trap_show(void *data, Evas_Object *o)
|
||||||
E_Pixmap *cp;
|
E_Pixmap *cp;
|
||||||
E_Comp *c = NULL;
|
E_Comp *c = NULL;
|
||||||
|
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
ecore_evas_name_class_set(ee, "E", "_e_internal_window");
|
||||||
cp = e_pixmap_new(E_PIXMAP_TYPE_WL, win);
|
ecore_evas_title_set(ee, "E");
|
||||||
#else
|
cp = e_pixmap_new(type, win);
|
||||||
cp = e_pixmap_new(E_PIXMAP_TYPE_X, win);
|
|
||||||
#endif
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
|
||||||
|
|
||||||
/* if (eina_list_count(e_comp_list()) > 1) */
|
/* if (eina_list_count(e_comp_list()) > 1) */
|
||||||
|
@ -120,13 +108,21 @@ _elm_win_trap_show(void *data, Evas_Object *o)
|
||||||
ctx->client = e_client_new(c, cp, 0, 1);
|
ctx->client = e_client_new(c, cp, 0, 1);
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
|
||||||
}
|
}
|
||||||
ctx->client->placed = ctx->placed;
|
ctx->client->placed = ctx->placed | ctx->centered;
|
||||||
ctx->client->internal_ecore_evas = ee;
|
ctx->client->internal_no_remember = ctx->internal_no_remember;
|
||||||
|
ctx->client->internal_no_reopen = ctx->internal_no_reopen;
|
||||||
|
ctx->client->internal_elm_win = o;
|
||||||
evas_object_data_set(o, "E_Client", ctx->client);
|
evas_object_data_set(o, "E_Client", ctx->client);
|
||||||
|
|
||||||
|
evas_object_size_hint_min_get(o, &ctx->client->icccm.min_w, &ctx->client->icccm.min_h);
|
||||||
|
evas_object_size_hint_max_get(o, &ctx->client->icccm.max_w, &ctx->client->icccm.max_h);
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
|
evas_object_geometry_get(o, &ctx->client->client.x, &ctx->client->client.y, &ctx->client->client.w, &ctx->client->client.h);
|
||||||
|
ecore_evas_show(ee);
|
||||||
evas_object_show(ctx->client->frame);
|
evas_object_show(ctx->client->frame);
|
||||||
|
if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
|
||||||
|
ctx->visible = 1;
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,11 +131,12 @@ _elm_win_trap_move(void *data, Evas_Object *o __UNUSED__, int x, int y)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
ctx->centered = EINA_FALSE;
|
ctx->centered = 0;
|
||||||
ctx->placed = EINA_TRUE;
|
ctx->placed = 1;
|
||||||
if (!ctx->client) return EINA_TRUE;
|
if (!ctx->client) return EINA_TRUE;
|
||||||
|
if ((ctx->client->client.x != x) || (ctx->client->client.y != y))
|
||||||
e_client_util_move_without_frame(ctx->client, x, y);
|
e_client_util_move_without_frame(ctx->client, x, y);
|
||||||
return EINA_FALSE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
@ -147,11 +144,11 @@ _elm_win_trap_resize(void *data, Evas_Object *o __UNUSED__, int w, int h)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
ctx->centered = EINA_FALSE;
|
|
||||||
if (!ctx->client) return EINA_TRUE;
|
if (!ctx->client) return EINA_TRUE;
|
||||||
e_client_resize_limit(ctx->client, &w, &h);
|
e_client_resize_limit(ctx->client, &w, &h);
|
||||||
|
if ((ctx->client->client.w != w) || (ctx->client->client.h != h))
|
||||||
e_client_util_resize_without_frame(ctx->client, w, h);
|
e_client_util_resize_without_frame(ctx->client, w, h);
|
||||||
return EINA_FALSE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
@ -159,8 +156,8 @@ _elm_win_trap_center(void *data, Evas_Object *o __UNUSED__)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
ctx->centered = EINA_TRUE;
|
ctx->centered = ctx->placed = 1;
|
||||||
if (!ctx->client) return EINA_TRUE;
|
if (!ctx->client) return EINA_FALSE;
|
||||||
if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
|
if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -197,19 +194,78 @@ _elm_win_trap_activate(void *data, Evas_Object *o __UNUSED__)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_elm_win_trap_size_min_set(void *data, Evas_Object *o __UNUSED__, int w, int h)
|
||||||
|
{
|
||||||
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
|
int mw, mh;
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
|
if (!ctx->client) return EINA_TRUE;
|
||||||
|
ctx->client->icccm.min_w = w;
|
||||||
|
ctx->client->icccm.min_h = h;
|
||||||
|
e_client_resize_limit(ctx->client, &mw, &mh);
|
||||||
|
mw = ctx->client->w < w ? w : ctx->client->w;
|
||||||
|
mh = ctx->client->h < h ? h : ctx->client->h;
|
||||||
|
if ((ctx->client->w != mw) || (ctx->client->h != mh))
|
||||||
|
evas_object_resize(ctx->client->frame, mw, mh);
|
||||||
|
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_elm_win_trap_size_max_set(void *data, Evas_Object *o __UNUSED__, int w, int h)
|
||||||
|
{
|
||||||
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
|
int mw, mh;
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
|
if (!ctx->client) return EINA_TRUE;
|
||||||
|
ctx->client->icccm.max_w = w;
|
||||||
|
ctx->client->icccm.max_h = h;
|
||||||
|
e_client_resize_limit(ctx->client, &mw, &mh);
|
||||||
|
mw = ctx->client->w > w ? w : ctx->client->w;
|
||||||
|
mh = ctx->client->h > h ? h : ctx->client->h;
|
||||||
|
if ((ctx->client->w != mw) || (ctx->client->h != mh))
|
||||||
|
evas_object_resize(ctx->client->frame, mw, mh);
|
||||||
|
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_elm_win_trap_size_base_set(void *data, Evas_Object *o __UNUSED__, int w, int h)
|
_elm_win_trap_size_base_set(void *data, Evas_Object *o __UNUSED__, int w, int h)
|
||||||
{
|
{
|
||||||
Elm_Win_Trap_Ctx *ctx = data;
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
|
int mw, mh;
|
||||||
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
if (!ctx->client) return EINA_TRUE;
|
if (!ctx->client) return EINA_TRUE;
|
||||||
ctx->client->icccm.base_w = w;
|
ctx->client->icccm.base_w = w;
|
||||||
ctx->client->icccm.base_h = h;
|
ctx->client->icccm.base_h = h;
|
||||||
_elm_win_prop_update(ctx);
|
e_client_resize_limit(ctx->client, &mw, &mh);
|
||||||
|
mw = ctx->client->w < w ? w : ctx->client->w;
|
||||||
|
mh = ctx->client->h < h ? h : ctx->client->h;
|
||||||
|
if ((ctx->client->w != mw) || (ctx->client->h != mh))
|
||||||
|
evas_object_resize(ctx->client->frame, mw, mh);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_elm_win_trap_borderless_set(void *data, Evas_Object *o EINA_UNUSED, Eina_Bool borderless)
|
||||||
|
{
|
||||||
|
Elm_Win_Trap_Ctx *ctx = data;
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
|
||||||
|
if (!ctx->client) return EINA_TRUE;
|
||||||
|
|
||||||
|
borderless = !!borderless;
|
||||||
|
|
||||||
|
ctx->client->borderless = borderless;
|
||||||
|
EC_CHANGED(ctx->client);
|
||||||
|
ctx->client->changes.border = 1;
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static const Elm_Win_Trap _elm_win_trap = {
|
static const Elm_Win_Trap _elm_win_trap = {
|
||||||
ELM_WIN_TRAP_VERSION,
|
ELM_WIN_TRAP_VERSION,
|
||||||
_elm_win_trap_add,
|
_elm_win_trap_add,
|
||||||
|
@ -225,7 +281,7 @@ static const Elm_Win_Trap _elm_win_trap = {
|
||||||
/* alpha_set */ NULL,
|
/* alpha_set */ NULL,
|
||||||
/* aspect_set */ NULL,
|
/* aspect_set */ NULL,
|
||||||
/* avoid_damage_set */ NULL,
|
/* avoid_damage_set */ NULL,
|
||||||
/* borderless_set */ NULL,
|
_elm_win_trap_borderless_set,
|
||||||
/* demand_attention_set */ NULL,
|
/* demand_attention_set */ NULL,
|
||||||
/* focus_skip_set */ NULL,
|
/* focus_skip_set */ NULL,
|
||||||
/* fullscreen_set */ NULL,
|
/* fullscreen_set */ NULL,
|
||||||
|
@ -242,41 +298,14 @@ static const Elm_Win_Trap _elm_win_trap = {
|
||||||
/* shaped_set */ NULL,
|
/* shaped_set */ NULL,
|
||||||
_elm_win_trap_size_base_set,
|
_elm_win_trap_size_base_set,
|
||||||
/* size_step_set */ NULL,
|
/* size_step_set */ NULL,
|
||||||
/* size_min_set */ NULL,
|
_elm_win_trap_size_min_set,
|
||||||
/* size_max_set */ NULL,
|
_elm_win_trap_size_max_set,
|
||||||
/* sticky_set */ NULL,
|
/* sticky_set */ NULL,
|
||||||
/* title_set */ NULL,
|
/* title_set */ NULL,
|
||||||
/* urgent_set */ NULL,
|
/* urgent_set */ NULL,
|
||||||
/* withdrawn_set */ NULL
|
/* withdrawn_set */ NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_hide(void *obj)
|
|
||||||
{
|
|
||||||
E_Win *win = obj;
|
|
||||||
E_Win_Cb cb;
|
|
||||||
|
|
||||||
if (!win->client) return;
|
|
||||||
e_object_ref(E_OBJECT(win));
|
|
||||||
cb = win->cb_delete;
|
|
||||||
win->cb_delete = NULL;
|
|
||||||
if (cb) cb(win);
|
|
||||||
if (!e_object_unref(E_OBJECT(win)))
|
|
||||||
return;
|
|
||||||
if ((win->pointer) && (win->comp->comp_type != E_PIXMAP_TYPE_WL))
|
|
||||||
E_FREE_FUNC(win->pointer, e_object_del);
|
|
||||||
e_canvas_del(win->ecore_evas);
|
|
||||||
ecore_evas_callback_move_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_resize_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_delete_request_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_state_change_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_destroy_set(win->ecore_evas, NULL);
|
|
||||||
/* prevent any more rendering at this point */
|
|
||||||
ecore_evas_manual_render_set(win->ecore_evas, 1);
|
|
||||||
if (win->client->visible) evas_object_hide(win->client->frame);
|
|
||||||
e_object_del(E_OBJECT(win->client));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
EINTERN int
|
EINTERN int
|
||||||
e_win_init(void)
|
e_win_init(void)
|
||||||
|
@ -288,546 +317,92 @@ e_win_init(void)
|
||||||
EINTERN int
|
EINTERN int
|
||||||
e_win_shutdown(void)
|
e_win_shutdown(void)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
while (wins)
|
|
||||||
{
|
|
||||||
e_object_del(E_OBJECT(wins->data));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI E_Client *
|
||||||
|
e_win_client_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Elm_Win_Trap_Ctx *ctx;
|
||||||
|
|
||||||
|
if (!e_obj_is_win(obj)) return NULL;
|
||||||
|
ctx = elm_win_trap_data_get(obj);
|
||||||
|
|
||||||
|
return ctx ? ctx->client : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Evas *
|
||||||
|
e_win_ee_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
return ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI E_Pointer *
|
||||||
|
e_win_pointer_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
|
|
||||||
|
return ctx ? ctx->pointer : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
e_win_elm_available(void)
|
e_win_centered_get(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
return EINA_TRUE;
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
}
|
|
||||||
|
|
||||||
EAPI E_Win *
|
return ctx ? ctx->centered : EINA_FALSE;
|
||||||
e_win_new(E_Comp *c)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
Evas_Object *obj;
|
|
||||||
|
|
||||||
win = E_OBJECT_ALLOC(E_Win, E_WIN_TYPE, _e_win_free);
|
|
||||||
if (!win) return NULL;
|
|
||||||
e_object_delay_del_set(E_OBJECT(win), _e_win_hide);
|
|
||||||
win->comp = c;
|
|
||||||
win->ecore_evas = e_canvas_new(c->man->root,
|
|
||||||
0, 0, 1, 1, 1, 0,
|
|
||||||
&win->evas_win);
|
|
||||||
e_canvas_add(win->ecore_evas);
|
|
||||||
ecore_evas_data_set(win->ecore_evas, "E_Win", win);
|
|
||||||
ecore_evas_callback_move_set(win->ecore_evas, _e_win_cb_move);
|
|
||||||
ecore_evas_callback_resize_set(win->ecore_evas, _e_win_cb_resize);
|
|
||||||
ecore_evas_callback_delete_request_set(win->ecore_evas, _e_win_cb_delete);
|
|
||||||
ecore_evas_callback_destroy_set(win->ecore_evas, _e_win_cb_destroy);
|
|
||||||
ecore_evas_callback_state_change_set(win->ecore_evas, _e_win_cb_state);
|
|
||||||
win->evas = ecore_evas_get(win->ecore_evas);
|
|
||||||
ecore_evas_name_class_set(win->ecore_evas, "E", "_e_internal_window");
|
|
||||||
ecore_evas_title_set(win->ecore_evas, "E");
|
|
||||||
obj = evas_object_rectangle_add(win->evas);
|
|
||||||
evas_object_name_set(obj, "E_Win");
|
|
||||||
evas_object_data_set(obj, "E_Win", win);
|
|
||||||
win->x = 0;
|
|
||||||
win->y = 0;
|
|
||||||
win->w = 1;
|
|
||||||
win->h = 1;
|
|
||||||
win->placed = 0;
|
|
||||||
win->min_w = 0;
|
|
||||||
win->min_h = 0;
|
|
||||||
win->max_w = 9999;
|
|
||||||
win->max_h = 9999;
|
|
||||||
win->base_w = 0;
|
|
||||||
win->base_h = 0;
|
|
||||||
win->step_x = 1;
|
|
||||||
win->step_y = 1;
|
|
||||||
win->min_aspect = 0.0;
|
|
||||||
win->max_aspect = 0.0;
|
|
||||||
wins = eina_list_append(wins, win);
|
|
||||||
|
|
||||||
if (c->comp_type == E_PIXMAP_TYPE_X)
|
|
||||||
win->pointer = e_pointer_window_new(win->evas_win, EINA_TRUE);
|
|
||||||
else if (c->comp_type == E_PIXMAP_TYPE_WL)
|
|
||||||
win->pointer = c->pointer;
|
|
||||||
|
|
||||||
return win;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_win_show(E_Win *win)
|
e_win_client_icon_set(Evas_Object *obj, const char *icon)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_show(win->ecore_evas);
|
|
||||||
if (!win->client)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
|
||||||
if (!strncmp(ecore_evas_engine_name_get(win->ecore_evas), "wayland", 7))
|
|
||||||
{
|
|
||||||
Ecore_Wl_Window *wl_win;
|
|
||||||
E_Pixmap *ep;
|
|
||||||
uint64_t id;
|
|
||||||
|
|
||||||
wl_win = ecore_evas_wayland_window_get(win->ecore_evas);
|
if (ctx->client)
|
||||||
id = e_comp_wl_id_get(getpid(), ecore_wl_window_surface_id_get(wl_win));
|
eina_stringshare_replace(&ctx->client->internal_icon, icon);
|
||||||
if (!(ep = e_pixmap_find(E_PIXMAP_TYPE_WL, id)))
|
|
||||||
ep = e_pixmap_new(E_PIXMAP_TYPE_WL, id);
|
|
||||||
win->client = e_client_new(win->comp, ep, 1, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
win->client = e_client_new(win->comp, e_pixmap_new(E_PIXMAP_TYPE_X, win->evas_win), 0, 1);
|
|
||||||
EINA_SAFETY_ON_NULL_RETURN(win->client);
|
|
||||||
if (win->ecore_evas)
|
|
||||||
win->client->internal_ecore_evas = win->ecore_evas;
|
|
||||||
if (win->state.no_remember) win->client->internal_no_remember = 1;
|
|
||||||
win->client->internal_no_reopen = win->state.no_reopen;
|
|
||||||
win->client->client.w = win->client->w = win->w;
|
|
||||||
win->client->client.h = win->client->h = win->h;
|
|
||||||
win->client->take_focus = win->client->changes.size = win->client->changes.pos = 1;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
}
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
|
||||||
if (e_pixmap_is_x(win->client->pixmap))
|
|
||||||
{
|
|
||||||
if (win->state.dialog)
|
|
||||||
ecore_x_icccm_transient_for_set(ecore_evas_window_get(win->ecore_evas), win->client->comp->man->root);
|
|
||||||
else
|
|
||||||
ecore_x_icccm_transient_for_unset(ecore_evas_window_get(win->ecore_evas));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
if (win->state.centered)
|
|
||||||
e_comp_object_util_center(win->client->frame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_win_hide(E_Win *win)
|
e_win_client_icon_key_set(Evas_Object *obj, const char *key)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if (win->client) evas_object_hide(win->client->frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
if (ctx->client)
|
||||||
* This will move window to position, automatically accounts client decorations.
|
eina_stringshare_replace(&ctx->client->internal_icon_key, key);
|
||||||
*
|
|
||||||
* @parm x horizontal position to place window.
|
|
||||||
* @parm y vertical position to place window.
|
|
||||||
*/
|
|
||||||
EAPI void
|
|
||||||
e_win_move(E_Win *win, int x, int y)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if (win->client)
|
|
||||||
{
|
|
||||||
e_client_util_move_without_frame(win->client, x, y);
|
|
||||||
win->client->changes.pos = 1;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ecore_evas_move(win->ecore_evas, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This will resize window, automatically accounts client decorations.
|
|
||||||
*
|
|
||||||
* @parm w horizontal window size.
|
|
||||||
* @parm h vertical window size.
|
|
||||||
*/
|
|
||||||
EAPI void
|
|
||||||
e_win_resize(E_Win *win, int w, int h)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if (win->client)
|
|
||||||
{
|
|
||||||
e_client_util_resize_without_frame(win->client, w, h);
|
|
||||||
win->client->changes.size = 1;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ecore_evas_resize(win->ecore_evas, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This will move and resize window to position, automatically
|
|
||||||
* accounts client decorations.
|
|
||||||
*
|
|
||||||
* @parm x horizontal position to place window.
|
|
||||||
* @parm y vertical position to place window.
|
|
||||||
* @parm w horizontal window size.
|
|
||||||
* @parm h vertical window size.
|
|
||||||
*/
|
|
||||||
EAPI void
|
|
||||||
e_win_move_resize(E_Win *win, int x, int y, int w, int h)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if (win->client)
|
|
||||||
{
|
|
||||||
e_client_util_move_resize_without_frame(win->client, x, y, w, h);
|
|
||||||
win->client->changes.pos = win->client->changes.size = 1;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ecore_evas_move_resize(win->ecore_evas, x, y, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_win_raise(E_Win *win)
|
e_win_placed_set(Evas_Object *obj, Eina_Bool placed)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if (win->client)
|
|
||||||
evas_object_raise(win->client->frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||||
e_win_lower(E_Win *win)
|
ctx->placed = !!placed;
|
||||||
|
if (ctx->client)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
ctx->client->placed = !!placed;
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
EC_CHANGED(ctx->client);
|
||||||
if (win->client)
|
|
||||||
evas_object_lower(win->client->frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_placed_set(E_Win *win, int placed)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->placed = placed;
|
|
||||||
if (win->client)
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI Evas *
|
|
||||||
e_win_evas_get(E_Win *win)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK_RETURN(win, NULL);
|
|
||||||
E_OBJECT_TYPE_CHECK_RETURN(win, E_WIN_TYPE, NULL);
|
|
||||||
return win->evas;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_move_callback_set(E_Win *win, void (*func)(E_Win *win))
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->cb_move = func;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_resize_callback_set(E_Win *win, void (*func)(E_Win *win))
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->cb_resize = func;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_delete_callback_set(E_Win *win, void (*func)(E_Win *win))
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->cb_delete = func;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_shaped_set(E_Win *win, int shaped)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_shaped_set(win->ecore_evas, shaped);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_avoid_damage_set(E_Win *win, int avoid)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_avoid_damage_set(win->ecore_evas, avoid);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_borderless_set(E_Win *win, int borderless)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_borderless_set(win->ecore_evas, borderless);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_layer_set(E_Win *win, E_Win_Layer layer)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_layer_set(win->ecore_evas, layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_sticky_set(E_Win *win, int sticky)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_sticky_set(win->ecore_evas, sticky);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_size_min_set(E_Win *win, int w, int h)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
w = MIN(w, 32768);
|
|
||||||
h = MIN(h, 32768);
|
|
||||||
win->min_w = w;
|
|
||||||
win->min_h = h;
|
|
||||||
if (!win->client) return;
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_size_max_set(E_Win *win, int w, int h)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
w = MIN(w, 32768);
|
|
||||||
h = MIN(h, 32768);
|
|
||||||
win->max_w = w;
|
|
||||||
win->max_h = h;
|
|
||||||
if (!win->client) return;
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_size_base_set(E_Win *win, int w, int h)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
w = MIN(w, 32768);
|
|
||||||
h = MIN(h, 32768);
|
|
||||||
win->base_w = w;
|
|
||||||
win->base_h = h;
|
|
||||||
if (!win->client) return;
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_step_set(E_Win *win, int x, int y)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->step_x = x;
|
|
||||||
win->step_y = y;
|
|
||||||
if (!win->client) return;
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_name_class_set(E_Win *win, const char *name, const char *class)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_name_class_set(win->ecore_evas, name, class);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_title_set(E_Win *win, const char *title)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
ecore_evas_title_set(win->ecore_evas, title);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_centered_set(E_Win *win, int centered)
|
|
||||||
{
|
|
||||||
E_OBJECT_CHECK(win);
|
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if ((win->state.centered) && (!centered))
|
|
||||||
{
|
|
||||||
win->state.centered = 0;
|
|
||||||
_e_win_state_update(win);
|
|
||||||
}
|
|
||||||
else if ((!win->state.centered) && (centered))
|
|
||||||
{
|
|
||||||
win->state.centered = 1;
|
|
||||||
_e_win_state_update(win);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_win_dialog_set(E_Win *win, int dialog)
|
e_win_no_remember_set(Evas_Object *obj, Eina_Bool no_rem)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
if ((win->state.dialog) && (!dialog))
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||||
{
|
ctx->internal_no_remember = !!no_rem;
|
||||||
win->state.dialog = 0;
|
if (ctx->client)
|
||||||
_e_win_prop_update(win);
|
ctx->client->internal_no_remember = !!no_rem;
|
||||||
}
|
|
||||||
else if ((!win->state.dialog) && (dialog))
|
|
||||||
{
|
|
||||||
win->state.dialog = 1;
|
|
||||||
_e_win_prop_update(win);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
e_win_no_remember_set(E_Win *win, int no_remember)
|
e_win_no_reopen_set(Evas_Object *obj, Eina_Bool no_reopen)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(win);
|
Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
|
||||||
E_OBJECT_TYPE_CHECK(win, E_WIN_TYPE);
|
|
||||||
win->state.no_remember = no_remember;
|
EINA_SAFETY_ON_NULL_RETURN(obj);
|
||||||
}
|
ctx->internal_no_reopen = !!no_reopen;
|
||||||
|
if (ctx->client)
|
||||||
EAPI E_Win *
|
ctx->client->internal_no_reopen = !!no_reopen;
|
||||||
e_win_evas_object_win_get(Evas_Object *obj)
|
|
||||||
{
|
|
||||||
Evas *evas;
|
|
||||||
Evas_Object *wobj;
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
if (!obj) return NULL;
|
|
||||||
evas = evas_object_evas_get(obj);
|
|
||||||
wobj = evas_object_name_find(evas, "E_Win");
|
|
||||||
if (!wobj) return NULL;
|
|
||||||
win = evas_object_data_get(wobj, "E_Win");
|
|
||||||
return win;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_client_icon_set(E_Win *win, const char *icon)
|
|
||||||
{
|
|
||||||
if (win->client)
|
|
||||||
eina_stringshare_replace(&win->client->internal_icon, icon);
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI void
|
|
||||||
e_win_client_icon_key_set(E_Win *win, const char *key)
|
|
||||||
{
|
|
||||||
if (win->client)
|
|
||||||
eina_stringshare_replace(&win->client->internal_icon_key, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* local subsystem functions */
|
|
||||||
static void
|
|
||||||
_e_win_free(E_Win *win)
|
|
||||||
{
|
|
||||||
if ((win->pointer) && (win->comp->comp_type != E_PIXMAP_TYPE_WL))
|
|
||||||
e_object_del(E_OBJECT(win->pointer));
|
|
||||||
|
|
||||||
if (win->ecore_evas)
|
|
||||||
{
|
|
||||||
ecore_evas_callback_move_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_resize_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_state_change_set(win->ecore_evas, NULL);
|
|
||||||
ecore_evas_callback_destroy_set(win->ecore_evas, NULL);
|
|
||||||
}
|
|
||||||
wins = eina_list_remove(wins, win);
|
|
||||||
free(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_prop_update(E_Win *win)
|
|
||||||
{
|
|
||||||
if (!win->client) return;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
win->client->icccm.min_w = win->min_w;
|
|
||||||
win->client->icccm.min_h = win->min_h;
|
|
||||||
win->client->icccm.max_w = win->max_w;
|
|
||||||
win->client->icccm.max_h = win->max_h;
|
|
||||||
win->client->icccm.base_w = win->base_w;
|
|
||||||
win->client->icccm.base_h = win->base_h;
|
|
||||||
win->client->icccm.step_w = win->step_x;
|
|
||||||
win->client->icccm.step_h = win->step_y;
|
|
||||||
win->client->icccm.min_aspect = win->min_aspect;
|
|
||||||
win->client->icccm.max_aspect = win->max_aspect;
|
|
||||||
win->client->changes.internal_props = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_state_update(E_Win *win)
|
|
||||||
{
|
|
||||||
if (!win->client) return;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
win->client->changes.internal_state = 1;
|
|
||||||
if (win->state.centered)
|
|
||||||
e_comp_object_util_center(win->client->frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_cb_move(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (!win) return;
|
|
||||||
if (win->client)
|
|
||||||
win->x = win->client->x, win->y = win->client->y;
|
|
||||||
else
|
|
||||||
ecore_evas_geometry_get(win->ecore_evas, &win->x, &win->y, NULL, NULL);
|
|
||||||
if (win->cb_move) win->cb_move(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_cb_resize(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (!win) return;
|
|
||||||
ecore_evas_geometry_get(win->ecore_evas, NULL, NULL, &win->w, &win->h);
|
|
||||||
if (win->cb_resize) win->cb_resize(win);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_cb_destroy(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (!win) return;
|
|
||||||
e_object_ref(E_OBJECT(win));
|
|
||||||
if (win->cb_delete) win->cb_delete(win);
|
|
||||||
win->cb_delete = NULL;
|
|
||||||
e_object_unref(E_OBJECT(win));
|
|
||||||
/* E_FREE_FUNC(win->pointer, e_object_del); */
|
|
||||||
if (!win->client) return;
|
|
||||||
win->client->internal_ecore_evas = NULL;
|
|
||||||
e_canvas_del(ee);
|
|
||||||
e_pixmap_usable_set(win->client->pixmap, 0);
|
|
||||||
if (win->client->visible) evas_object_hide(win->client->frame);
|
|
||||||
win->ecore_evas = NULL;
|
|
||||||
e_object_del(E_OBJECT(win->client));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_cb_delete(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
E_Win_Cb cb;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (!win) return;
|
|
||||||
e_object_ref(E_OBJECT(win));
|
|
||||||
cb = win->cb_delete;
|
|
||||||
win->cb_delete = NULL;
|
|
||||||
if (cb) cb(win);
|
|
||||||
e_object_unref(E_OBJECT(win));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_win_cb_state(Ecore_Evas *ee)
|
|
||||||
{
|
|
||||||
E_Win *win;
|
|
||||||
|
|
||||||
win = ecore_evas_data_get(ee, "E_Win");
|
|
||||||
if (!win) return;
|
|
||||||
if (!win->client) return;
|
|
||||||
EC_CHANGED(win->client);
|
|
||||||
win->client->changes.size = 1;
|
|
||||||
}
|
}
|
||||||
|
|
110
src/bin/e_win.h
110
src/bin/e_win.h
|
@ -1,85 +1,43 @@
|
||||||
#ifdef E_TYPEDEFS
|
#ifndef E_TYPEDEFS
|
||||||
|
|
||||||
typedef enum _E_Win_Layer
|
|
||||||
{
|
|
||||||
E_WIN_LAYER_BELOW = 3,
|
|
||||||
E_WIN_LAYER_NORMAL = 4,
|
|
||||||
E_WIN_LAYER_ABOVE = 5
|
|
||||||
} E_Win_Layer;
|
|
||||||
|
|
||||||
typedef struct _E_Win E_Win;
|
|
||||||
|
|
||||||
typedef void (*E_Win_Cb)(E_Win*);
|
|
||||||
|
|
||||||
#else
|
|
||||||
#ifndef E_WIN_H
|
#ifndef E_WIN_H
|
||||||
#define E_WIN_H
|
#define E_WIN_H
|
||||||
|
|
||||||
#define E_WIN_TYPE 0xE0b01011
|
|
||||||
|
|
||||||
struct _E_Win
|
|
||||||
{
|
|
||||||
E_Object e_obj_inherit;
|
|
||||||
|
|
||||||
int x, y, w, h;
|
|
||||||
E_Comp *comp;
|
|
||||||
E_Client *client;
|
|
||||||
Ecore_Evas *ecore_evas;
|
|
||||||
Evas *evas;
|
|
||||||
Ecore_Window evas_win;
|
|
||||||
unsigned char placed : 1;
|
|
||||||
int min_w, min_h, max_w, max_h, base_w, base_h;
|
|
||||||
int step_x, step_y;
|
|
||||||
double min_aspect, max_aspect;
|
|
||||||
E_Win_Cb cb_move;
|
|
||||||
E_Win_Cb cb_resize;
|
|
||||||
E_Win_Cb cb_delete;
|
|
||||||
void *data;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
unsigned char centered : 1;
|
|
||||||
unsigned char dialog : 1;
|
|
||||||
unsigned char no_remember : 1;
|
|
||||||
unsigned char no_reopen : 1;
|
|
||||||
} state;
|
|
||||||
|
|
||||||
E_Pointer *pointer;
|
|
||||||
};
|
|
||||||
|
|
||||||
EINTERN int e_win_init (void);
|
EINTERN int e_win_init (void);
|
||||||
EINTERN int e_win_shutdown (void);
|
EINTERN int e_win_shutdown (void);
|
||||||
EAPI Eina_Bool e_win_elm_available(void);
|
|
||||||
EAPI E_Win *e_win_new (E_Comp *c);
|
|
||||||
EAPI void e_win_show (E_Win *win);
|
|
||||||
EAPI void e_win_hide (E_Win *win);
|
|
||||||
EAPI void e_win_move (E_Win *win, int x, int y);
|
|
||||||
EAPI void e_win_resize (E_Win *win, int w, int h);
|
|
||||||
EAPI void e_win_move_resize (E_Win *win, int x, int y, int w, int h);
|
|
||||||
EAPI void e_win_raise (E_Win *win);
|
|
||||||
EAPI void e_win_lower (E_Win *win);
|
|
||||||
EAPI void e_win_placed_set (E_Win *win, int placed);
|
|
||||||
EAPI Evas *e_win_evas_get (E_Win *win);
|
|
||||||
EAPI void e_win_shaped_set (E_Win *win, int shaped);
|
|
||||||
EAPI void e_win_avoid_damage_set (E_Win *win, int avoid);
|
|
||||||
EAPI void e_win_borderless_set (E_Win *win, int borderless);
|
|
||||||
EAPI void e_win_layer_set (E_Win *win, E_Win_Layer layer);
|
|
||||||
EAPI void e_win_sticky_set (E_Win *win, int sticky);
|
|
||||||
EAPI void e_win_move_callback_set (E_Win *win, void (*func) (E_Win *win));
|
|
||||||
EAPI void e_win_resize_callback_set(E_Win *win, void (*func) (E_Win *win));
|
|
||||||
EAPI void e_win_delete_callback_set(E_Win *win, void (*func) (E_Win *win));
|
|
||||||
EAPI void e_win_size_min_set (E_Win *win, int w, int h);
|
|
||||||
EAPI void e_win_size_max_set (E_Win *win, int w, int h);
|
|
||||||
EAPI void e_win_size_base_set (E_Win *win, int w, int h);
|
|
||||||
EAPI void e_win_step_set (E_Win *win, int x, int y);
|
|
||||||
EAPI void e_win_name_class_set (E_Win *win, const char *name, const char *class);
|
|
||||||
EAPI void e_win_title_set (E_Win *win, const char *title);
|
|
||||||
EAPI void e_win_client_icon_set (E_Win *win, const char *icon);
|
|
||||||
EAPI void e_win_client_icon_key_set(E_Win *win, const char *key);
|
|
||||||
EAPI void e_win_centered_set (E_Win *win, int centered);
|
|
||||||
EAPI void e_win_dialog_set (E_Win *win, int dialog);
|
|
||||||
EAPI void e_win_no_remember_set (E_Win *win, int no_remember);
|
|
||||||
|
|
||||||
EAPI E_Win *e_win_evas_object_win_get(Evas_Object *obj);
|
|
||||||
|
EAPI E_Client *e_win_client_get(Evas_Object *obj);
|
||||||
|
EAPI Ecore_Evas *e_win_ee_get(Evas_Object *obj);
|
||||||
|
EAPI E_Pointer *e_win_pointer_get(Evas_Object *obj);
|
||||||
|
EAPI Eina_Bool e_win_centered_get(Evas_Object *obj);
|
||||||
|
|
||||||
|
EAPI void e_win_client_icon_set(Evas_Object *win, const char *icon);
|
||||||
|
EAPI void e_win_client_icon_key_set(Evas_Object *win, const char *key);
|
||||||
|
|
||||||
|
EAPI void e_win_placed_set(Evas_Object *win, Eina_Bool placed);
|
||||||
|
EAPI void e_win_no_remember_set(Evas_Object *win, Eina_Bool no_rem);
|
||||||
|
EAPI void e_win_no_reopen_set(Evas_Object *win, Eina_Bool no_reopen);
|
||||||
|
|
||||||
|
static inline Evas_Object *
|
||||||
|
e_win_evas_object_win_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
return ecore_evas_data_get(e_win_ee_get(obj), "elm_win");
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline Eina_Bool
|
||||||
|
e_obj_is_win(const void *obj)
|
||||||
|
{
|
||||||
|
const char *type = evas_object_type_get(obj);
|
||||||
|
return type && !strcmp(type, "elm_win");
|
||||||
|
}
|
||||||
|
|
||||||
|
#define E_WIN_START \
|
||||||
|
char *eng__ = eina_strdup(getenv("ELM_ACCEL")); \
|
||||||
|
e_util_env_set("ELM_ACCEL", "none")
|
||||||
|
|
||||||
|
#define E_WIN_END \
|
||||||
|
e_util_env_set("ELM_ACCEL", eng__); \
|
||||||
|
free(eng__)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -81,8 +81,6 @@ _e_zone_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
E_Zone_Edge edge;
|
E_Zone_Edge edge;
|
||||||
E_Zone *zone = data;
|
E_Zone *zone = data;
|
||||||
const Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
edge = _e_zone_detect_edge(zone, obj);
|
edge = _e_zone_detect_edge(zone, obj);
|
||||||
if (edge == E_ZONE_EDGE_NONE) return;
|
if (edge == E_ZONE_EDGE_NONE) return;
|
||||||
|
@ -93,13 +91,7 @@ _e_zone_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *eve
|
||||||
zev->x = ev->output.x;
|
zev->x = ev->output.x;
|
||||||
zev->y = ev->output.y;
|
zev->y = ev->output.y;
|
||||||
zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers);
|
zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers);
|
||||||
EINA_LIST_FOREACH(e_canvas_list(), l, ee)
|
zev->drag = !!evas_pointer_button_down_mask_get(e_comp_get(zone)->evas);
|
||||||
{
|
|
||||||
/* FIXME: comp */
|
|
||||||
if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue;
|
|
||||||
zev->drag = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_ZONE_EDGE_IN, zev, NULL, NULL);
|
ecore_event_add(E_EVENT_ZONE_EDGE_IN, zev, NULL, NULL);
|
||||||
e_bindings_edge_in_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
|
e_bindings_edge_in_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
|
||||||
|
@ -112,8 +104,6 @@ _e_zone_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev
|
||||||
E_Event_Zone_Edge *zev;
|
E_Event_Zone_Edge *zev;
|
||||||
E_Zone_Edge edge;
|
E_Zone_Edge edge;
|
||||||
E_Zone *zone = data;
|
E_Zone *zone = data;
|
||||||
const Eina_List *l;
|
|
||||||
Ecore_Evas *ee;
|
|
||||||
|
|
||||||
edge = _e_zone_detect_edge(zone, obj);
|
edge = _e_zone_detect_edge(zone, obj);
|
||||||
if (edge == E_ZONE_EDGE_NONE) return;
|
if (edge == E_ZONE_EDGE_NONE) return;
|
||||||
|
@ -124,13 +114,7 @@ _e_zone_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *ev
|
||||||
zev->x = ev->output.x;
|
zev->x = ev->output.x;
|
||||||
zev->y = ev->output.y;
|
zev->y = ev->output.y;
|
||||||
zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers);
|
zev->modifiers = e_bindings_evas_modifiers_convert(ev->modifiers);
|
||||||
EINA_LIST_FOREACH(e_canvas_list(), l, ee)
|
zev->drag = !!evas_pointer_button_down_mask_get(e_comp_get(zone)->evas);
|
||||||
{
|
|
||||||
/* FIXME: comp */
|
|
||||||
if (!evas_pointer_button_down_mask_get(ecore_evas_get(ee))) continue;
|
|
||||||
zev->drag = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ecore_event_add(E_EVENT_ZONE_EDGE_OUT, zev, NULL, NULL);
|
ecore_event_add(E_EVENT_ZONE_EDGE_OUT, zev, NULL, NULL);
|
||||||
e_bindings_edge_out_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
|
e_bindings_edge_out_event_handle(E_BINDING_CONTEXT_ZONE, E_OBJECT(zone), zev);
|
||||||
|
|
|
@ -163,8 +163,7 @@ static void
|
||||||
_backlight_settings_cb(void *d1, void *d2 __UNUSED__)
|
_backlight_settings_cb(void *d1, void *d2 __UNUSED__)
|
||||||
{
|
{
|
||||||
Instance *inst = d1;
|
Instance *inst = d1;
|
||||||
e_configure_registry_call("screen/power_management",
|
e_configure_registry_call("screen/power_management", NULL, NULL);
|
||||||
inst->gcc->gadcon->zone->comp, NULL);
|
|
||||||
_backlight_popup_free(inst);
|
_backlight_popup_free(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,8 +238,7 @@ _backlight_menu_cb_cfg(void *data, E_Menu *menu __UNUSED__, E_Menu_Item *mi __UN
|
||||||
Instance *inst = data;
|
Instance *inst = data;
|
||||||
|
|
||||||
_backlight_popup_free(inst);
|
_backlight_popup_free(inst);
|
||||||
e_configure_registry_call("screen/power_management",
|
e_configure_registry_call("screen/power_management", NULL, NULL);
|
||||||
inst->gcc->gadcon->zone->comp, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -43,7 +43,7 @@ static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialo
|
||||||
static void _cb_radio_changed(void *data, Evas_Object *obj __UNUSED__);
|
static void _cb_radio_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_battery_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -61,7 +61,7 @@ e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__)
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/e-module-battery.edj",
|
snprintf(buf, sizeof(buf), "%s/e-module-battery.edj",
|
||||||
e_module_dir_get(battery_config->module));
|
e_module_dir_get(battery_config->module));
|
||||||
cfd = e_config_dialog_new(comp, _("Battery Monitor Settings"),
|
cfd = e_config_dialog_new(NULL, _("Battery Monitor Settings"),
|
||||||
"E", "_e_mod_battery_config_dialog",
|
"E", "_e_mod_battery_config_dialog",
|
||||||
buf, 0, v, NULL);
|
buf, 0, v, NULL);
|
||||||
battery_config->config_dialog = cfd;
|
battery_config->config_dialog = cfd;
|
||||||
|
|
|
@ -243,17 +243,17 @@ _battery_face_time_set(Evas_Object *battery, int t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_battery_face_cb_menu_powermanagement(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_battery_face_cb_menu_powermanagement(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
e_configure_registry_call("advanced/powermanagement", m->zone->comp, NULL);
|
e_configure_registry_call("advanced/powermanagement", NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_battery_face_cb_menu_configure(void *data __UNUSED__, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_battery_face_cb_menu_configure(void *data __UNUSED__, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
if (!battery_config) return;
|
if (!battery_config) return;
|
||||||
if (battery_config->config_dialog) return;
|
if (battery_config->config_dialog) return;
|
||||||
e_int_config_battery_module(m->zone->comp, NULL);
|
e_int_config_battery_module(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Battery *
|
Battery *
|
||||||
|
|
|
@ -139,7 +139,7 @@ EAPI void *e_modapi_init (E_Module *m);
|
||||||
EAPI int e_modapi_shutdown (E_Module *m);
|
EAPI int e_modapi_shutdown (E_Module *m);
|
||||||
EAPI int e_modapi_save (E_Module *m);
|
EAPI int e_modapi_save (E_Module *m);
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_battery_module(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_battery_module(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
void _battery_config_updated(void);
|
void _battery_config_updated(void);
|
||||||
extern Config *battery_config;
|
extern Config *battery_config;
|
||||||
|
|
|
@ -90,28 +90,29 @@ _reject(void *data EINA_UNUSED, E_Dialog *dialog)
|
||||||
_reply_and_del_dialog(reply, dialog);
|
_reply_and_del_dialog(reply, dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_close(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
|
{
|
||||||
|
E_Dialog *dialog = data;
|
||||||
|
_reject(NULL, dialog);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ok(void *data EINA_UNUSED, E_Dialog *dialog)
|
_ok(void *data EINA_UNUSED, E_Dialog *dialog)
|
||||||
{
|
{
|
||||||
const Eldbus_Message *msg = dialog->data;
|
const Eldbus_Message *msg = dialog->data;
|
||||||
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
|
||||||
|
evas_object_event_callback_del_full(dialog->win, EVAS_CALLBACK_DEL, _close, dialog);
|
||||||
_reply_and_del_dialog(reply, dialog);
|
_reply_and_del_dialog(reply, dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_close(E_Win *win)
|
|
||||||
{
|
|
||||||
E_Dialog *dialog = win->data;
|
|
||||||
_reject(NULL, dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ask(const char *title, const char *ask_msg, const char *ok_label,
|
_ask(const char *title, const char *ask_msg, const char *ok_label,
|
||||||
Eldbus_Message *eldbus_message)
|
Eldbus_Message *eldbus_message)
|
||||||
{
|
{
|
||||||
E_Dialog *dialog = _create_dialog(title, ask_msg, "dialog-ask", "ask");
|
E_Dialog *dialog = _create_dialog(title, ask_msg, "dialog-ask", "ask");
|
||||||
dialog->data = eldbus_message;
|
dialog->data = eldbus_message;
|
||||||
e_win_delete_callback_set(dialog->win, _close);
|
evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _close, dialog);
|
||||||
e_dialog_button_add(dialog, ok_label, NULL, _ok, NULL);
|
e_dialog_button_add(dialog, ok_label, NULL, _ok, NULL);
|
||||||
e_dialog_button_add(dialog, _("Reject"), NULL, _reject, NULL);
|
e_dialog_button_add(dialog, _("Reject"), NULL, _reject, NULL);
|
||||||
e_dialog_show(dialog);
|
e_dialog_show(dialog);
|
||||||
|
|
|
@ -75,9 +75,9 @@ _ebluez4_search_dialog_del(Instance *inst)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ebluez4_cb_search_dialog_del(E_Win *win)
|
_ebluez4_cb_search_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
E_Dialog *dialog = win->data;
|
E_Dialog *dialog = data;
|
||||||
_ebluez4_search_dialog_del(dialog->data);
|
_ebluez4_search_dialog_del(dialog->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,9 +114,9 @@ _ebluez4_cb_search(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSE
|
||||||
|
|
||||||
dialog = e_dialog_new(NULL, "Search Dialog", "search");
|
dialog = e_dialog_new(NULL, "Search Dialog", "search");
|
||||||
e_dialog_title_set(dialog, _("Searching for Devices..."));
|
e_dialog_title_set(dialog, _("Searching for Devices..."));
|
||||||
e_win_delete_callback_set(dialog->win, _ebluez4_cb_search_dialog_del);
|
evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_search_dialog_del, dialog);
|
||||||
|
|
||||||
evas = e_win_evas_get(dialog->win);
|
evas = evas_object_evas_get(dialog->win);
|
||||||
|
|
||||||
inst->found_list = e_widget_ilist_add(evas, 100, 0, NULL);
|
inst->found_list = e_widget_ilist_add(evas, 100, 0, NULL);
|
||||||
|
|
||||||
|
@ -132,9 +132,9 @@ _ebluez4_cb_search(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSE
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ebluez4_cb_adap_settings_dialog_del(E_Win *win)
|
_ebluez4_cb_adap_settings_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
E_Dialog *dialog = win->data;
|
E_Dialog *dialog = data;
|
||||||
ebluez4_adapter_settings_del(dialog);
|
ebluez4_adapter_settings_del(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,9 +181,9 @@ _ebluez4_cb_adap_settings(void *data)
|
||||||
|
|
||||||
dialog = e_dialog_new(NULL, "Adapter Dialog", "adapter");
|
dialog = e_dialog_new(NULL, "Adapter Dialog", "adapter");
|
||||||
e_dialog_title_set(dialog, _("Adapter Settings"));
|
e_dialog_title_set(dialog, _("Adapter Settings"));
|
||||||
e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_settings_dialog_del);
|
evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_adap_settings_dialog_del, dialog);
|
||||||
|
|
||||||
evas = e_win_evas_get(dialog->win);
|
evas = evas_object_evas_get(dialog->win);
|
||||||
|
|
||||||
list = e_widget_list_add(evas, 0, 0);
|
list = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
|
@ -233,9 +233,9 @@ _ebluez4_adap_list_dialog_del(Instance *inst)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ebluez4_cb_adap_list_dialog_del(E_Win *win)
|
_ebluez4_cb_adap_list_dialog_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
E_Dialog *dialog = win->data;
|
E_Dialog *dialog = data;
|
||||||
_ebluez4_adap_list_dialog_del(dialog->data);
|
_ebluez4_adap_list_dialog_del(dialog->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,9 +251,9 @@ _ebluez4_cb_adap_list(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UN
|
||||||
|
|
||||||
dialog = e_dialog_new(NULL, "Adapters Dialog", "adapters");
|
dialog = e_dialog_new(NULL, "Adapters Dialog", "adapters");
|
||||||
e_dialog_title_set(dialog, _("Adapters Available"));
|
e_dialog_title_set(dialog, _("Adapters Available"));
|
||||||
e_win_delete_callback_set(dialog->win, _ebluez4_cb_adap_list_dialog_del);
|
evas_object_event_callback_add(dialog->win, EVAS_CALLBACK_DEL, _ebluez4_cb_adap_list_dialog_del, dialog);
|
||||||
|
|
||||||
evas = e_win_evas_get(dialog->win);
|
evas = evas_object_evas_get(dialog->win);
|
||||||
|
|
||||||
inst->adap_list = e_widget_ilist_add(evas, 0, 0, NULL);
|
inst->adap_list = e_widget_ilist_add(evas, 0, 0, NULL);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ static int _basic_apply_data(E_Config_Dialog *cfd,
|
||||||
E_Config_Dialog_Data *cfdata);
|
E_Config_Dialog_Data *cfdata);
|
||||||
|
|
||||||
void
|
void
|
||||||
e_int_config_clock_module(E_Comp *comp, Config_Item *ci)
|
e_int_config_clock_module(Evas_Object *parent EINA_UNUSED, Config_Item *ci)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -33,7 +33,7 @@ e_int_config_clock_module(E_Comp *comp, Config_Item *ci)
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/e-module-clock.edj",
|
snprintf(buf, sizeof(buf), "%s/e-module-clock.edj",
|
||||||
e_module_dir_get(clock_config->module));
|
e_module_dir_get(clock_config->module));
|
||||||
cfd = e_config_dialog_new(comp, _("Clock Settings"),
|
cfd = e_config_dialog_new(NULL, _("Clock Settings"),
|
||||||
"E", "utils/clock", buf, 0, v, ci);
|
"E", "utils/clock", buf, 0, v, ci);
|
||||||
clock_config->config_dialog = cfd;
|
clock_config->config_dialog = cfd;
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,7 +282,7 @@ static void
|
||||||
_clock_settings_cb(void *d1, void *d2 __UNUSED__)
|
_clock_settings_cb(void *d1, void *d2 __UNUSED__)
|
||||||
{
|
{
|
||||||
Instance *inst = d1;
|
Instance *inst = d1;
|
||||||
e_int_config_clock_module(e_comp_get(inst->popup), inst->cfg);
|
e_int_config_clock_module(NULL, inst->cfg);
|
||||||
e_object_del(E_OBJECT(inst->popup));
|
e_object_del(E_OBJECT(inst->popup));
|
||||||
inst->popup = NULL;
|
inst->popup = NULL;
|
||||||
inst->o_popclock = NULL;
|
inst->o_popclock = NULL;
|
||||||
|
|
|
@ -34,7 +34,7 @@ struct _Config_Item
|
||||||
Eina_Bool changed;
|
Eina_Bool changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
void e_int_config_clock_module(E_Comp *comp, Config_Item *ci);
|
void e_int_config_clock_module(Evas_Object *parent, Config_Item *ci);
|
||||||
void e_int_clock_instances_redo(Eina_Bool all);
|
void e_int_clock_instances_redo(Eina_Bool all);
|
||||||
|
|
||||||
extern Config *clock_config;
|
extern Config *clock_config;
|
||||||
|
|
|
@ -12,7 +12,7 @@ struct _E_Configure
|
||||||
E_Object e_obj_inherit;
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
E_Comp *comp;
|
E_Comp *comp;
|
||||||
E_Win *win;
|
Evas_Object *win;
|
||||||
Evas *evas;
|
Evas *evas;
|
||||||
Evas_Object *edje;
|
Evas_Object *edje;
|
||||||
|
|
||||||
|
@ -47,8 +47,7 @@ struct _E_Configure_Item
|
||||||
};
|
};
|
||||||
|
|
||||||
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(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
|
||||||
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);
|
||||||
|
@ -69,6 +68,7 @@ e_configure_show(E_Comp *comp, const char *params)
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Evas_Modifier_Mask mask;
|
Evas_Modifier_Mask mask;
|
||||||
Eina_Bool kg;
|
Eina_Bool kg;
|
||||||
|
E_Client *ec;
|
||||||
|
|
||||||
if (_e_configure)
|
if (_e_configure)
|
||||||
{
|
{
|
||||||
|
@ -78,23 +78,24 @@ e_configure_show(E_Comp *comp, const char *params)
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
eco = _e_configure;
|
eco = _e_configure;
|
||||||
|
ec = e_win_client_get(eco->win);
|
||||||
z = e_util_zone_current_get(e_manager_current_get());
|
z = e_util_zone_current_get(e_manager_current_get());
|
||||||
z2 = eco->win->client->zone;
|
z2 = ec->zone;
|
||||||
e_win_show(eco->win);
|
evas_object_show(eco->win);
|
||||||
e_win_raise(eco->win);
|
elm_win_raise(eco->win);
|
||||||
if (z->comp == z2->comp)
|
if (z->comp == z2->comp)
|
||||||
e_client_desk_set(eco->win->client, e_desk_current_get(z));
|
e_client_desk_set(ec, e_desk_current_get(z));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!eco->win->client->sticky)
|
if (!ec->sticky)
|
||||||
e_desk_show(eco->win->client->desk);
|
e_desk_show(ec->desk);
|
||||||
ecore_evas_pointer_warp(z2->comp->ee,
|
ecore_evas_pointer_warp(z2->comp->ee,
|
||||||
z2->x + (z2->w / 2), z2->y + (z2->h / 2));
|
z2->x + (z2->w / 2), z2->y + (z2->h / 2));
|
||||||
}
|
}
|
||||||
e_client_unshade(eco->win->client, eco->win->client->shade_dir);
|
e_client_unshade(ec, ec->shade_dir);
|
||||||
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))
|
||||||
evas_object_focus_set(eco->win->client->frame, 1);
|
evas_object_focus_set(ec->frame, 1);
|
||||||
EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it)
|
EINA_LIST_FOREACH(e_widget_toolbar_items_get(eco->cat_list), l, it)
|
||||||
{
|
{
|
||||||
if (e_widget_toolbar_item_label_get(it) == params)
|
if (e_widget_toolbar_item_label_get(it) == params)
|
||||||
|
@ -109,28 +110,27 @@ e_configure_show(E_Comp *comp, const char *params)
|
||||||
|
|
||||||
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(comp);
|
eco->win = elm_win_add(NULL, NULL, ELM_WIN_BASIC);
|
||||||
if (!eco->win)
|
if (!eco->win)
|
||||||
{
|
{
|
||||||
free(eco);
|
free(eco);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
eco->win->data = eco;
|
evas_object_data_set(eco->win, "e_conf_win", eco);
|
||||||
eco->comp = comp;
|
eco->comp = comp;
|
||||||
eco->evas = e_win_evas_get(eco->win);
|
eco->evas = evas_object_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"));
|
elm_win_title_set(eco->win, _("Settings"));
|
||||||
e_win_name_class_set(eco->win, "E", "_configure");
|
ecore_evas_name_class_set(e_win_ee_get(eco->win), "E", "_configure");
|
||||||
e_win_dialog_set(eco->win, 0);
|
evas_object_event_callback_add(eco->win, EVAS_CALLBACK_DEL, _e_configure_cb_del_req, eco);
|
||||||
e_win_delete_callback_set(eco->win, _e_configure_cb_del_req);
|
elm_win_center(eco->win, 1, 1);
|
||||||
e_win_resize_callback_set(eco->win, _e_configure_cb_resize);
|
|
||||||
e_win_centered_set(eco->win, 1);
|
|
||||||
|
|
||||||
eco->edje = edje_object_add(eco->evas);
|
eco->edje = edje_object_add(eco->evas);
|
||||||
|
elm_win_resize_object_add(eco->win, eco->edje);
|
||||||
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"));
|
||||||
|
@ -144,7 +144,7 @@ e_configure_show(E_Comp *comp, const char *params)
|
||||||
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(evas_object_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);
|
||||||
|
@ -161,23 +161,23 @@ e_configure_show(E_Comp *comp, const char *params)
|
||||||
if (!kg)
|
if (!kg)
|
||||||
fprintf(stderr, "ERROR: unable to redirect \"Escape\" key events to object %p.\n", o);
|
fprintf(stderr, "ERROR: unable to redirect \"Escape\" 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);
|
||||||
|
|
||||||
_e_configure_fill_cat_list(eco, params);
|
_e_configure_fill_cat_list(eco, params);
|
||||||
|
|
||||||
/* 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);
|
||||||
e_widget_size_min_get(eco->close, &mw, &mh);
|
e_widget_size_min_get(eco->close, &mw, &mh);
|
||||||
evas_object_size_hint_min_set(eco->close, mw, mh);
|
evas_object_size_hint_min_set(eco->close, mw, mh);
|
||||||
edje_object_part_swallow(eco->edje, "e.swallow.button", eco->close);
|
edje_object_part_swallow(eco->edje, "e.swallow.button", eco->close);
|
||||||
edje_object_size_min_calc(eco->edje, &ew, &eh);
|
edje_object_size_min_calc(eco->edje, &ew, &eh);
|
||||||
e_win_size_min_set(eco->win, ew, eh);
|
evas_object_size_hint_min_set(eco->win, ew, eh);
|
||||||
e_util_win_auto_resize_fill(eco->win);
|
e_util_win_auto_resize_fill(eco->win);
|
||||||
|
|
||||||
evas_object_show(eco->edje);
|
evas_object_show(eco->edje);
|
||||||
e_win_show(eco->win);
|
evas_object_show(eco->win);
|
||||||
e_win_client_icon_set(eco->win, "preferences-system");
|
e_win_client_icon_set(eco->win, "preferences-system");
|
||||||
|
|
||||||
/* Preselect "Appearance" */
|
/* Preselect "Appearance" */
|
||||||
|
@ -233,28 +233,14 @@ _e_configure_free(E_Configure *eco)
|
||||||
// evas_object_del(eco->item_list);
|
// evas_object_del(eco->item_list);
|
||||||
// evas_object_del(eco->o_list);
|
// evas_object_del(eco->o_list);
|
||||||
// evas_object_del(eco->edje);
|
// evas_object_del(eco->edje);
|
||||||
e_object_del(E_OBJECT(eco->win));
|
evas_object_del(eco->win);
|
||||||
E_FREE(eco);
|
free(eco);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_configure_cb_del_req(E_Win *win)
|
_e_configure_cb_del_req(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
E_Configure *eco;
|
e_object_del(E_OBJECT(data));
|
||||||
|
|
||||||
if (!(eco = win->data)) return;
|
|
||||||
e_object_del(E_OBJECT(eco));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_e_configure_cb_resize(E_Win *win)
|
|
||||||
{
|
|
||||||
E_Configure *eco;
|
|
||||||
Evas_Coord w, h;
|
|
||||||
|
|
||||||
if (!(eco = win->data)) return;
|
|
||||||
ecore_evas_geometry_get(win->ecore_evas, NULL, NULL, &w, &h);
|
|
||||||
evas_object_resize(eco->edje, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -369,17 +355,14 @@ _e_configure_item_cb(void *data)
|
||||||
|
|
||||||
if (!(ci = data)) return;
|
if (!(ci = data)) return;
|
||||||
cb = ci->cb;
|
cb = ci->cb;
|
||||||
if (cb->path) e_configure_registry_call(cb->path, cb->eco->comp, NULL);
|
if (cb->path) e_configure_registry_call(cb->path, NULL, 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_Configure *eco = data;
|
||||||
E_Configure *eco;
|
|
||||||
|
|
||||||
win = data;
|
|
||||||
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);
|
||||||
|
@ -401,16 +384,13 @@ static void
|
||||||
_e_configure_keydown_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event)
|
_e_configure_keydown_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event)
|
||||||
{
|
{
|
||||||
Evas_Event_Key_Down *ev;
|
Evas_Event_Key_Down *ev;
|
||||||
E_Win *win;
|
E_Configure *eco = data;
|
||||||
E_Configure *eco;
|
|
||||||
|
|
||||||
ev = event;
|
ev = event;
|
||||||
win = data;
|
|
||||||
eco = win->data;
|
|
||||||
|
|
||||||
if (!strcmp(ev->key, "Tab"))
|
if (!strcmp(ev->key, "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(evas_object_evas_get(eco->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);
|
||||||
|
@ -496,14 +476,14 @@ _e_configure_fill_cat_list(void *data, const char *sel)
|
||||||
num = e_widget_toolbar_items_count(eco->cat_list) - 1;
|
num = e_widget_toolbar_items_count(eco->cat_list) - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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);
|
||||||
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);
|
||||||
|
|
||||||
/* Item List */
|
/* Item List */
|
||||||
eco->item_list = e_widget_ilist_add(eco->evas, 32 * e_scale, 32 * e_scale, NULL);
|
eco->item_list = e_widget_ilist_add(eco->evas, 32 * e_scale, 32 * e_scale, NULL);
|
||||||
e_widget_ilist_selector_set(eco->item_list, 1);
|
e_widget_ilist_selector_set(eco->item_list, 1);
|
||||||
e_widget_ilist_go(eco->item_list);
|
e_widget_ilist_go(eco->item_list);
|
||||||
e_widget_on_focus_hook_set(eco->item_list, _e_configure_focus_cb, eco->win);
|
e_widget_on_focus_hook_set(eco->item_list, _e_configure_focus_cb, eco);
|
||||||
e_widget_size_min_get(eco->item_list, &mw, &mh);
|
e_widget_size_min_get(eco->item_list, &mw, &mh);
|
||||||
if (mw < (200 * e_scale)) mw = 200 * e_scale;
|
if (mw < (200 * e_scale)) mw = 200 * e_scale;
|
||||||
if (mh < (120 * e_scale)) mh = 120 * e_scale;
|
if (mh < (120 * e_scale)) mh = 120 * e_scale;
|
||||||
|
|
|
@ -13,7 +13,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfd
|
||||||
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_Comp *comp, const char *params __UNUSED__)
|
e_int_config_conf_module(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd = NULL;
|
E_Config_Dialog *cfd = NULL;
|
||||||
E_Config_Dialog_View *v = NULL;
|
E_Config_Dialog_View *v = NULL;
|
||||||
|
@ -32,7 +32,7 @@ e_int_config_conf_module(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.check_changed = _basic_check_changed;
|
v->basic.check_changed = _basic_check_changed;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/e-module-conf.edj", conf->module->dir);
|
snprintf(buf, sizeof(buf), "%s/e-module-conf.edj", conf->module->dir);
|
||||||
cfd = e_config_dialog_new(comp, _("Configuration Panel"), "Conf",
|
cfd = e_config_dialog_new(NULL, _("Configuration Panel"), "Conf",
|
||||||
"advanced/conf", buf, 0, v, NULL);
|
"advanced/conf", buf, 0, v, NULL);
|
||||||
|
|
||||||
conf->cfd = cfd;
|
conf->cfd = cfd;
|
||||||
|
|
|
@ -143,7 +143,7 @@ _cb_action_conf(void *data, Evas_Object *obj __UNUSED__, const char *emission __
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
_e_mod_run_cb(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi __UNUSED__)
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Configure_Cat *ecat;
|
E_Configure_Cat *ecat;
|
||||||
|
@ -162,7 +162,7 @@ _e_mod_run_cb(void *data, E_Menu *m, E_Menu_Item *mi __UNUSED__)
|
||||||
if ((eci->pri >= 0) && (eci == data))
|
if ((eci->pri >= 0) && (eci == data))
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item);
|
snprintf(buf, sizeof(buf), "%s/%s", ecat->cat, eci->item);
|
||||||
e_configure_registry_call(buf, m->zone->comp, NULL);
|
e_configure_registry_call(buf, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ _e_mod_action_conf_cb(E_Object *obj, const char *params)
|
||||||
}
|
}
|
||||||
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))
|
||||||
e_configure_registry_call(params, zone->comp, params);
|
e_configure_registry_call(params, NULL, params);
|
||||||
else if (zone)
|
else if (zone)
|
||||||
e_configure_show(zone->comp, params);
|
e_configure_show(zone->comp, params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ struct _Config
|
||||||
void e_configure_show(E_Comp *comp, const char *params);
|
void e_configure_show(E_Comp *comp, const char *params);
|
||||||
void e_configure_del(void);
|
void e_configure_del(void);
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_conf_module(E_Comp *comp, const char *params);
|
E_Config_Dialog *e_int_config_conf_module(Evas_Object *parent, const char *params);
|
||||||
void e_mod_config_menu_add(void *data, E_Menu *m);
|
void e_mod_config_menu_add(void *data, E_Menu *m);
|
||||||
|
|
||||||
extern Config *conf;
|
extern Config *conf;
|
||||||
|
|
|
@ -49,16 +49,16 @@ static void _cb_order_del(void *data, void *data2 __UNUSED__);
|
||||||
static Eina_Bool _cb_fill_delay(void *data);
|
static Eina_Bool _cb_fill_delay(void *data);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_add(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_add(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Desktop_Edit *ed;
|
E_Desktop_Edit *ed;
|
||||||
|
|
||||||
if (!(ed = e_desktop_edit(comp, NULL))) return NULL;
|
if (!(ed = e_desktop_edit(NULL, NULL))) return NULL;
|
||||||
return ed->cfd;
|
return ed->cfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_favs(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -69,11 +69,11 @@ e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->dialog = eina_stringshare_add("menus/favorites_menu");
|
data->dialog = eina_stringshare_add("menus/favorites_menu");
|
||||||
data->icon = eina_stringshare_add("user-bookmarks");
|
data->icon = eina_stringshare_add("user-bookmarks");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_ibar(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -84,11 +84,11 @@ e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->dialog = eina_stringshare_add("applications/ibar_applications");
|
data->dialog = eina_stringshare_add("applications/ibar_applications");
|
||||||
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_ibar_other(E_Comp *comp, const char *path)
|
e_int_config_apps_ibar_other(Evas_Object *parent EINA_UNUSED, const char *path)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
|
|
||||||
|
@ -98,11 +98,11 @@ e_int_config_apps_ibar_other(E_Comp *comp, const char *path)
|
||||||
data->dialog = eina_stringshare_add("internal/ibar_other");
|
data->dialog = eina_stringshare_add("internal/ibar_other");
|
||||||
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
||||||
data->filename = eina_stringshare_add(path);
|
data->filename = eina_stringshare_add(path);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_startup(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -114,11 +114,11 @@ e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->icon = eina_stringshare_add("preferences-applications-startup");
|
data->icon = eina_stringshare_add("preferences-applications-startup");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
data->show_autostart = EINA_TRUE;
|
data->show_autostart = EINA_TRUE;
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_restart(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -129,11 +129,11 @@ e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->dialog = eina_stringshare_add("applications/restart_applications");
|
data->dialog = eina_stringshare_add("applications/restart_applications");
|
||||||
data->icon = eina_stringshare_add("preferences-applications-restart");
|
data->icon = eina_stringshare_add("preferences-applications-restart");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_desk_lock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -144,11 +144,11 @@ e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->dialog = eina_stringshare_add("applications/screen_lock_applications");
|
data->dialog = eina_stringshare_add("applications/screen_lock_applications");
|
||||||
data->icon = eina_stringshare_add("preferences-applications-screen-lock");
|
data->icon = eina_stringshare_add("preferences-applications-screen-lock");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_desk_unlock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Data *data;
|
E_Config_Data *data;
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
@ -159,12 +159,12 @@ e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__)
|
||||||
data->dialog = eina_stringshare_add("applications/screen_unlock_applications");
|
data->dialog = eina_stringshare_add("applications/screen_unlock_applications");
|
||||||
data->icon = eina_stringshare_add("preferences-applications-screen-unlock");
|
data->icon = eina_stringshare_add("preferences-applications-screen-unlock");
|
||||||
data->filename = eina_stringshare_add(buff);
|
data->filename = eina_stringshare_add(buff);
|
||||||
return _create_dialog(comp, data);
|
return _create_dialog(NULL, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static E_Config_Dialog *
|
static E_Config_Dialog *
|
||||||
_create_dialog(E_Comp *comp, E_Config_Data *data)
|
_create_dialog(E_Comp *comp EINA_UNUSED, E_Config_Data *data)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -185,7 +185,7 @@ _create_dialog(E_Comp *comp, E_Config_Data *data)
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
v->basic.apply_cfdata = _basic_apply;
|
v->basic.apply_cfdata = _basic_apply;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, data->title, "E", data->dialog,
|
cfd = e_config_dialog_new(NULL, data->title, "E", data->dialog,
|
||||||
data->icon, 0, v, data);
|
data->icon, 0, v, data);
|
||||||
return cfd;
|
return cfd;
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
if (cfdata->fill_delay) ecore_timer_del(cfdata->fill_delay);
|
if (cfdata->fill_delay) ecore_timer_del(cfdata->fill_delay);
|
||||||
cfdata->fill_delay = ecore_timer_add(0.2, _cb_fill_delay, cfdata);
|
cfdata->fill_delay = ecore_timer_add(0.2, _cb_fill_delay, cfdata);
|
||||||
|
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
return otb;
|
return otb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ static void _btn_cb_del(void *data, void *data2);
|
||||||
static void _widget_list_selection_changed(void *data, Evas_Object *obj __UNUSED__);
|
static void _widget_list_selection_changed(void *data, Evas_Object *obj __UNUSED__);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_apps_personal(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -36,7 +36,7 @@ e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->free_cfdata = _free_data;
|
v->free_cfdata = _free_data;
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Personal Application Launchers"),
|
cfd = e_config_dialog_new(NULL, _("Personal Application Launchers"),
|
||||||
"E", "applications/personal_applications",
|
"E", "applications/personal_applications",
|
||||||
"preferences-applications-personal", 0, v, NULL);
|
"preferences-applications-personal", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -98,7 +98,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
e_widget_disabled_set(ob, 1);
|
e_widget_disabled_set(ob, 1);
|
||||||
e_widget_table_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0);
|
e_widget_table_object_append(of, ob, 1, 2, 1, 1, 1, 1, 1, 0);
|
||||||
|
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
return of;
|
return of;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ static int _cb_desks_sort(const void *data1, const void *data2);
|
||||||
static void _fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il, const char **desktop, int general);
|
static void _fill_apps_list(E_Config_Dialog_Data *cfdata, Evas_Object *il, const char **desktop, int general);
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_defapps(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -71,7 +71,7 @@ e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
v->basic.apply_cfdata = _basic_apply;
|
v->basic.apply_cfdata = _basic_apply;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Default Applications"),
|
cfd = e_config_dialog_new(NULL, _("Default Applications"),
|
||||||
"E", "applications/default_applications",
|
"E", "applications/default_applications",
|
||||||
"preferences-desktop-default-applications", 0, v, NULL);
|
"preferences-desktop-default-applications", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -359,7 +359,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
e_widget_toolbook_page_show(otb, 0);
|
e_widget_toolbook_page_show(otb, 0);
|
||||||
|
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
elm_win_center(cfd->dia->win, 1, 1);
|
||||||
return otb;
|
return otb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ struct _E_Config_Dialog_Data
|
||||||
|
|
||||||
/* a nice easy setup function that does the dirty work */
|
/* a nice easy setup function that does the dirty work */
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_deskenv(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -40,7 +40,7 @@ e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.check_changed = _basic_check_changed;
|
v->basic.check_changed = _basic_check_changed;
|
||||||
|
|
||||||
/* create config diaolg for NULL object/data */
|
/* create config diaolg for NULL object/data */
|
||||||
cfd = e_config_dialog_new(comp, _("Desktop Environments"), "E",
|
cfd = e_config_dialog_new(NULL, _("Desktop Environments"), "E",
|
||||||
"windows/desktop_environments",
|
"windows/desktop_environments",
|
||||||
"preferences-desktop-environments", 0, v, NULL);
|
"preferences-desktop-environments", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
#ifndef E_MOD_MAIN_H
|
#ifndef E_MOD_MAIN_H
|
||||||
#define E_MOD_MAIN_H
|
#define E_MOD_MAIN_H
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_apps_favs(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_favs(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_add(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_add(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_ibar(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_ibar(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_ibar_other(E_Comp *comp, const char *path);
|
E_Config_Dialog *e_int_config_apps_ibar_other(Evas_Object *parent, const char *path);
|
||||||
E_Config_Dialog *e_int_config_apps_startup(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_startup(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_restart(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_restart(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_desk_lock(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_desk_lock(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_apps_desk_unlock(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_desk_unlock(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_defapps(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_defapps(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_apps_personal(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_apps_personal(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_deskenv(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_deskenv(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Optional_Conf
|
* @addtogroup Optional_Conf
|
||||||
|
|
|
@ -53,7 +53,7 @@ static Ecore_Window grab_win = 0;
|
||||||
static Eina_List *grab_hdls = NULL;
|
static Eina_List *grab_hdls = NULL;
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_acpibindings(E_Comp *comp,
|
e_int_config_acpibindings(Evas_Object *parent EINA_UNUSED,
|
||||||
const char *params __UNUSED__)
|
const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
@ -68,7 +68,7 @@ e_int_config_acpibindings(E_Comp *comp,
|
||||||
v->basic.apply_cfdata = _basic_apply;
|
v->basic.apply_cfdata = _basic_apply;
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("ACPI Bindings Settings"), "E",
|
cfd = e_config_dialog_new(NULL, _("ACPI Bindings Settings"), "E",
|
||||||
"advanced/acpi_bindings",
|
"advanced/acpi_bindings",
|
||||||
"preferences-system-power-management",
|
"preferences-system-power-management",
|
||||||
0, v, NULL);
|
0, v, NULL);
|
||||||
|
@ -514,7 +514,7 @@ _cb_add_binding(void *data,
|
||||||
|
|
||||||
if (grab_win != 0) return;
|
if (grab_win != 0) return;
|
||||||
if (!(cfdata = data)) return;
|
if (!(cfdata = data)) return;
|
||||||
grab_dlg = e_dialog_new(NULL, "E",
|
grab_dlg = e_dialog_new(cfdata->cfd->dia->win, "E",
|
||||||
"_acpibind_getbind_dialog");
|
"_acpibind_getbind_dialog");
|
||||||
if (!grab_dlg) return;
|
if (!grab_dlg) return;
|
||||||
e_dialog_title_set(grab_dlg, _("ACPI Binding"));
|
e_dialog_title_set(grab_dlg, _("ACPI Binding"));
|
||||||
|
@ -522,8 +522,8 @@ _cb_add_binding(void *data,
|
||||||
e_dialog_text_set(grab_dlg,
|
e_dialog_text_set(grab_dlg,
|
||||||
_("Please trigger the ACPI event you wish to bind to, "
|
_("Please trigger the ACPI event you wish to bind to, "
|
||||||
"<br><br>or <hilight>Escape</hilight> to abort."));
|
"<br><br>or <hilight>Escape</hilight> to abort."));
|
||||||
e_win_centered_set(grab_dlg->win, EINA_TRUE);
|
elm_win_center(grab_dlg->win, 1, 1);
|
||||||
e_win_borderless_set(grab_dlg->win, EINA_TRUE);
|
elm_win_borderless_set(grab_dlg->win, EINA_TRUE);
|
||||||
|
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
E_Manager *man;
|
E_Manager *man;
|
||||||
|
@ -547,10 +547,6 @@ _cb_add_binding(void *data,
|
||||||
e_acpi_events_freeze();
|
e_acpi_events_freeze();
|
||||||
|
|
||||||
e_dialog_show(grab_dlg);
|
e_dialog_show(grab_dlg);
|
||||||
#ifndef HAVE_WAYLAND_ONLY
|
|
||||||
ecore_x_icccm_transient_for_set(grab_dlg->win->evas_win,
|
|
||||||
cfdata->cfd->dia->win->evas_win);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_edgebindings(E_Comp *comp, const char *params)
|
e_int_config_edgebindings(Evas_Object *parent EINA_UNUSED, const char *params)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -103,7 +103,7 @@ e_int_config_edgebindings(E_Comp *comp, const char *params)
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Edge Bindings Settings"), "E",
|
cfd = e_config_dialog_new(NULL, _("Edge Bindings Settings"), "E",
|
||||||
"keyboard_and_mouse/edge_bindings",
|
"keyboard_and_mouse/edge_bindings",
|
||||||
"enlightenment/edges", 0, v, NULL);
|
"enlightenment/edges", 0, v, NULL);
|
||||||
if ((params) && (params[0]))
|
if ((params) && (params[0]))
|
||||||
|
@ -868,7 +868,7 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
if (cfdata->locals.dia != 0) return;
|
if (cfdata->locals.dia != 0) return;
|
||||||
|
|
||||||
cfdata->locals.dia = e_dialog_normal_win_new(NULL, "E", "_edgebind_getedge_dialog");
|
cfdata->locals.dia = e_dialog_normal_win_new(cfdata->cfd->dia->win, "E", "_edgebind_getedge_dialog");
|
||||||
if (!cfdata->locals.dia) return;
|
if (!cfdata->locals.dia) return;
|
||||||
e_dialog_title_set(cfdata->locals.dia, _("Edge Binding Sequence"));
|
e_dialog_title_set(cfdata->locals.dia, _("Edge Binding Sequence"));
|
||||||
e_dialog_icon_set(cfdata->locals.dia, "enlightenment/edges", 48);
|
e_dialog_icon_set(cfdata->locals.dia, "enlightenment/edges", 48);
|
||||||
|
@ -876,9 +876,9 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
e_dialog_button_add(cfdata->locals.dia, _("Close"), NULL, _edge_grab_wnd_cb_close, cfdata);
|
e_dialog_button_add(cfdata->locals.dia, _("Close"), NULL, _edge_grab_wnd_cb_close, cfdata);
|
||||||
e_object_data_set(E_OBJECT(cfdata->locals.dia), cfdata);
|
e_object_data_set(E_OBJECT(cfdata->locals.dia), cfdata);
|
||||||
e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _dia_del);
|
e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _dia_del);
|
||||||
e_win_centered_set(cfdata->locals.dia->win, 1);
|
elm_win_center(cfdata->locals.dia->win, 1, 1);
|
||||||
|
|
||||||
evas = e_win_evas_get(cfdata->locals.dia->win);
|
evas = evas_object_evas_get(cfdata->locals.dia->win);
|
||||||
|
|
||||||
cfdata->gui.o_selector = o = edje_object_add(evas);
|
cfdata->gui.o_selector = o = edje_object_add(evas);
|
||||||
e_theme_edje_object_set(o, "base/theme/modules/conf_edgebindings",
|
e_theme_edje_object_set(o, "base/theme/modules/conf_edgebindings",
|
||||||
|
@ -941,7 +941,6 @@ _edge_grab_wnd_show(E_Config_Dialog_Data *cfdata)
|
||||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
_edge_grab_wnd_selected_edge_cb, cfdata);
|
_edge_grab_wnd_selected_edge_cb, cfdata);
|
||||||
e_dialog_show(cfdata->locals.dia);
|
e_dialog_show(cfdata->locals.dia);
|
||||||
e_dialog_parent_set(cfdata->locals.dia, cfdata->cfd->dia->win);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -85,7 +85,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_keybindings(E_Comp *comp,
|
e_int_config_keybindings(Evas_Object *parent EINA_UNUSED,
|
||||||
const char *params)
|
const char *params)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
@ -100,7 +100,7 @@ e_int_config_keybindings(E_Comp *comp,
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Key Bindings Settings"), "E",
|
cfd = e_config_dialog_new(NULL, _("Key Bindings Settings"), "E",
|
||||||
"keyboard_and_mouse/key_bindings",
|
"keyboard_and_mouse/key_bindings",
|
||||||
"preferences-desktop-keyboard-shortcuts", 0, v, NULL);
|
"preferences-desktop-keyboard-shortcuts", 0, v, NULL);
|
||||||
if ((params) && (params[0]))
|
if ((params) && (params[0]))
|
||||||
|
|
|
@ -91,7 +91,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_mousebindings(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -105,7 +105,7 @@ e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
v->override_auto_apply = 0;
|
v->override_auto_apply = 0;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp,
|
cfd = e_config_dialog_new(NULL,
|
||||||
_("Mouse Bindings Settings"),
|
_("Mouse Bindings Settings"),
|
||||||
"E", "keyboard_and_mouse/mouse_bindings",
|
"E", "keyboard_and_mouse/mouse_bindings",
|
||||||
"preferences-desktop-mouse", 0, v, NULL);
|
"preferences-desktop-mouse", 0, v, NULL);
|
||||||
|
|
|
@ -616,16 +616,16 @@ _signal_add_show(E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
if (cfdata->locals.dia) return;
|
if (cfdata->locals.dia) return;
|
||||||
|
|
||||||
cfdata->locals.dia = e_dialog_new(NULL, "E", "_signalbind_new_dialog");
|
cfdata->locals.dia = e_dialog_new(cfdata->cfd->dia->win, "E", "_signalbind_new_dialog");
|
||||||
e_dialog_title_set(cfdata->locals.dia, _("Add Signal Binding"));
|
e_dialog_title_set(cfdata->locals.dia, _("Add Signal Binding"));
|
||||||
e_dialog_icon_set(cfdata->locals.dia, "enlightenment/signals", 48);
|
e_dialog_icon_set(cfdata->locals.dia, "enlightenment/signals", 48);
|
||||||
e_dialog_button_add(cfdata->locals.dia, _("OK"), NULL, _signal_add_cb_ok, cfdata);
|
e_dialog_button_add(cfdata->locals.dia, _("OK"), NULL, _signal_add_cb_ok, cfdata);
|
||||||
e_dialog_button_add(cfdata->locals.dia, _("Cancel"), NULL, _signal_add_cb_cancel, cfdata);
|
e_dialog_button_add(cfdata->locals.dia, _("Cancel"), NULL, _signal_add_cb_cancel, cfdata);
|
||||||
e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _signal_add_del);
|
e_object_del_attach_func_set(E_OBJECT(cfdata->locals.dia), _signal_add_del);
|
||||||
cfdata->locals.dia->data = cfdata;
|
cfdata->locals.dia->data = cfdata;
|
||||||
e_win_centered_set(cfdata->locals.dia->win, 1);
|
elm_win_center(cfdata->locals.dia->win, 1, 1);
|
||||||
|
|
||||||
evas = e_win_evas_get(cfdata->locals.dia->win);
|
evas = evas_object_evas_get(cfdata->locals.dia->win);
|
||||||
obg = e_widget_list_add(evas, 1, 0);
|
obg = e_widget_list_add(evas, 1, 0);
|
||||||
|
|
||||||
ol = e_widget_framelist_add(evas, _("Source:"), 0);
|
ol = e_widget_framelist_add(evas, _("Source:"), 0);
|
||||||
|
@ -643,7 +643,6 @@ _signal_add_show(E_Config_Dialog_Data *cfdata)
|
||||||
|
|
||||||
e_dialog_show(cfdata->locals.dia);
|
e_dialog_show(cfdata->locals.dia);
|
||||||
e_widget_focus_set(entry, 1);
|
e_widget_focus_set(entry, 1);
|
||||||
e_dialog_parent_set(cfdata->locals.dia, cfdata->cfd->dia->win);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -824,7 +823,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
|
||||||
|
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_signalbindings(E_Comp *comp, const char *params)
|
e_int_config_signalbindings(Evas_Object *parent EINA_UNUSED, const char *params)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -838,7 +837,7 @@ e_int_config_signalbindings(E_Comp *comp, const char *params)
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Signal Bindings Settings"), "E",
|
cfd = e_config_dialog_new(NULL, _("Signal Bindings Settings"), "E",
|
||||||
"keyboard_and_mouse/signal_bindings",
|
"keyboard_and_mouse/signal_bindings",
|
||||||
"enlightenment/signals", 0, v, NULL);
|
"enlightenment/signals", 0, v, NULL);
|
||||||
if ((params) && (params[0]))
|
if ((params) && (params[0]))
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#ifndef E_MOD_MAIN_H
|
#ifndef E_MOD_MAIN_H
|
||||||
#define E_MOD_MAIN_H
|
#define E_MOD_MAIN_H
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_acpibindings(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_acpibindings(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_keybindings(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_keybindings(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_mousebindings(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_mousebindings(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_edgebindings(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_edgebindings(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_signalbindings(E_Comp *comp, const char *params);
|
E_Config_Dialog *e_int_config_signalbindings(Evas_Object *parent, const char *params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Optional_Conf
|
* @addtogroup Optional_Conf
|
||||||
|
|
|
@ -20,7 +20,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_dialogs(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -35,7 +35,7 @@ e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.check_changed = _basic_check_changed;
|
v->basic.check_changed = _basic_check_changed;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Dialog Settings"),
|
cfd = e_config_dialog_new(NULL, _("Dialog Settings"),
|
||||||
"E", "settings/dialogs",
|
"E", "settings/dialogs",
|
||||||
"preferences-system", 0, v, NULL);
|
"preferences-system", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct _Del_Profile_Confirm_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_profiles(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -50,7 +50,7 @@ e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.apply_cfdata = _apply_cfdata;
|
v->basic.apply_cfdata = _apply_cfdata;
|
||||||
v->basic.create_widgets = _create_widgets;
|
v->basic.create_widgets = _create_widgets;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Profile Selector"),
|
cfd = e_config_dialog_new(NULL, _("Profile Selector"),
|
||||||
"E", "settings/profiles",
|
"E", "settings/profiles",
|
||||||
"preferences-profiles", 0, v, NULL);
|
"preferences-profiles", 0, v, NULL);
|
||||||
e_config_dialog_changed_auto_set(cfd, 0);
|
e_config_dialog_changed_auto_set(cfd, 0);
|
||||||
|
@ -308,7 +308,7 @@ _cb_add(void *data, void *data2 __UNUSED__)
|
||||||
if (!cfdata) return;
|
if (!cfdata) return;
|
||||||
|
|
||||||
if (cfdata->dia_new_profile)
|
if (cfdata->dia_new_profile)
|
||||||
e_win_raise(cfdata->dia_new_profile->dia->win);
|
elm_win_raise(cfdata->dia_new_profile->dia->win);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cfdata->dia_new_profile = e_entry_dialog_show(_("Add New Profile"), NULL,
|
cfdata->dia_new_profile = e_entry_dialog_show(_("Add New Profile"), NULL,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#ifndef E_MOD_MAIN_H
|
#ifndef E_MOD_MAIN_H
|
||||||
#define E_MOD_MAIN_H
|
#define E_MOD_MAIN_H
|
||||||
|
|
||||||
E_Config_Dialog *e_int_config_profiles(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_profiles(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
E_Config_Dialog *e_int_config_dialogs(E_Comp *comp, const char *params __UNUSED__);
|
E_Config_Dialog *e_int_config_dialogs(Evas_Object *parent, const char *params __UNUSED__);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Optional_Conf
|
* @addtogroup Optional_Conf
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_desk(E_Comp *comp, const char *params)
|
e_int_config_desk(Evas_Object *parent EINA_UNUSED, const char *params)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -49,7 +49,7 @@ e_int_config_desk(E_Comp *comp, const char *params)
|
||||||
v->basic.create_widgets = _basic_create;
|
v->basic.create_widgets = _basic_create;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Desk Settings"), "E", "internal/desk",
|
cfd = e_config_dialog_new(NULL, _("Desk Settings"), "E", "internal/desk",
|
||||||
"preferences-desktop", 0, v, cfdata);
|
"preferences-desktop", 0, v, cfdata);
|
||||||
return cfd;
|
return cfd;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
Evas_Object *o, *of, *ol, *ob;
|
Evas_Object *o, *of, *ol, *ob;
|
||||||
E_Zone *zone;
|
E_Zone *zone;
|
||||||
|
|
||||||
zone = e_zone_current_get(cfd->comp);
|
zone = e_zone_current_get(e_comp_get(cfd->dia->win));
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 0);
|
o = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
|
@ -211,8 +211,7 @@ _cb_config(void *data, void *data2 __UNUSED__)
|
||||||
if (!cfdata) return;
|
if (!cfdata) return;
|
||||||
snprintf(buf, sizeof(buf), "%i %i %i %i",
|
snprintf(buf, sizeof(buf), "%i %i %i %i",
|
||||||
cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
|
cfdata->man_num, cfdata->zone_num, cfdata->desk_x, cfdata->desk_y);
|
||||||
e_configure_registry_call("internal/wallpaper_desk",
|
e_configure_registry_call("internal/wallpaper_desk", NULL, buf);
|
||||||
NULL, buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
|
@ -61,7 +61,7 @@ struct _E_Config_Dialog_Data
|
||||||
};
|
};
|
||||||
|
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__)
|
e_int_config_desklock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
@ -77,7 +77,7 @@ e_int_config_desklock(E_Comp *comp, const char *params __UNUSED__)
|
||||||
v->basic.check_changed = _basic_check_changed;
|
v->basic.check_changed = _basic_check_changed;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Screen Lock Settings"), "E",
|
cfd = e_config_dialog_new(NULL, _("Screen Lock Settings"), "E",
|
||||||
"screen/screen_lock", "preferences-system-lock-screen",
|
"screen/screen_lock", "preferences-system-lock-screen",
|
||||||
0, v, NULL);
|
0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -765,7 +765,7 @@ _cb_bg_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *eve
|
||||||
if (e_widget_disabled_get(obj)) return;
|
if (e_widget_disabled_get(obj)) return;
|
||||||
if (!(cfdata = data)) return;
|
if (!(cfdata = data)) return;
|
||||||
if (cfdata->bg_fsel)
|
if (cfdata->bg_fsel)
|
||||||
e_win_raise(cfdata->bg_fsel->dia->win);
|
elm_win_raise(cfdata->bg_fsel->dia->win);
|
||||||
else
|
else
|
||||||
cfdata->bg_fsel = e_int_config_desklock_fsel(cfdata->cfd, obj);
|
cfdata->bg_fsel = e_int_config_desklock_fsel(cfdata->cfd, obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,13 +23,9 @@ static void _cb_dir_up(void *data1, void *data2);
|
||||||
E_Config_Dialog *
|
E_Config_Dialog *
|
||||||
e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg)
|
e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg)
|
||||||
{
|
{
|
||||||
E_Comp *comp = NULL;
|
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
|
|
||||||
if (parent)
|
|
||||||
comp = parent->comp;
|
|
||||||
|
|
||||||
v = E_NEW(E_Config_Dialog_View, 1);
|
v = E_NEW(E_Config_Dialog_View, 1);
|
||||||
v->create_cfdata = _create_data;
|
v->create_cfdata = _create_data;
|
||||||
v->free_cfdata = _free_data;
|
v->free_cfdata = _free_data;
|
||||||
|
@ -37,7 +33,7 @@ e_int_config_desklock_fsel(E_Config_Dialog *parent, Evas_Object *bg)
|
||||||
v->basic_only = 1;
|
v->basic_only = 1;
|
||||||
v->normal_win = 1;
|
v->normal_win = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(comp, _("Select a Background..."),
|
cfd = e_config_dialog_new(parent->dia->win, _("Select a Background..."),
|
||||||
"E", "_desklock_fsel_dialog",
|
"E", "_desklock_fsel_dialog",
|
||||||
"enlightenment/background", 0, v, bg);
|
"enlightenment/background", 0, v, bg);
|
||||||
cfd->data = parent;
|
cfd->data = parent;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue