On Tue, 26 Aug 2014 20:23:06 +0900 Daniel Juyung Seo <[email protected]>
said:

> Hi,
> What is the benefit or special feature of this dialog window?
> It just looks like a yet another window.

it uses the dialog type ANd sets a parent window to be the elm text window. we
dont have another test that does that. in e try move the parent window around
(after i fixed transient move handling) dialog moves with parent. without
setting parent (that sets transient hint) this wont happen.

> Thanks.
> 
> Daniel Juyung Seo (SeoZ)
> 
> 
> 
> On Tue, Aug 26, 2014 at 6:02 PM, Carsten Haitzler <[email protected]>
> wrote:
> 
> > raster pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/elementary.git/commit/?id=c80b90a5975293bd85a036ec7187a331a05c19dc
> >
> > commit c80b90a5975293bd85a036ec7187a331a05c19dc
> > Author: Carsten Haitzler (Rasterman) <[email protected]>
> > Date:   Mon Aug 25 17:11:02 2014 +0900
> >
> >     elm test - add dialog window test
> > ---
> >  src/bin/Makefile.am       |  1 +
> >  src/bin/test.c            |  4 +++-
> >  src/bin/test_win_dialog.c | 29 +++++++++++++++++++++++++++++
> >  3 files changed, 33 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
> > index 50e79ef..f4f6e46 100644
> > --- a/src/bin/Makefile.am
> > +++ b/src/bin/Makefile.am
> > @@ -136,6 +136,7 @@ test_win_socket.c \
> >  test_win_plug.c \
> >  test_win_state.c \
> >  test_win_wm_rotation.c \
> > +test_win_dialog.c \
> >  test.h
> >
> >  elementary_test_LDADD = $(top_builddir)/src/lib/libelementary.la \
> > diff --git a/src/bin/test.c b/src/bin/test.c
> > index 11045a1..72c80ef 100644
> > --- a/src/bin/test.c
> > +++ b/src/bin/test.c
> > @@ -246,6 +246,7 @@ void test_dnd_types(void *data, Evas_Object *obj, void
> > *event_info);
> >  void test_task_switcher(void *data, Evas_Object *obj, void *event_info);
> >  void test_application_server_message(void *data, Evas_Object *obj, void
> > *event_info);
> >  void test_application_server_phone(void *data, Evas_Object *obj, void
> > *event_info);
> > +void test_win_dialog(void *data, Evas_Object *obj, void *event_info);
> >
> >  Evas_Object *win, *tbx; // TODO: refactoring
> >  void *tt;
> > @@ -344,7 +345,7 @@ _menu_create(const char *option_str)
> >            }
> >          elm_box_pack_end(tbx2, bt);
> >          evas_object_show(bt);
> > -        evas_object_smart_callback_add(bt, "clicked", t->cb, NULL);
> > +        evas_object_smart_callback_add(bt, "clicked", t->cb, win);
> >          pcat = t->category;
> >          if (t == tt) tt = cfr;
> >       }
> > @@ -524,6 +525,7 @@ add_tests:
> >     ADD_TEST(NULL, "Window / Background", "Window Socket",
> > test_win_socket);
> >     ADD_TEST(NULL, "Window / Background", "Window Plug", test_win_plug);
> >     ADD_TEST(NULL, "Window / Background", "Window WM Rotation",
> > test_win_wm_rotation);
> > +   ADD_TEST(NULL, "Window / Background", "Window Dialog",
> > test_win_dialog);
> >
> >     //------------------------------//
> >     ADD_TEST(NULL, "Images", "Icon", test_icon);
> > diff --git a/src/bin/test_win_dialog.c b/src/bin/test_win_dialog.c
> > new file mode 100644
> > index 0000000..1eb78e3
> > --- /dev/null
> > +++ b/src/bin/test_win_dialog.c
> > @@ -0,0 +1,29 @@
> > +#ifdef HAVE_CONFIG_H
> > +# include "elementary_config.h"
> > +#endif
> > +#include <Elementary.h>
> > +
> > +void
> > +test_win_dialog(void *data, Evas_Object *obj EINA_UNUSED, void
> > *event_info EINA_UNUSED)
> > +{
> > +   Evas_Object *win, *bg, *bt;
> > +
> > +   win = elm_win_add(data, "window-dialog", ELM_WIN_DIALOG_BASIC);
> > +   elm_win_title_set(win, "Window Dialog");
> > +   elm_win_autodel_set(win, EINA_TRUE);
> > +
> > +   bg = elm_bg_add(win);
> > +   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
> > EVAS_HINT_EXPAND);
> > +   elm_win_resize_object_add(win, bg);
> > +   evas_object_show(bg);
> > +
> > +   bt = elm_button_add(win);
> > +   elm_object_text_set(bt, "OK");
> > +   evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
> > +   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND,
> > EVAS_HINT_EXPAND);
> > +   elm_win_resize_object_add(win, bt);
> > +   evas_object_show(bt);
> > +
> > +   evas_object_resize(win, 320, 160);
> > +   evas_object_show(win);
> > +}
> >
> > --
> >
> >
> >
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to