From: Bluezery <ohpowel@gmail.com>

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.



SVN revision: 66154
This commit is contained in:
Bluezery 2011-12-13 10:39:53 +00:00 committed by Carsten Haitzler
parent 1e5c64bba1
commit 03e6f69c3d
1 changed files with 7 additions and 2 deletions

View File

@ -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);