From: raster Date: Tue, 13 Dec 2011 10:39:53 +0000 (+0000) Subject: From: Bluezery X-Git-Tag: REL_F_I9500_20120323_1~17^2~1122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c163076dfa13a6895b5dd1bb77c5de879d4ae94f;p=framework%2Fuifw%2Felementary.git From: Bluezery Subject: [E-devel] [Patch][elm_map] Bug fix for map test This patch is for test map. This fixes two simple bugs. 1. Max zoom level can be changed depends on the map source, not always 18. 2. $HOME can be NULL. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66154 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/test_map.c b/src/bin/test_map.c index 2acadaa..7d40cb8 100644 --- a/src/bin/test_map.c +++ b/src/bin/test_map.c @@ -283,7 +283,7 @@ my_map_name_loaded(void *data, Evas_Object *obj __UNUSED__, void *event_info __U elm_map_paused_set(data, EINA_TRUE); elm_map_zoom_mode_set(data, ELM_MAP_ZOOM_MODE_MANUAL); elm_map_geo_region_show(data, lon, lat); - elm_map_zoom_set(data, 18); + elm_map_zoom_set(data, elm_map_source_zoom_max_get(data)); elm_map_paused_set(data, b); } } @@ -355,6 +355,7 @@ static void map_track_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *fs, *bg, *vbox, *hbox, *sep; + char *path = NULL; fs_win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC); elm_win_title_set(fs_win, "File Selector"); @@ -373,7 +374,11 @@ map_track_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED fs = elm_fileselector_add(fs_win); elm_fileselector_is_save_set(fs, EINA_TRUE); elm_fileselector_expandable_set(fs, EINA_FALSE); - elm_fileselector_path_set(fs, getenv("HOME")); + path = getenv("HOME"); + //if "HOME" is not available, set current dir. path + if (!path) + path = "."; + elm_fileselector_path_set(fs, path); evas_object_size_hint_weight_set(fs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(fs, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(vbox, fs);