elm_win: fix widget type name for backward compatibility
Summary: It should use legacy class in elm_win_add. this patch fixes T6898, T6899 Test Plan: make check Reviewers: zmike, Jaehyun_Cho Reviewed By: Jaehyun_Cho Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6899, T6898 Differential Revision: https://phab.enlightenment.org/D6233
This commit is contained in:
parent
2265f2f8f6
commit
61dc4899b5
|
@ -184,6 +184,8 @@ elm_legacy_eolian_files = \
|
|||
lib/elementary/efl_ui_clock_legacy.eo \
|
||||
lib/elementary/efl_ui_layout_legacy.eo \
|
||||
lib/elementary/elm_code_widget_legacy.eo \
|
||||
lib/elementary/efl_ui_win_socket_legacy.eo \
|
||||
lib/elementary/efl_ui_win_inlined_legacy.eo \
|
||||
lib/elementary/elm_interface_fileselector.eo \
|
||||
lib/elementary/elm_calendar.eo \
|
||||
lib/elementary/elm_calendar_item.eo \
|
||||
|
|
|
@ -96,6 +96,8 @@ static const char *legacy_type_table[][2] =
|
|||
{ "Efl.Ui.Radio_Legacy", "Elm_Radio" },
|
||||
{ "Efl.Ui.Video_Legacy", "Elm_Video" },
|
||||
{ "Efl.Ui.Win_Legacy", "Elm_Win" },
|
||||
{ "Efl.Ui.Win_Socket_Legacy", "Elm_Win" },
|
||||
{ "Efl.Ui.Win_Inlined_Legacy", "Elm_Win" },
|
||||
{ "Elm.Code_Widget_Legacy", "Elm_Code_Widget" },
|
||||
{ "Elm.Ctxpopup", "Elm_Ctxpopup" },
|
||||
{ "Elm.Entry", "Elm_Entry" },
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "efl_ui_win_part.eo.h"
|
||||
#include "elm_plug.eo.h"
|
||||
#include "efl_ui_win_legacy.eo.h"
|
||||
#include "efl_ui_win_socket_legacy.eo.h"
|
||||
#include "efl_ui_win_inlined_legacy.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_WIN_CLASS
|
||||
#define MY_CLASS_NAME "Efl.Ui.Win"
|
||||
|
@ -8847,8 +8849,8 @@ elm_win_add(Evas_Object *parent, const char *name, Efl_Ui_Win_Type type)
|
|||
|
||||
switch ((int) type)
|
||||
{
|
||||
case ELM_WIN_INLINED_IMAGE: klass = EFL_UI_WIN_INLINED_CLASS; break;
|
||||
case ELM_WIN_SOCKET_IMAGE: klass = EFL_UI_WIN_SOCKET_CLASS; break;
|
||||
case ELM_WIN_INLINED_IMAGE: klass = EFL_UI_WIN_INLINED_LEGACY_CLASS; break;
|
||||
case ELM_WIN_SOCKET_IMAGE: klass = EFL_UI_WIN_SOCKET_LEGACY_CLASS; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
#include <Elementary.h>
|
||||
|
||||
#include "elm_priv.h"
|
||||
#include "efl_ui_win_inlined_legacy.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_WIN_INLINED_CLASS
|
||||
#define MY_CLASS_NAME "Efl.Ui.Win_Inlined"
|
||||
#define MY_CLASS_NAME_LEGACY "elm_win"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -39,3 +43,19 @@ _efl_ui_win_inlined_efl_object_finalize(Eo *obj, Efl_Ui_Win_Inlined_Data *pd EIN
|
|||
}
|
||||
|
||||
#include "efl_ui_win_inlined.eo.c"
|
||||
|
||||
static void
|
||||
_efl_ui_win_inlined_legacy_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_win_inlined_legacy_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
|
||||
{
|
||||
obj = efl_finalize(efl_super(obj, EFL_UI_WIN_INLINED_LEGACY_CLASS));
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
return obj;
|
||||
}
|
||||
|
||||
#include "efl_ui_win_inlined_legacy.eo.c"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class Efl.Ui.Win_Inlined_Legacy (Efl.Ui.Win_Inlined, Efl.Ui.Legacy)
|
||||
{
|
||||
[[Elementary window inlined class]]
|
||||
data: null;
|
||||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.finalize;
|
||||
}
|
||||
}
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
#include <Elementary.h>
|
||||
|
||||
#include "elm_priv.h"
|
||||
#include "efl_ui_win_socket_legacy.eo.h"
|
||||
|
||||
#define MY_CLASS EFL_UI_WIN_SOCKET_CLASS
|
||||
#define MY_CLASS_NAME "Efl.Ui.Win_Socket"
|
||||
#define MY_CLASS_NAME_LEGACY "elm_win"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -33,3 +37,19 @@ _efl_ui_win_socket_socket_listen(Eo *obj, Efl_Ui_Win_Socket_Data *pd EINA_UNUSED
|
|||
}
|
||||
|
||||
#include "efl_ui_win_socket.eo.c"
|
||||
|
||||
static void
|
||||
_efl_ui_win_socket_legacy_class_constructor(Efl_Class *klass)
|
||||
{
|
||||
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_efl_ui_win_socket_legacy_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
|
||||
{
|
||||
obj = efl_finalize(efl_super(obj, EFL_UI_WIN_SOCKET_LEGACY_CLASS));
|
||||
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
||||
return obj;
|
||||
}
|
||||
|
||||
#include "efl_ui_win_socket_legacy.eo.c"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class Efl.Ui.Win_Socket_Legacy (Efl.Ui.Win_Socket, Efl.Ui.Legacy)
|
||||
{
|
||||
[[Elementary window socket class]]
|
||||
data: null;
|
||||
implements {
|
||||
class.constructor;
|
||||
Efl.Object.finalize;
|
||||
}
|
||||
}
|
|
@ -65,7 +65,7 @@ _timer_fail_flag_cb(void *data)
|
|||
|
||||
EFL_START_TEST (elm_win_legacy_type_check)
|
||||
{
|
||||
Evas_Object *win;
|
||||
Evas_Object *win, *win_socket, *win_inlined;
|
||||
const char *type;
|
||||
|
||||
win = win_add(NULL, "win", ELM_WIN_BASIC);
|
||||
|
@ -78,6 +78,25 @@ EFL_START_TEST (elm_win_legacy_type_check)
|
|||
ck_assert(type != NULL);
|
||||
ck_assert(!strcmp(type, "elm_win"));
|
||||
|
||||
win_socket = win_add(NULL, "win", ELM_WIN_SOCKET_IMAGE);
|
||||
|
||||
type = elm_object_widget_type_get(win_socket);
|
||||
ck_assert(type != NULL);
|
||||
ck_assert(!strcmp(type, "Elm_Win"));
|
||||
|
||||
type = evas_object_type_get(win_socket);
|
||||
ck_assert(type != NULL);
|
||||
ck_assert(!strcmp(type, "elm_win"));
|
||||
|
||||
win_inlined = win_add(win, "win", ELM_WIN_INLINED_IMAGE);
|
||||
|
||||
type = elm_object_widget_type_get(win_inlined);
|
||||
ck_assert(type != NULL);
|
||||
ck_assert(!strcmp(type, "Elm_Win"));
|
||||
|
||||
type = evas_object_type_get(win_inlined);
|
||||
ck_assert(type != NULL);
|
||||
ck_assert(!strcmp(type, "elm_win"));
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
|
|
Loading…
Reference in New Issue