From: Enlightenment S. <no-...@en...> - 2009-10-05 00:38:56
|
Log: Fix maximize completely. Author: titan Date: 2009-10-04 17:38:45 -0700 (Sun, 04 Oct 2009) New Revision: 42881 Modified: trunk/ephoto/src/bin/ephoto.h trunk/ephoto/src/bin/ephoto_main.c Modified: trunk/ephoto/src/bin/ephoto.h =================================================================== --- trunk/ephoto/src/bin/ephoto.h 2009-10-04 23:31:31 UTC (rev 42880) +++ trunk/ephoto/src/bin/ephoto.h 2009-10-05 00:38:45 UTC (rev 42881) @@ -74,7 +74,7 @@ Evas_Object *flow; Evas_Object *sel; Eina_List *images; - int maximized; + int width, height; }; extern Ephoto *em; Modified: trunk/ephoto/src/bin/ephoto_main.c =================================================================== --- trunk/ephoto/src/bin/ephoto_main.c 2009-10-04 23:31:31 UTC (rev 42880) +++ trunk/ephoto/src/bin/ephoto_main.c 2009-10-05 00:38:45 UTC (rev 42881) @@ -3,7 +3,6 @@ /*General Callbacks */ static void window_close(Ecore_Evas *ee); static void window_resize(Ecore_Evas *ee); -static void window_move(Ecore_Evas *ee); static void window_shown(void *data, Evas *e, Evas_Object *obj, void *event_info); /*Ephoto Main Global*/ @@ -14,14 +13,14 @@ { em = calloc(1, sizeof(Ephoto)); em->sel = NULL; - em->maximized = 0; + em->width = 955; + em->height = 540; em->ee = ecore_evas_software_x11_new(0, 0, 0, 0, 955, 540); ecore_evas_title_set(em->ee, "Ephoto"); ecore_evas_name_class_set(em->ee, "Ephoto", "Ephoto"); ecore_evas_callback_destroy_set(em->ee, window_close); ecore_evas_callback_resize_set(em->ee, window_resize); - ecore_evas_callback_move_set(em->ee, window_move); ecore_evas_show(em->ee); em->e = ecore_evas_get(em->ee); @@ -61,24 +60,13 @@ int w, h; ecore_evas_geometry_get(ee, NULL, NULL, &w, &h); + em->width = w; + em->height = h; evas_object_resize(em->bg, w, h); evas_object_move(em->bg, 0, 0); + if (evas_object_visible_get(em->image_browser)) + ephoto_table_viewport_set(em->image_browser, w, h); + if (evas_object_visible_get(em->flow)) + evas_object_resize(em->flow, w, h); } -static void window_move(Ecore_Evas *ee) -{ - int w, h; - - if (ecore_evas_maximized_get(em->ee) != em->maximized) - { - evas_object_geometry_get(em->bg, 0, 0, &w, &h); - if (evas_object_visible_get(em->image_browser)) - evas_object_resize(em->image_browser, w, h); - if (evas_object_visible_get(em->flow)) - evas_object_resize(em->flow, w, h); - em->maximized = ecore_evas_maximized_get(em->ee); - } - - return; -} - |