From: gastal Date: Mon, 19 Mar 2012 12:58:07 +0000 (+0000) Subject: Fixing bugs in examples. X-Git-Tag: sbs/armel/slp2-target~36^2~197 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcc3a5cd0e3cc7e6a85555692ca8c8a71dac764f;p=framework%2Fuifw%2Felementary.git Fixing bugs in examples. Patch by: João Paulo Fernandes Ventura git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69507 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/doc/examples.dox b/doc/examples.dox index d43fe46..0af84f5 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -1459,8 +1459,8 @@ * If some decoration is required, a label can be set, and icon before and * after the bar as well. On the second slider will add a @c home icon * and a @c folder icon at @c end. - * @skipline text_set - * @until end_set + * @skip elm_object_text_set + * @until elm_object_part_content_set(sl, "end", ic) * * If the bar size need to be changed, it can be done with span set function, * that doesn't accounts other widget's parts size. Also the bar can starts diff --git a/src/examples/bg_example_01.c b/src/examples/bg_example_01.c index 3811429..c168a9f 100644 --- a/src/examples/bg_example_01.c +++ b/src/examples/bg_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` bg_example_01.c -o bg_example_01 +//gcc -o bg_example_01 bg_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H diff --git a/src/examples/bg_example_02.c b/src/examples/bg_example_02.c index e34347e..368830f 100644 --- a/src/examples/bg_example_02.c +++ b/src/examples/bg_example_02.c @@ -1,6 +1,6 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` bg_example_02.c -o bg_example_02 -// where directory is the a path where images/plant_01.jpg can be found. +//gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" +//where directory is the a path where images/plant_01.jpg can be found. #include #ifdef HAVE_CONFIG_H diff --git a/src/examples/bg_example_03.c b/src/examples/bg_example_03.c index 8720254..5ee8fb4 100644 --- a/src/examples/bg_example_03.c +++ b/src/examples/bg_example_03.c @@ -1,6 +1,6 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` bg_example_03.c -o bg_example_03 -// where directory is the a path where images/plant_01.jpg can be found. +//gcc -o bg_example_03 bg_example_03.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" +//where directory is the a path where images/plant_01.jpg can be found. #include #ifdef HAVE_CONFIG_H diff --git a/src/examples/bubble_example_01.c b/src/examples/bubble_example_01.c index b3432af..b601b85 100644 --- a/src/examples/bubble_example_01.c +++ b/src/examples/bubble_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" bubble_example_01.c -o bubble_example_01 +//gcc -o bubble_example_01 bubble_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -32,8 +32,11 @@ elm_main(int argc, char **argv) elm_win_title_set(win, "Bubble"); elm_win_autodel_set(win, EINA_TRUE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + evas_object_resize(win, 300, 200); + evas_object_show(win); 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); @@ -65,9 +68,6 @@ elm_main(int argc, char **argv) evas_object_move(bubble, 0, 110); evas_object_show(bubble); - evas_object_resize(win, 300, 200); - evas_object_show(win); - elm_run(); evas_object_del(icon); diff --git a/src/examples/calendar_example_01.c b/src/examples/calendar_example_01.c index f22c284..e52afac 100644 --- a/src/examples/calendar_example_01.c +++ b/src/examples/calendar_example_01.c @@ -5,7 +5,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_01.c -o calendar_example_01 + * gcc -o calendar_example_01 calendar_example_01.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Creation Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/calendar_example_02.c b/src/examples/calendar_example_02.c index f16743b..0a0085b 100644 --- a/src/examples/calendar_example_02.c +++ b/src/examples/calendar_example_02.c @@ -6,7 +6,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_02.c -o calendar_example_02 + * gcc -o calendar_example_02 calendar_example_02.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -38,6 +38,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Layout Formatting Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/calendar_example_03.c b/src/examples/calendar_example_03.c index 989f776..9804dac 100644 --- a/src/examples/calendar_example_03.c +++ b/src/examples/calendar_example_03.c @@ -6,7 +6,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_03.c -o calendar_example_03 + * gcc -o calendar_example_03 calendar_example_03.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -25,6 +25,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Min/Max Year Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/calendar_example_04.c b/src/examples/calendar_example_04.c index 7221557..55978ac 100644 --- a/src/examples/calendar_example_04.c +++ b/src/examples/calendar_example_04.c @@ -6,7 +6,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_04.c -o calendar_example_04 + * gcc -o calendar_example_04 calendar_example_04.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -29,6 +29,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Day Selection Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/calendar_example_05.c b/src/examples/calendar_example_05.c index e48a9e8..0a676a8 100644 --- a/src/examples/calendar_example_05.c +++ b/src/examples/calendar_example_05.c @@ -5,7 +5,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_05.c -o calendar_example_05 + * gcc -o calendar_example_05 calendar_example_05.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -49,6 +49,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Getters Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/calendar_example_06.c b/src/examples/calendar_example_06.c index 7a4cc1e..1cd5a85 100644 --- a/src/examples/calendar_example_06.c +++ b/src/examples/calendar_example_06.c @@ -4,7 +4,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` calendar_example_06.c -o calendar_example_06 + * gcc -o calendar_example_06 calendar_example_06.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -43,6 +43,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC); elm_win_title_set(win, "Calendar Marks Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/check_example_01.c b/src/examples/check_example_01.c index a796752..cec2096 100644 --- a/src/examples/check_example_01.c +++ b/src/examples/check_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` check_example_01.c -o check_example_01 +//gcc -o check_example_01 check_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -21,6 +21,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/conformant_example_01.c b/src/examples/conformant_example_01.c index 0ec34fb..0ea316d 100644 --- a/src/examples/conformant_example_01.c +++ b/src/examples/conformant_example_01.c @@ -5,7 +5,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` conformant_example_01.c -o conformant_example_01 + * gcc -o conformant_example_01 conformant_example_01.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC); elm_win_title_set(win, "Conformant Example"); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); diff --git a/src/examples/ctxpopup_example_01.c b/src/examples/ctxpopup_example_01.c index 939920b..2930d9b 100644 --- a/src/examples/ctxpopup_example_01.c +++ b/src/examples/ctxpopup_example_01.c @@ -1,9 +1,11 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` ctxpopup_example_01.c -o ctxpopup_example_01 +//gcc -o ctxpopup_example_01 ctxpopup_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H # include "elementary_config.h" +#else +# define __UNUSED__ #endif static void @@ -81,6 +83,8 @@ elm_main(int argc, char **argv) elm_win_title_set(win, "Contextual Popup"); elm_win_autodel_set(win, EINA_TRUE); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + evas_object_resize(win, 400, 400); + evas_object_show(win); bg = elm_bg_add(win); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); @@ -88,6 +92,7 @@ elm_main(int argc, char **argv) evas_object_show(bg); list = elm_list_add(win); + evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, list); elm_list_mode_set(list, ELM_LIST_COMPRESS); @@ -98,9 +103,6 @@ elm_main(int argc, char **argv) evas_object_show(list); elm_list_go(list); - evas_object_resize(win, 400, 400); - evas_object_show(win); - elm_run(); } ELM_MAIN() diff --git a/src/examples/efl_thread_1.c b/src/examples/efl_thread_1.c index 98bc5e9..48ea3d2 100644 --- a/src/examples/efl_thread_1.c +++ b/src/examples/efl_thread_1.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_1 efl_thread_1.c -g `pkg-config --cflags --libs elementary` #include #include @@ -50,12 +52,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-1", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 1"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); o = evas_object_rectangle_add(evas_object_evas_get(win)); diff --git a/src/examples/efl_thread_2.c b/src/examples/efl_thread_2.c index a9da805..1bca6bc 100644 --- a/src/examples/efl_thread_2.c +++ b/src/examples/efl_thread_2.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_2 efl_thread_2.c -g `pkg-config --cflags --libs elementary` #include #include @@ -66,12 +68,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-2", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 2"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); o = evas_object_rectangle_add(evas_object_evas_get(win)); diff --git a/src/examples/efl_thread_3.c b/src/examples/efl_thread_3.c index 3019270..299776a 100644 --- a/src/examples/efl_thread_3.c +++ b/src/examples/efl_thread_3.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_3 efl_thread_3.c -g `pkg-config --cflags --libs elementary` #include #include @@ -68,12 +70,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-3", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 3"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); o = evas_object_rectangle_add(evas_object_evas_get(win)); diff --git a/src/examples/efl_thread_4.c b/src/examples/efl_thread_4.c index 2eee3b7..ddb2368 100644 --- a/src/examples/efl_thread_4.c +++ b/src/examples/efl_thread_4.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_4 efl_thread_4.c -g `pkg-config --cflags --libs elementary` #include #include @@ -88,12 +90,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-4", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 4"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); o = evas_object_rectangle_add(evas_object_evas_get(win)); diff --git a/src/examples/efl_thread_5.c b/src/examples/efl_thread_5.c index 7b3db3a..4f17ef5 100644 --- a/src/examples/efl_thread_5.c +++ b/src/examples/efl_thread_5.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_5 efl_thread_5.c -g `pkg-config --cflags --libs elementary` #include static Ecore_Thread *th = NULL; @@ -68,12 +70,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-5", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 5"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); o = evas_object_rectangle_add(evas_object_evas_get(win)); diff --git a/src/examples/efl_thread_6.c b/src/examples/efl_thread_6.c index 49efe05..2d47fb2 100644 --- a/src/examples/efl_thread_6.c +++ b/src/examples/efl_thread_6.c @@ -1,3 +1,5 @@ +//Compile with: +//gcc -o efl_thread_6 efl_thread_6.c -g `pkg-config --cflags --libs elementary` #include static Evas_Object *win = NULL; @@ -124,12 +126,14 @@ elm_main(int argc, char **argv) win = elm_win_add(NULL, "efl-thread-6", ELM_WIN_BASIC); elm_win_title_set(win, "EFL Thread 6"); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); // queue up 64 mandel generation thread jobs diff --git a/src/examples/flip_example_01.c b/src/examples/flip_example_01.c index 3de83df..a44504c 100644 --- a/src/examples/flip_example_01.c +++ b/src/examples/flip_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` flip_example_01.c -o flip_example_01 +//gcc -o flip_example_01 flip_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -19,6 +19,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/frame_example_01.c b/src/examples/frame_example_01.c index d3e4b35..c58f858 100644 --- a/src/examples/frame_example_01.c +++ b/src/examples/frame_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` frame_example_01.c -o frame_example_01 +//gcc -o frame_example_01 frame_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -19,6 +19,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/hover_example_01.c b/src/examples/hover_example_01.c index ec40f0b..3a337cb 100644 --- a/src/examples/hover_example_01.c +++ b/src/examples/hover_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` hover_example_01.c -o hover_example_01 +//gcc -o hover_example_01 hover_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -29,6 +29,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/hoversel_example_01.c b/src/examples/hoversel_example_01.c index ed76d29..10cda69 100644 --- a/src/examples/hoversel_example_01.c +++ b/src/examples/hoversel_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` hoversel_example_01.c -o hoversel_example_01 +//gcc -o hoversel_example_01 hoversel_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H diff --git a/src/examples/label_example_01.c b/src/examples/label_example_01.c index d863655..b9e26a6 100644 --- a/src/examples/label_example_01.c +++ b/src/examples/label_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` label_example_01.c -o label_example_01 +//gcc -o label_example_01 label_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -17,6 +17,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/notify_example_01.c b/src/examples/notify_example_01.c index 98f41c4..33c4b78 100644 --- a/src/examples/notify_example_01.c +++ b/src/examples/notify_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` notify_example_01.c -o notify_example_01 +//gcc -o notify_example_01 notify_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -19,6 +19,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/photocam_example_01.c b/src/examples/photocam_example_01.c index a2ba742..4a5eba8 100644 --- a/src/examples/photocam_example_01.c +++ b/src/examples/photocam_example_01.c @@ -1,5 +1,6 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" photocam_example_01.c -o photocam_example_01 +//gcc -o photocam_example_01 photocam_example_01.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" +//where directory is the path where images/insanely_huge_test_image.jpg can be found. #include #ifdef HAVE_CONFIG_H @@ -22,6 +23,7 @@ elm_main(int argc, char **argv) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/popup_example_01.c b/src/examples/popup_example_01.c index 27eb0e3..1d0747f 100644 --- a/src/examples/popup_example_01.c +++ b/src/examples/popup_example_01.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` popup_example_01.c -o popup_example_01 +//gcc -o popup_example_01 popup_example_01.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -24,6 +24,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) bg = elm_bg_add(win); elm_bg_color_set(bg, 128, 128, 128); + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bg); evas_object_show(bg); diff --git a/src/examples/popup_example_02.c b/src/examples/popup_example_02.c index 9ecd03a..48d0eba 100644 --- a/src/examples/popup_example_02.c +++ b/src/examples/popup_example_02.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` popup_example_02.c -o popup_example_02 +//gcc -o popup_example_02 popup_example_02.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -23,6 +23,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/popup_example_03.c b/src/examples/popup_example_03.c index 92d598f..1f6993a 100644 --- a/src/examples/popup_example_03.c +++ b/src/examples/popup_example_03.c @@ -1,5 +1,5 @@ //Compile with: -//gcc -g `pkg-config --cflags --libs elementary` popup_example_03.c -o popup_example_03 +//gcc -o popup_example_03 popup_example_03.c -g `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -25,6 +25,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 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); diff --git a/src/examples/slideshow_example.c b/src/examples/slideshow_example.c index b97d859..4d2ba3d 100644 --- a/src/examples/slideshow_example.c +++ b/src/examples/slideshow_example.c @@ -5,7 +5,7 @@ * See stdout/stderr for output. Compile with: * * @verbatim - * gcc -g `pkg-config --cflags --libs elementary` slideshow_example.c -o slideshow_example + * gcc -o slideshow_example slideshow_example.c -g `pkg-config --cflags --libs elementary` * @endverbatim */ @@ -191,17 +191,21 @@ elm_main(int argc __UNUSED__, win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC); elm_win_title_set(win, "Slideshow example"); evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); + elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + evas_object_resize(win, 600, 400); + evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, bg); evas_object_show(bg); slideshow = elm_slideshow_add(win); elm_slideshow_loop_set(slideshow, EINA_TRUE); - elm_win_resize_object_add(win, slideshow); evas_object_size_hint_weight_set(slideshow, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, slideshow); evas_object_show(slideshow); itc.func.get = _get; @@ -225,6 +229,7 @@ elm_main(int argc __UNUSED__, notify = elm_notify_add(win); elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM); + evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, notify); elm_notify_timeout_set(notify, 3.0); @@ -311,9 +316,6 @@ elm_main(int argc __UNUSED__, _notify_show(notify, NULL, NULL, NULL); - evas_object_resize(win, 600, 400); - evas_object_show(win); - elm_run(); return 0; } diff --git a/src/examples/transit_example_01.c b/src/examples/transit_example_01.c index 3696307..f6c93dc 100644 --- a/src/examples/transit_example_01.c +++ b/src/examples/transit_example_01.c @@ -1,6 +1,5 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` transit_example_01.c -o transit_example_01 -// where directory is the a path where images/plant_01.jpg can be found. +//gcc -o transit_example_01 transit_example_01.c `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -26,11 +25,12 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_win_title_set(win, "Transit - Basic"); evas_object_smart_callback_add(win, "delete,request", on_done, NULL); elm_win_autodel_set(win, EINA_TRUE); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_resize(win, 400, 400); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); 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); diff --git a/src/examples/transit_example_02.c b/src/examples/transit_example_02.c index bc75b48..86b124e 100644 --- a/src/examples/transit_example_02.c +++ b/src/examples/transit_example_02.c @@ -1,6 +1,5 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` transit_example_02.c -o transit_example_02 -// where directory is the a path where images/plant_01.jpg can be found. +//gcc -o transit_example_02 transit_example_02.c `pkg-config --cflags --libs elementary` #include #ifdef HAVE_CONFIG_H @@ -26,11 +25,12 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__) elm_win_title_set(win, "Transit 9"); elm_win_autodel_set(win, EINA_TRUE); evas_object_resize(win, 400, 400); + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); evas_object_show(win); bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); 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); diff --git a/src/examples/transit_example_03.c b/src/examples/transit_example_03.c index a140788..a14078d 100644 --- a/src/examples/transit_example_03.c +++ b/src/examples/transit_example_03.c @@ -1,6 +1,6 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` transit_example_03.c -o transit_example_03 -// where directory is the a path where images/plant_01.jpg can be found. +//gcc -o transit_example_03 transit_example_03.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" +//where directory is the a path where images/icon_07.png can be found. #include #ifdef HAVE_CONFIG_H diff --git a/src/examples/transit_example_04.c b/src/examples/transit_example_04.c index faf4fe5..5b73fd5 100644 --- a/src/examples/transit_example_04.c +++ b/src/examples/transit_example_04.c @@ -1,7 +1,6 @@ //Compile with: -//gcc -g -DPACKAGE_DATA_DIR="\"\"" `pkg-config --cflags --libs elementary` transit_example_04.c -o transit_example_04 -// where directory is the a path where images/plant_01.jpg can be found. - +//gcc -o transit_example_04 transit_example_04.c `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"\"" +//where directory is the a path where images/icon_07.png can be found. #include #ifdef HAVE_CONFIG_H